Click here to Skip to main content
14,641,344 members

How to verify a fingerprint from MySQL database in seperated form. (VB.NET)

Leetian04 asked:

Open original thread
These are codes in verifying a fingerprint, but not using MySQL database. I want it to compare a fingerprint scanned to database. If matched then message.show. These codes are from the SDK of the Biometric Digital Persona (U.are.U 4500).

' NOTE: This form is inherited from the CaptureForm,
' so the VisualStudio Form Designer may not load this properly
' (at least until you build the project).
' If you want to make changes in the form layout - do it in the base CaptureForm.
' All changes in the CaptureForm will be reflected in all derived forms 
' (i.e. in the EnrollmentForm and in the VerificationForm)

Public Class VerificationForm
  Inherits CaptureForm

  Private Template As DPFP.Template
  Private Verificator As DPFP.Verification.Verification

  Public Sub Verify(ByVal template As DPFP.Template)
    Me.Template = template
    ShowDialog()
  End Sub

  Protected Overrides Sub Init()
    MyBase.Init()
    MyBase.Text = "Fingerprint Verification"
    Verificator = New DPFP.Verification.Verification()
    UpdateStatus(0)
  End Sub

  Protected Overrides Sub Process(ByVal Sample As DPFP.Sample)
    MyBase.Process(Sample)

    ' Process the sample and create a feature set for the enrollment purpose.
    Dim features As DPFP.FeatureSet = ExtractFeatures(Sample, DPFP.Processing.DataPurpose.Verification)

    ' Check quality of the sample and start verification if it's good
    If Not features Is Nothing Then
      ' Compare the feature set with our template
      Dim result As DPFP.Verification.Verification.Result = New DPFP.Verification.Verification.Result()
      Verificator.Verify(features, Template, result)
      UpdateStatus(result.FARAchieved)
      If result.Verified Then
        MakeReport("The fingerprint was VERIFIED.")
      Else
        MakeReport("The fingerprint was NOT VERIFIED.")
      End If
    End If
  End Sub

  Protected Sub UpdateStatus(ByVal FAR As Integer)
    ' Show "False accept rate" value
    SetStatus(String.Format("False Accept Rate (FAR) = {0}", FAR))
  End Sub

    Private Sub VerificationForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
    Private Sub InitializeComponent()
        Me.SuspendLayout()
        '
        'VerificationForm
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.ClientSize = New System.Drawing.Size(581, 354)
        Me.Name = "VerificationForm"
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
End Class
Tags: VB, VB.NET, MySQL, biometrics

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100