public Bitmap ConvertSampleToBitmap(DPFP.Sample Sample) { DPFP.Capture.SampleConversion Convertor = new DPFP.Capture.SampleConversion(); Bitmap bitmap = null; Convertor.ConvertToPicture(Sample, ref bitmap); return bitmap; }
public static Bitmap ConvertSampleToBitmap(DPFP.Sample Sample) { DPFP.Capture.SampleConversion Convertor = new DPFP.Capture.SampleConversion(); // Create a sample convertor. Bitmap bitmap = null; // TODO: the size doesn't matter Convertor.ConvertToPicture(Sample, ref bitmap); // TODO: return bitmap as a result return bitmap; }
protected Bitmap ConvertSampleToBitmap(DPFP.Sample Sample) { DPFP.Capture.SampleConversion Convertor = new DPFP.Capture.SampleConversion(); Bitmap bitmap = null; Convertor.ConvertToPicture(Sample, ref bitmap); return(bitmap); }
protected Bitmap ConvertSampleToBitmap(DPFP.Sample Sample) { DPFP.Capture.SampleConversion Convertor = new DPFP.Capture.SampleConversion(); // Create a sample convertor. Bitmap bitmap = null; // TODO: the size doesn't matter Convertor.ConvertToPicture(Sample, ref bitmap); // TODO: return bitmap as a result return(bitmap); }
public Bitmap ConvertSampleToBitmapLogin(DPFP.Sample Sample) { try { DPFP.Capture.SampleConversion Convertor = new DPFP.Capture.SampleConversion(); Bitmap bitmap = null; Convertor.ConvertToPicture(Sample, ref bitmap); return(bitmap); } catch (Exception ex) { LogError.AddExcFileTxt(ex, "LectorHuella ~ OnTemplate"); return(null); } }
public Form2() { InitializeComponent(); graphics = this.CreateGraphics(); font = new Font("Times New Roman", 12, FontStyle.Bold, GraphicsUnit.Pixel); DPFP.Capture.ReadersCollection coll = new DPFP.Capture.ReadersCollection(); regFeatures = new DPFP.FeatureSet[4]; for (int i = 0; i < 4; i++) { regFeatures[i] = new DPFP.FeatureSet(); } verFeatures = new DPFP.FeatureSet(); createRegTemplate = new DPFP.Processing.Enrollment(); readers = new DPFP.Capture.ReadersCollection(); for (int i = 0; i < readers.Count; i++) { readerDescription = readers[i]; if ((readerDescription.Vendor == "Digital Persona, Inc.") || (readerDescription.Vendor == "DigitalPersona, Inc.")) { try { capturer = new DPFP.Capture.Capture(readerDescription.SerialNumber, DPFP.Capture.Priority.Normal);//CREAMOS UNA OPERACION DE CAPTURAS. } catch (Exception ex) { MessageBox.Show(ex.Message); } capturer.EventHandler = this; //AQUI CAPTURAMOS LOS EVENTOS. converter = new DPFP.Capture.SampleConversion(); try { verify = new DPFP.Verification.Verification(); } catch (Exception ex) { MessageBox.Show("Ex: " + ex.ToString()); } break; } } }
protected virtual void Process(DPFP.Sample Sample) { // draw fingerprint sample image. DrawPicture(ConvertSampleToBitmap(Sample)); DPFP.FeatureSet features = ExtractFeatures(Sample, DPFP.Processing.DataPurpose.Enrollment); DPFP.Capture.SampleConversion ToByte = new DPFP.Capture.SampleConversion(); // Check quality of the sample and add to enroller if it's good if (features != null) { try { MakeReport("The fingerprint feature set was created."); Enroller.AddFeatures(features); } finally { UpdateStatus(); switch (Enroller.TemplateStatus) { case DPFP.Processing.Enrollment.Status.Ready: // report success and stop capturing //OnTemplate(Enroller.Template); SetPrompt("Done."); cp.StopCapture(); break; case DPFP.Processing.Enrollment.Status.Failed: // report failure and restart capturing Enroller.Clear(); cp.StopCapture(); UpdateStatus(); // OnTemplate(null); cp.StartCapture(); break; } } } }
protected override void Process(DPFP.Sample Sample) { base.Process(Sample); // Process the sample and create a feature set for the enrollment purpose. DPFP.FeatureSet features = ExtractFeatures(Sample, DPFP.Processing.DataPurpose.Enrollment); DPFP.Capture.SampleConversion ToByte = new DPFP.Capture.SampleConversion(); // Check quality of the sample and add to enroller if it's good if (features != null) { try { MakeReport("The fingerprint feature set was created."); Enroller.AddFeatures(features); } finally { UpdateStatus(); // Check if template has been created. switch (Enroller.TemplateStatus) { case DPFP.Processing.Enrollment.Status.Ready: // report success and stop capturing { OnTemplate(Enroller.Template); SetPrompt("Click Close, and then click Fingerprint Verification."); Stop(); MemoryStream fingerprintData = new MemoryStream(); Enroller.Template.Serialize(fingerprintData); fingerprintData.Position = 0; BinaryReader br = new BinaryReader(fingerprintData); byte[] bytes = br.ReadBytes((Int32)fingerprintData.Length); try { MySqlCommand cmd = new MySqlCommand("INSERT INTO parkingdetail(fingerprint) VALUES(@img);", con); cmd.Parameters.Add("@img", MySqlDbType.VarBinary).Value = bytes; con.Open(); cmd.ExecuteNonQuery(); con.Close(); } catch (Exception e) { MakeReport(e.Message); } break; } case DPFP.Processing.Enrollment.Status.Failed: // report failure and restart capturing { Enroller.Clear(); Stop(); UpdateStatus(); OnTemplate(null); Start(); break; } } } } }