示例#1
0
        public TrainingForm(String _name)
        {
            InitializeComponent();

            name = _name;

            photoCounter = 3;

            capture = new Capture();
            CameraCapture.Init(capture);
            BlinkDetector.Init(new CascadeClassifier(eyePairClassifier), new CascadeClassifier(eyeClassifier));
            FaceDetection.Init(new CascadeClassifier(faceClassifier));
            TrainingStateManager.Clear();
            BlinkStateManager.Clear();

            labelInstruction.Text = "We will now capture a few images \nof your face";
            labelRemaining.Text   = photoCounter + " more capture to finish";
            buttonFinish.Enabled  = false;
            CameraCapture.Start();

            timer          = new DispatcherTimer();
            timer.Tick    += ProcessTrainFrame;
            timer.Interval = new TimeSpan(0, 0, 0, 0, 1);
            timer.Start();
        }
示例#2
0
        public SecurityForm()
        {
            InitializeComponent();

            username = Authorization.username;

            capture = new Capture();
            CameraCapture.Init(capture);
            BlinkDetector.Init(new CascadeClassifier(eyePairClassifier), new CascadeClassifier(eyeClassifier));
            FaceDetection.Init(new CascadeClassifier(faceClassifier));
            SecurityStateManager.Clear();
            BlinkStateManager.Clear();

            labelInstruction.Text = "We will now capture a few images \nof your face";

            CameraCapture.Start();

            timer          = new DispatcherTimer();
            timer.Tick    += ProcessSecurityFrame;
            timer.Interval = new TimeSpan(0, 0, 0, 0, 1);
            timer.Start();
        }