public FaceTrackingInstance(ImageRGB image, HaarCascade cascade)
        {
            FSource         = image;
            FHaarCascade    = cascade;
            FTrackingThread = new Thread(fnFindFacesThread);
            FTrackingThread.Start();

            IsRunning = true;
        }
 public void Load(ImageRGB image)
 {
     lock (image.GetLock())
         if (image.Ptr != null)
         {
             FIsFresh = true;
             CvInvoke.cvCvtColor(image.Ptr, FBufferImage.Ptr, COLOR_CONVERSION.CV_RGB2RGBA);
         }
 }
        void ResizeOutput(int count)
        {
            FPinOutStatus.SliceCount   = count;
            FPinOutImage.SliceCount    = count;
            FPinOutLength.SliceCount   = count;
            FPinOutPosition.SliceCount = count;

            for (int i = 0; i < count; i++)
            {
                if (FPinOutImage[i] == null)
                {
                    FPinOutImage[i] = new ImageRGB();
                }
            }
        }
        public void Initialise(ImageRGB image, string filePath, int codec)
        {
            try
            {
                FVideoWriter = new VideoWriter(filePath, codec, 25, image.Width, image.Height, true);
                Image        = image;
            }
            catch
            {
                IsRunning = false;
                return;
            }

            RunCaptureThread = true;
            CaptureThread    = new Thread(Process);
            CaptureThread.Start();
            IsRunning = true;
        }
예제 #5
0
		private void Initialise(ImageRGB image)
		{
			lock (Lock)
			{
				RemoveListeners();

				if (image == null || !image.HasAllocatedImage)
				{
					FBufferImage = null;
					Initialised = false;
					return;
				}

				FImage = image;
				Allocate();

				if (Initialised)
				{
					AddListeners();
					Load(image);
				}
			}
		}
        private void Initialise(ImageRGB image)
        {
            lock (Lock)
            {
                RemoveListeners();

                if (image == null || !image.HasAllocatedImage)
                {
                    FBufferImage = null;
                    Initialised  = false;
                    return;
                }

                FImage = image;
                Allocate();

                if (Initialised)
                {
                    AddListeners();
                    Load(image);
                }
            }
        }
예제 #7
0
		public void Load(ImageRGB image)
		{
			lock (image.GetLock())
				if (image.Ptr != null)
				{
					FIsFresh = true;
					CvInvoke.cvCvtColor(image.Ptr, FBufferImage.Ptr, COLOR_CONVERSION.CV_RGB2RGBA);
				}
		}
예제 #8
0
		void ResizeOutput(int count)
		{
			FPinOutStatus.SliceCount = count;
			FPinOutImage.SliceCount = count;
			FPinOutLength.SliceCount = count;
			FPinOutPosition.SliceCount = count;

			for (int i = 0; i < count; i++)
			{
				if (FPinOutImage[i] == null)
				{
					FPinOutImage[i] = new ImageRGB();
				}
			}
		}