Example #1
0
        public void LiveStreamFaceDetectingThreadDoWorkTest()
        {
            Size frame_size = new Size(10, 10);

            Nkujukira.Demo.Singletons.Singleton.HAARCASCADE_FILE_PATH = Singleton.HAARCASCADE_FILE_PATH;
            LiveStreamFaceDetectingThread thread = new LiveStreamFaceDetectingThread(frame_size);

            thread.StartWorking();
            Assert.IsTrue(thread.IsRunning());
        }
Example #2
0
        //STARTS THREAD TO DETECT FACES IN FRAME OFF THE MAIN THREAD
        private static LiveStreamFaceDetectingThread CreateLiveStreamFaceDetectorThread()
        {
            var  controls_name = MainWindow.MainWindowControls.live_stream_image_box1;
            int  width         = Singleton.MAIN_WINDOW.GetControl(controls_name).Width;
            int  height        = Singleton.MAIN_WINDOW.GetControl(controls_name).Width;
            Size frame_size    = new Size(width, height);

            live_face_detector = new LiveStreamFaceDetectingThread(frame_size);
            live_face_detector.StartWorking();

            return(live_face_detector);
        }