private void checkBlink(Image <Gray, byte> faceImage) { printInformation(); BlinkDetector.Detect(faceImage); if (BlinkStateManager.LastAction.Equals(BlinkStateManager.LAST_ACTION.BLINK)) { if (username.Equals(detected)) { Thread thread = new Thread(new ThreadStart(RunMainForm)); thread.Start(); this.Close(); } } return; }
private void CheckBlink(Image <Gray, byte> faceImage) { //print method for debugging purpose PrintBlinkInformations(); BlinkDetector.Detect(faceImage); if (BlinkStateManager.LastAction.Equals(BlinkStateManager.LAST_ACTION.BLINK)) { if (FaceRecognition.SaveTrainingData(faceImage, name)) { BlinkStateManager.Clear(); photoCounter--; if (photoCounter <= 0) { buttonFinish.Enabled = true; photoCounter = 0; } } } return; }