public Recognition() { System.Windows.Forms.Application.DoEvents(); InitializeComponent(); try { facCon.LoadFaceDetatils(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } finally { StartRecognition(); } }
private void RecognitionImage(object sender, EventArgs e) { faceController.LoadFaceDetatils("3 Year", "Subjects.module4 = 1"); currentFrame = ((Image <Bgr, byte>)pictureFrame.Image); faceController.StartFacerecognition(currentFrame); pictureFrame.Image = faceController.GetRecognizedImage(); var UserId = faceController.GetImageIds(); foreach (string id in UserId) { if (!faceController.Checkperson(Convert.ToInt32(id), "3 Year", "ADBCSA")) { faceController.AddStudentToSheet(Convert.ToInt32(id), "3 Year", faceController.GetCurrentTime(), faceController.GetCurrentDate(), "ADBCSA"); MessageBox.Show("ID " + faceController.GetID(id) + " Student added", "Sucess"); } else { MessageBox.Show("ID " + faceController.GetID(id) + " Student alredy attended to this class", "Warring"); } } }
private void SubjectIndexChnage(object sender, EventArgs e) { var subject = "Subjects." + GetModule(subjectList.Text) + " = 1"; faceController.LoadFaceDetatils(batchCode.Text, subject); }