Avatar of akhil raj
akhil raj

asked on 

how to convert finger print image to a unique number / id .

Private Sub bscan_Click(sender As Object, e As EventArgs) Handles bscan.Click
        Dim img_wdth As Int32 = 260
        Dim img_hght As Int32 = 300
        Dim img_dpi As Int32 = 500
        Dim ierror As Int32
        Dim fp_img() As Byte
        Dim m_vrfmin() As Byte
        Dim timeout As Int32 = 10000
        Dim quality As Int32 = 80

        Dim m_fpm As SGFingerPrintManager    'm_fpm is member variable of sgfingerprintmanager

        Dim device_name As SGFPMDeviceName
        Dim port_addr As Int32
        m_fpm = New SGFingerPrintManager()
        device_name = SGFPMDeviceName.DEV_FDU03
        port_addr = SGFPMPortAddr.AUTO_DETECT
        ierror = m_fpm.Init(SGFPMDeviceName.DEV_FDU03)
        ierror = m_fpm.OpenDevice(port_addr)
        ReDim fp_img(img_wdth * img_hght)
        ReDim m_vrfmin(img_wdth * img_hght)
        ierror = m_fpm.GetImageEx(fp_img, timeout, thumbimpression.Handle.ToInt32(), quality)
        If (ierror = SGFPMError.ERROR_NONE) Then
            DrawImage(fp_img, thumbimpression)
        End If

    End Sub

    Private Sub DrawImage(ByVal imgData() As Byte, ByVal picBox As PictureBox)
        Dim colorval As Int32
        Dim bmp As Bitmap
        Dim i, j As Int32
        Dim img_wdth As Int32 = 260
        Dim img_hght As Int32 = 300
        Dim img_dpi As Int32 = 500
        bmp = New Bitmap(img_wdth, img_hght)
        picBox.Image = bmp

        For i = 0 To bmp.Width - 1
            For j = 0 To bmp.Height - 1
                colorval = imgData((j * img_wdth) + i)
                bmp.SetPixel(i, j, Color.FromArgb(colorval, colorval, colorval))
            Next j
        Next i

    End Sub
the above code scans the finger placed on the secugenfinger print device and draws an bitmap image on the picture box . how can i convert that bitmap image of the fingerprint to a number ?
Visual Basic.NET

Avatar of undefined
Last Comment

8/22/2022 - Mon