Search code examples
androidsdkandroid-ndkcamerafingerprint

Fingerprint Scanner using Camera


Working on fingerprint scanner using camera or without, its possibility and its success rate?, I came across one of open source SDK named FingerJetFX its provide feasibilty with android too.

The FingerJetFX OSE fingerprint feature extractor is platform-independent and can be built for, with appropriate changes to the make files, and run in environments with or without operating systems, including

  • Linux
  • Android
  • Windows
  • Windows CE
  • various RTOSs

but I'm not sure whether Fingerprint scanner possible or not, I download the SDK and digging but no luck, even didn't found any steps to integrate the SDK, so having few of question which listed below:

I'm looking for suggestion and guidance:

  1. Fingerprint scanner can be possible in android using camera or without camera?
  2. With the help of FingerJetFX can I achieve my goal?
  3. If 2nd answer is yes, then can someone provide me any sort of steps to integrate SDK in android?

Your suggestion are appreciable.


Solution

  • Android Camera Based Solutions:

    As someone who's done significant research on this exact problem, I can tell you it's difficult to get a suitable image for templating (feature extraction) using a stock camera found on any current Android device. The main debilitating issue is achieving significant contrast between the finger's ridges and valleys. Commercial optical fingerprint scanners (which you are attempting to mimic) typically achieve the necessary contrast through frustrated total internal reflection in a prism.

    FTIR in Biometrics

    In this case, light from the ridges contacting the prism are transmitted to the CMOS sensor while light from the valleys are not. You're simply not going to reliably get the same kind of results from an Android camera, but that doesn't mean you can't get something useable under ideal conditions.

    I took the image on the left with a commercial optical fingerprint scanner (Futronics FS80) and the right with a normal camera (15MP Cannon DSLR). After cropping, inverting (to match the other scanner's convention), contrasting, etc the camera image, we got the following results.

    enter image description here

    The low contrast of the camera image is apparent.

    enter image description here

    But the software is able to accurately determine the ridge flow.

    enter image description here

    And we end up finding a decent number of matching minutia (marked with red circles.)

    Here's the bad news. Taking these types of up close shots of the tip of a finger is difficult. I used a DSLR with a flash to achieve these results. Additionally most fingerprint matching algorithms are not scale invariant. So if the finger is farther away from the camera on a subsequent "scan", it may not match the original.

    The software package I used for the visualizations is the excellent and BSD licensed SourceAFIS. No corporate "open source version"/ "paid version" shenanigans either although it's currently only ported to C# and Java (limited).

    Non Camera Based Solutions:

    For the frightening small number of devices that have hardware that support "USB Host Mode" you can write a custom driver to integrate a fingerprint scanner with Android. I'll be honest, for the two models I've done this for it was a huge pain. I accomplished it by using wireshark to sniff USB packets between the scanner and a linux box that had a working driver and then writing an Android driver based on the sniffed commands.

    Cross Compiling FingerJetFX

    Once you have worked out a solution for image acquisition (both potential solutions have their drawbacks) you can start to worry about getting FingerJetFX running on Android. First you'll use their SDK to write a self contained C++ program that takes an image and turns it into a template. After that you really have two options.

    1. Compile it to a library and use JNI to interface with it.
    2. Compile it to an executable and let your Android program call it as a subprocess.

    For either you'll need the NDK. I've never used JNI so I'll defer to the wisdom of others on how best us it. I always tend to choose route #2. For this application I think it's appropriate since you're only really calling the native code to do one thing, template your image. Once you've got your native program running and cross compiled you can use the answer to this question to package it with your android app and call it from your Android code.