Ejemplo n.º 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();
        }
Ejemplo n.º 2
0
        private void buttonFinish_Click(object sender, EventArgs e)
        {
            CameraCapture.Stop();
            Thread thread = new Thread(new ThreadStart(RunLoginForm));

            thread.Start();
            this.Close();
        }
Ejemplo n.º 3
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();
        }
Ejemplo n.º 4
0
 private void RunMainForm()
 {
     CameraCapture.Stop();
     Application.Run(new MainForm());
 }