+ Reply to Thread
Results 1 to 9 of 9

Thread: Using the SDK for creating my First Application

  1. #1

    Using the SDK for creating my First Application

    For creating the First applcaition following steps needs to be performed

    1. INitialise the enBSP SDK module
    2. Listing connected devices (as more tehn one FP scanner can also be attached to the Computer)
    3. Initializing the selected device
    4. Enrolling the Fingerprint
    4.1 Scanning the fingerprint
    4.2 gettign the captured data into Variables
    4.3. storing the Data into bainry files or Database (code related to DB/text storage not in current thread's scope)
    5. Verifying the enrolled fingers
    6. Close DEvice
    7. Close enBSDP SDK Module


    Based on populairity,we will use C#.Net based code for explaining above steps
    Last edited by mahesh; 04-07-2010 at 03:40 PM.

  2. #2
    To test any of the code snippet run, you must have already installed enBSP SDK setup

    1. INitialise the enBSP SDK module

    Use the following code to initialize the NBioBSP Class Library module.
    using NITGEN.SDK.NBioBSP;

    m_NBioAPI = new NBioAPI();

  3. #3
    2. Listing connected devices (as more tehn one FP scanner can also be attached to the Computer)

    Before opening the device, use the EnumerateDevice method to determine the number
    and type of devices linked to the PC. Once this is activated, the number of devices
    linked to the PC and the ID for each device will be returned.
    DeviceID is composed of the device names and their instance numbers. NBioBSP sets
    default settings for the FDP02 fingerprint recognition device at 0x01 and the FDU01
    fingerprint recognition device at 0x02.
    DeviceID = Instance Number + Device Name
    If there is only one device for each type in the system, the instance number will be 0. In
    this way, the device name has the same value as the device ID.

    The following is an example of how to use the EnumerateDevice method. All devices
    found by this method will be added into the combo box, comboDevice.

    Code:
    m_NBioAPI = new NBioAPI();
    ...
    int i;
    uint nNumDevice;
    short[] nDeviceID;
    uint ret = m_NBioAPI.EnumerateDevice(out nNumDevice, out nDeviceID);
    if (ret == m_NBioAPI.Error.NONE)
    {
    comboDevice.Items.Add("Auto_Detect"); for (i = 0; i < nNumDevice; i++) {
    switch (nDeviceID[i]) {
    case NBioAPI.Type.DEVICE_NAME.FDP02:
    comboDevice.Items.Add("FDP02"); break;
    case NBioAPI.Type.DEVICE_NAME.FDU01:
    comboDevice.Items.Add("FDU01"); break;
    }
    }
    }
    The device ID will be returned if the number of devices is entered in the
    DeviceNumber property of the nDeviceID (DeviceNumber). For example, nDeviceID(0)
    will show the DeviceID of the first device.

  4. #4
    3. Initializing the selected device

    The OpenDevice method is used to initialize the device for the NBioBSP Class
    Library. Device initialization must be done using the OpenDevice method before
    device related functions such as enrolling, verifying, and capturing will work properly.
    In the event that you are unsure which devices have been installed, use the
    EnumerateDevice method to determine what devices have previously been installed.


    Code:
    m_NBioAPI = new NBioAPI();
    ...
    ret = m_NBioAPI.OpenDevice(DeviceID);
    if (ret == NBioAPI.Error.NONE)
    // Open device success ...
    else
    // Open device failed ...
    The device can be set automatically using NBioAPI.Type.DEVICE_ID.AUTO. This
    setting will search the latest active device if there are multiple devices connected.
    Code:
    m_NBioAPI.OpenDevice(NBioAPI.Type.DEVICE_ID.AUTO);
    NBioBSP_DEVICE_ID_AUTO_DETECT use the latest opened device.

  5. #5
    4. Enrolling the Fingerprint

    The Enroll method is used to enroll fingerprints. All fingerprint data is used as the type
    of handle, binary or encoded text found in the NBioBSP Class Library module.
    Fingerprint data will be entered into the handle of FIR property upon successful
    enrollment, and it can be returned as the type of binary or encoded text. The NBioBSP
    Class Library provides various overloading Enroll method that can be used for the
    specific purpose. One of example is as below.


    Code:
    m_NBioAPI = new NBioAPI();
    ...
    NBioAPI.Type.HFIR hNewFIR;
    ret = m_NBioAPI.Enroll(out hNewFIR, null);
    if (ret == NBioAPI.Error.NONE)
    {
    Code:
    // Enroll success ... // Get binary encoded FIR data NBioAPI.Type.FIR biFIR; m_NBioAPI.GetFIRFromHandle(hNewFIR, out biFIR); // Get text encoded FIR data NBioAPI.Type.FIR_TEXTENCODE textFIR; m_NBioAPI.GetTextFIRFromHandle(hNewFIR, out textFIR, true); // Write FIR data to file or DB
    } else
    // Enroll failed ...
    Fingerprint data will be stored as saving biFIR or textFIR to a file or DB.(logic for stroing in DB or TEXT file is not in scope of this thread)

  6. #6
    5. Verifying the enrolled fingers

    The Verify method performs fingerprint verification using the existing fingerprint data as
    a comparison with newly input fingerprints, and returns the verification result. After
    successful verification, the method returns the payload if it is available.

    Code:
    m_NBioAPI = new NBioAPI();
    ...
    //Read FIRText Data from File or DB.
    ...
    uint ret;
    bool result;
    NBioAPI.Type.FIR_PAYLOAD myPayload = new NBioAPI.Type.FIR_PAYLOAD();
    // Verify with binary FIR
    ret = m_NBioAPI.Verify(biFIR, out result, myPayload);
    if (ret != NBioAPI.Error.NONE)
    {
    // Verify Success // Check payload if (myPayload.Data != null) {
    textPayload.Text = myPayload.Data;
    }
    } else
    // Verify failed

  7. #7
    6. Close DEvice

    The CloseDevice method should be used to close the device. The same DeviceID
    used to call the Open method must be used again to call the CloseDevice method.
    Code:
    m_NBioAPI = new NBioAPI();
    ...
    ret = m_NBioAPI.CloseDevice(DeviceID);
    if (ret == NBioAPI.Error.NONE)
    // Close device success ...
    else
    // Close device failed ...

    NOTE: The current device must be closed before opening another device.


    7. Close enBSDP SDK Module
    No specific code is needed to close or free any memory on .NET language.

  8. #8

    Invisible capturing of Finger-Template HFDU06

    Hello Sir,

    I have developed a program using NITGEN Sdk,
    all is well, but the only thing is, i want to capture the FP-Template without showing the Nitgen's capturing window, and i want to keep the capturing mode continuously on...
    How can i do it?

  9. #9
    If you have installed Enbsp sdk then search for code for NbioBSP UI TEST. in that there is option for Invisible only for capture and use external FP window make this option ON and test your application. Regarding Auto on VB demo sample send query on support@bioenabletech.com with your purchase details

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts