public override void Dispose() { if (wrap != null) { wrap.Dispose(); wrap = null; } }
public LandmarkWrapperTest(int index = 0, string modelPath = "./") { wrap = new LandmarkDetectorWrap(modelPath); cascade = new CascadeClassifier(); capture = NativeBindings.Kernal.NewCapture(index); capture.FrameReady += (sender, arg) => { Proc(arg.Mat, arg); }; sw = new Stopwatch(); sw.Start(); cascade.Load(wrap.Parameters.face_detector_location); wrap.Load(); wrap.InVideo = true; }