How to capture finger prints in java

Java code for capture finger prints.

NBioBSPJNI.FIR_HANDLE hSavedFIR;
hSavedFIR = bsp.new FIR_HANDLE();
bsp.Enroll(hSavedFIR, null); // Enroll
bsp.Capture(hSavedFIR); // Capture
// Get Text FIR
if (bsp.IsErrorOccured() == false) {
NBioBSPJNI.FIR_TEXTENCODE textSavedFIR;
textSavedFIR = bsp.new FIR_TEXTENCODE();
bsp.GetTextFIRFromHandle(hSavedFIR, textSavedFIR);
}
// Get Binary FIR
if (bsp.IsErrorOccured() == false) {
NBioBSPJNI.FIR fullSavedFIR;
fullSavedFIR = bsp.new FIR();
bsp.GetFIRFromHandle(hSavedFIR, fullSavedFIR);
}

You can capture both type in your database and file.
1)textFIR
2)BinaryFIR

Comments

  1. public class Exemplo2 {

    /**
    * @param args the command line arguments
    */
    public static void main(String[] args) {
    NBioBSPJNI bsp = new NBioBSPJNI();
    NBioBSPJNI.FIR_HANDLE hSavedFIR = hSavedFIR = bsp.new FIR_HANDLE();

    bsp.OpenDevice();

    // Make two obj for two files.
    NBioBSPJNI.INPUT_FIR inputFIR = bsp.new INPUT_FIR();
    NBioBSPJNI.INPUT_FIR inputFIR1 = bsp.new INPUT_FIR();

    Boolean bResult = new Boolean(false);
    NBioBSPJNI.FIR_PAYLOAD payload = bsp.new FIR_PAYLOAD();

    //======================================================================
    // bsp.Capture(hSavedFIR);

    NBioBSPJNI.FIR_TEXTENCODE textSavedFIR = bsp.new FIR_TEXTENCODE();
    String v = "AQAAABQAAACUAQAAAQASAAEAZAAAAAAAiAEAAP9/re2HYcPmlILp4qCXnXLFCcswab*1qmDV3AErMaPWs1ye4*bjImuLksJ/Wzsm6uVVntkWx1HeSAfL3rqraMmi3vHa0Fh5gNpWrW7gOkz8zfFJ/6UHTN4frcERie44fUCJXzrLSa7iJ1LNZq9/Fqw5RXLq6v*H1FRkCZCsC7z*r5*l3/qE6TFEzXc3o1Hj8/JrYNHdrhH8exrTmlW/0QfNz*X9irgPSX9H6zz5eL0asDq/N4MpDOu7OoFvjlz2XvKudssclSm7*nh8Ytd7YOhCta0m5dMIfxUZac0r6nKFJ8XG7Dfwrrij/awl2*HCjrufUYSQMDRaX*dTAj871nc635wYynFc8tYic5w8/CkvOBlFDfCmWr9GI02Yiw50vF3Ca7QeSPWQf29sO2xMDaQYAkkZo*IK1d*NEgKyaGgIR8Za4svDqU21SYFReG8Bq3gjKSq5s3nSjTLPs5Eq*H1HT1eWtcPtfv9aj5v4ZDNqhGVEQmRGg/Qg8pZ5Tq*jsQtX61XESPf*g6FEHda/FLQ";
    textSavedFIR.TextFIR = v;
    // bsp.GetTextFIRFromHandle(hSavedFIR, textSavedFIR);
    System.out.println(textSavedFIR.TextFIR);


    //======================================================================
    inputFIR1 = bsp.new INPUT_FIR();
    bsp.Capture(hSavedFIR);

    NBioBSPJNI.FIR_TEXTENCODE textSavedFIR1 = bsp.new FIR_TEXTENCODE();
    bsp.GetTextFIRFromHandle(hSavedFIR, textSavedFIR1);
    System.out.println(textSavedFIR1.TextFIR);

    //Set both files in these objects.
    inputFIR.SetTextFIR(textSavedFIR);
    inputFIR1.SetTextFIR(textSavedFIR1);

    // call verify mathod.
    bsp.VerifyMatch(inputFIR1, inputFIR, bResult, payload);

    System.out.println(bResult);

    }

    }

    ReplyDelete
    Replies
    1. Can you please let me know the String in variable v is which data? I am using ISO template or wsq data and trying to match, but that does not work.

      Delete
  2. Hello guys.

    I plug the Hamster DX, it displays on the Control Panel at the Devices menu, but the code returns an error. I'm pretty sure the code is correct, since it's just a few lines I got from the official tutorial.

    NBioBSPJNI bsp = new NBioBSPJNI();
    NBioBSPJNI.DEVICE_ENUM_INFO deviceEnumInfo;

    deviceEnumInfo = bsp.new DEVICE_ENUM_INFO();
    bsp.EnumerateDevice(deviceEnumInfo);

    bsp.OpenDevice();
    if (deviceEnumInfo.DeviceCount == 0) {
    System.out.println("device not found.");
    }

    The device is never found. Is there something I must do besides plugging the device on the USB and running this code to open the device?

    Thanks a million

    ReplyDelete
  3. HI
    i want save image in specific location after capturing image

    ReplyDelete
  4. I add NBioBSPJNI.dll file to the project but it is not working. plz help me

    ReplyDelete
  5. I add NBioBSPJNI.dll file to the project but it is not working. plz help me

    ReplyDelete

Post a Comment

Recent Post

Recent Posts Widget

Popular posts from this blog

Capture image from webcam java code, examples

Shallow Copy Deep Copy Java example