Получение данных с помощью сканера отпечатков пальцев из базы данных
у меня есть цифровое персонифицированное устройство версии U. are. U5100.
мы используем в c# с sdk, он генерирует уникальный код каждый отпечаток большого пальца.
я сохраняю уникальный код в sql server, но как извлечь его с помощью этого кода.
потому что его дают каждый раз новым уникальным кодом.
private void OnCaptured(CaptureResult captureResult) { try { // Check capture quality and throw an error if bad. if (!_sender.CheckCaptureResult(captureResult)) return; foreach (Fid.Fiv fiv in captureResult.Data.Views) { SendMessage3(Action3.SendBitmap3, _sender.CreateBitmap(fiv.RawImage, fiv.Width, fiv.Height)); a = fiv.Bytes; String aas =Convert.ToString(fiv.Bytes); } DataResult<fmd> resultConversion = FeatureExtraction.CreateFmdFromFid(captureResult.Data, Constants.Formats.Fmd.ANSI); // Convert.ToString(resultConversion.Data) DataTable dt = new DataTable(); dt = getdata(a); if (dt.Rows.Count > 0) { fingervalue = Fmd.SerializeXml(resultConversion.Data); //==================================================================== if (resultConversion.ResultCode != Constants.ResultCode.DP_SUCCESS) { _sender.Reset = true; throw new Exception(resultConversion.ResultCode.ToString()); } // =======1 End=========// firstFinger = Fmd.DeserializeXml(Convert.ToString(dt.Rows[1]["Finger_Value"])); if (count == 0) { SendMessage(Action.SendMessage, "Enrollment 3."); thirdFinger = resultConversion.Data; CompareResult compareResult = Comparison.Compare(firstFinger, 0, thirdFinger, 0); if (compareResult.ResultCode != Constants.ResultCode.DP_SUCCESS) { _sender.Reset = true; throw new Exception(compareResult.ResultCode.ToString()); } String m1 = " (fingerprints matched)"; String m2 = " (fingerprints did not match)"; SendMessage(Action.SendMessage, "Comparison resulted in a dissimilarity score of " + compareResult.Score.ToString() + (compareResult.Score < (PROBABILITY_ONE / 100000) ? m1 : m2)); if (compareResult.Score < (PROBABILITY_ONE / 100000)) { //=======3 start=========// try { // Check capture quality and throw an error if bad. if (!_sender.CheckCaptureResult(captureResult)) return; // Create bitmap foreach (Fid.Fiv fiv in captureResult.Data.Views) { SendMessage3(Action3.SendBitmap3, _sender.CreateBitmap(fiv.RawImage, fiv.Width, fiv.Height)); //fingervalue = Fmd.SerializeXml(resultConversion.Data); ; //widht = fiv.Width; //height = fiv.Height; //System.Text.Encoding.UTF8.GetString(byteArray); } } catch (Exception ex) { // Send error message, then close form SendMessage(Action.SendMessage, "Error: " + ex.Message); } //========3 End========// } else { // pictureBox2.Image =; pictureBox2.Image = null; //pictureBox2.Refresh(); } SendMessage(Action.SendMessage, "Place a finger on the reader."); count = 0; } //==================================================================== } else { if (resultConversion.ResultCode != Constants.ResultCode.DP_SUCCESS) { _sender.Reset = true; throw new Exception(resultConversion.ResultCode.ToString()); } if (count == 0) { SendMessage(Action.SendMessage, "Enrollment 1."); // =======1 start=========// try { // Check capture quality and throw an error if bad. if (!_sender.CheckCaptureResult(captureResult)) return; // Create bitmap foreach (Fid.Fiv fiv in captureResult.Data.Views) { SendMessage1(Action1.SendBitmap, _sender.CreateBitmap(fiv.RawImage, fiv.Width, fiv.Height)); fingervalue = Fmd.SerializeXml(resultConversion.Data); widht = fiv.Width; height = fiv.Height; a = fiv.Bytes; savedata(); } } catch (Exception ex) { // Send error message, then close form SendMessage(Action.SendMessage, "Error: " + ex.Message); } // =======1 End=========// firstFinger = resultConversion.Data; //Byte a; //int b, c; // String abc; //firstFinger = (Fmd)abc; count += 1; SendMessage(Action.SendMessage, "Now place the same finger on the reader."); } else if (count == 1) { SendMessage(Action.SendMessage, "Enrollment 2."); //=======2 Start=========// try { // Check capture quality and throw an error if bad. if (!_sender.CheckCaptureResult(captureResult)) return; // Create bitmap foreach (Fid.Fiv fiv in captureResult.Data.Views) { SendMessage2(Action2.SendBitmap2, _sender.CreateBitmap(fiv.RawImage, fiv.Width, fiv.Height)); fingervalue = Fmd.SerializeXml(resultConversion.Data); ; widht = fiv.Width; height = fiv.Height; a = fiv.Bytes; savedata(); } } catch (Exception ex) { // Send error message, then close form SendMessage(Action.SendMessage, "Error: " + ex.Message); } //======2 End==========// secondFinger = resultConversion.Data; count += 1; SendMessage(Action.SendMessage, "Now place the same finger on the reader."); } else if (count == 2) { SendMessage(Action.SendMessage, "Enrollment 3."); thirdFinger = resultConversion.Data; CompareResult compareResult = Comparison.Compare(secondFinger, 0, thirdFinger, 0); if (compareResult.ResultCode != Constants.ResultCode.DP_SUCCESS) { _sender.Reset = true; throw new Exception(compareResult.ResultCode.ToString()); } String m1 = " (fingerprints matched)"; String m2 = " (fingerprints did not match)"; SendMessage(Action.SendMessage, "Comparison resulted in a dissimilarity score of " + compareResult.Score.ToString() + (compareResult.Score < (PROBABILITY_ONE / 100000) ? m1 : m2)); if (compareResult.Score < (PROBABILITY_ONE / 100000)) { //=======3 start=========// try { // Check capture quality and throw an error if bad. if (!_sender.CheckCaptureResult(captureResult)) return; // Create bitmap foreach (Fid.Fiv fiv in captureResult.Data.Views) { SendMessage3(Action3.SendBitmap3, _sender.CreateBitmap(fiv.RawImage, fiv.Width, fiv.Height)); fingervalue = Fmd.SerializeXml(resultConversion.Data); ; widht = fiv.Width; height = fiv.Height; a = fiv.Bytes; savedata(); //System.Text.Encoding.UTF8.GetString(byteArray); } } catch (Exception ex) { // Send error message, then close form SendMessage(Action.SendMessage, "Error: " + ex.Message); } //========3 End========// } else { // pictureBox2.Image =; pictureBox2.Image = null; //pictureBox2.Refresh(); } SendMessage(Action.SendMessage, "Place a finger on the reader."); count = 0; } } } catch (Exception ex) { // Send error message, then close form SendMessage(Action.SendMessage, "Error: " + ex.Message); } }</fmd>
Kornfeld Eliyahu Peter
Непонятный... Вы хотите сказать, что сканер каждый раз возвращает другой код для одного и того же пальца?
(Это помогло бы очистить несвязанный код из этого дампа)