void InitialiseBack()
 {
     lock (FBackLock)
     {
         FBackBuffer.Initialise(FImageAttributes);
     }
 }
Ejemplo n.º 2
0
        public static void CopyImageConverted(CVImage source, CVImage target)
        {
            if (target.Size != source.Size)
            {
                target.Initialise(source.Size, target.NativeFormat);
            }

            COLOR_CONVERSION route = ConvertRoute(source.NativeFormat, target.NativeFormat);

            if (route == COLOR_CONVERSION.CV_COLORCVT_MAX)
            {
                CvInvoke.cvConvert(source.CvMat, target.CvMat);
            }
            else
            {
                try
                {
                    CvInvoke.cvCvtColor(source.CvMat, target.CvMat, route);
                }
                catch
                {
                    //CV likes to throw here sometimes, but the next frame it's fine
                }
            }
        }
Ejemplo n.º 3
0
		/// <summary>
		/// Copy CVImage into target CVImage 
		/// </summary>
		/// <param name="target"></param>
		public void GetImage(CVImage target)
		{
            if (target.NativeFormat == TColorFormat.UnInitialised)
            {
                target.Initialise(this.ImageAttributes);
            }

            GetImage(target.ImageAttributes.ColorFormat, target);
		}
Ejemplo n.º 4
0
        /// <summary>
        /// Copy CVImage into target CVImage
        /// </summary>
        /// <param name="target"></param>
        public void GetImage(CVImage target)
        {
            if (target.NativeFormat == TColorFormat.UnInitialised)
            {
                target.Initialise(this.ImageAttributes);
            }

            GetImage(target.ImageAttributes.ColorFormat, target);
        }
		public static void CopyImageConverted(CVImage source, CVImage target)
		{
            if (target.Size != source.Size)
            {
                target.Initialise(source.Size, target.NativeFormat);
            }

			COLOR_CONVERSION route = ConvertRoute(source.NativeFormat, target.NativeFormat);

			if (route == COLOR_CONVERSION.CV_COLORCVT_MAX)
			{
				CvInvoke.cvConvert(source.CvMat, target.CvMat);
			} else {
				try
				{
					CvInvoke.cvCvtColor(source.CvMat, target.CvMat, route);
				}
				catch
				{
					//CV likes to throw here sometimes, but the next frame it's fine
				}
			}

		}