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; }
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); } } }