public tbFingerprint GetData() { var fi = new tbFingerprint(); fi.LastName = edName.Text; fi.Templates = new List <tbBinaryData>(); fi.Templates.Add(new tbBinaryData(CImage.ImageToByte(piFp1.Image))); fi.Templates.Add(new tbBinaryData(CImage.ImageToByte(piFp2.Image))); fi.Templates.Add(new tbBinaryData(CImage.ImageToByte(piFp3.Image))); fi.Templates.Add(new tbBinaryData(CImage.ImageToByte(piFp4.Image))); fi.Photo = new tbBinaryData(CImage.ImageToByte(piPhoto.Image)); return(fi); }
private void FoundPerson(tbFingerprint found) { //piPhoto.Image = CImage.ByteArrayToImage(found.Photo); //DbStore.InsTimeToPerson(found.Id); //gridControl1.DataSource = DbStore.GetTimePersons("WHERE TB_DATE BETWEEN TRUNC(SYSDATE) AND SYSDATE"); }
public tbFingerprint Identify(tbFingerprint probe) { Afis.Extract(probe); return(Afis.Identify(probe, database).FirstOrDefault() as tbFingerprint); }
//public MyPerson IdentifyFromPhote(Image img) //{ // float Similarity = 0.0f; // float Threshold = 0.0f; // float FARValue = 80; // byte[] facetem = faceRecognition.GetFaceTemplateFromImage(img); // Threshold = faceRecognition.GetFARValue(FARValue); // Dictionary<float, long> fountFace = new Dictionary<float, long>(); // foreach (MyPerson f in database) // { // Similarity = faceRecognition.MatchFaces(f.PhotoTemplate, facetem, FARValue); // if (Similarity >= Threshold) // { // fountFace.Add(Similarity, f.Id); // } // }; // KeyValuePair< float, long> item = fountFace.OrderByDescending(key => key.Value).FirstOrDefault(); // foreach (MyPerson person in database) // { // if (person.Id == item.Value) // { // return person; // } // } // return null; //} public float Verify(tbFingerprint probe, tbFingerprint match) { return(Afis.Verify(probe, match)); }