[JAVA] Supplying image to Fingerprint, how?

2012-04-05
2014-01-21
  • William van Doorn

    Hello there,

    I'm very delighted I found this library, it was exactly what I needed! Let's
    say I have two fingerprint images I want to compare in Java. I need to make an
    instance of the Fingerprint class and then use setImage() to set the image.
    Though, the argument is in byte, and the javadoc says the following:

    "The format of this image is a simple raw 2D array of bytes. Every byte
    represents shade of gray from black (0) to white (255). When indexing the 2D
    array, Y axis goes first, X axis goes second, e.g. image."

    That sounds pretty clear, but I have no idea how to go from the Image --> 2-d
    byte array conversion? Because they range from it's hard..

    Could anyone help me?

    Thanks in advance,

    William van Doorn

     
  • Robert Važan

    Robert Važan - 2012-04-05

    Hi William,

    Java port doesn't support template extraction. It only implements template
    matching. I will probably have to make this clear in all public documentation.
    Use .NET version, which has an API to directly import either Bitmap or
    BitmapSource. The .NET version also has a tutorial linked from project wiki.

    Kind Regards,

    Robert

     
  • William van Doorn

    Hi Robert,

    Thanks for your information, I have literally no experience with C# but I'll
    try it. Won't it be possible to convert an Image to such array? Couldn't I got
    the way; image -> convert to grayscale image -> get each pixel at (h, w)? I
    might be even interested contributing to the Java port, if that's possible.

    Thanks in advance,

    William

     
  • William van Doorn

    AFAIK a byte in Java isn't able to represent the value 255 because they are
    signed. http://pastie.org/3735430 is an example
    of converting an Image to a 2-dimensional array containg values ranging from
    0-255 but they are ints..

    Is there a fast solution to fix this?

     
  • Robert Važan

    Robert Važan - 2012-04-05

    Hi William,

    The java port isn't just missing some image conversion. That would be trivial.
    Java port is missing half the functionality of the C# version. A fingerprint
    engine consists of template extractor and template matcher. Java has only the
    matcher. C# has both.

    Signed bytes are a minor issue. There are standard workarounds. I wouldn't
    worry about this.

    Kind Regards,

    Robert

     
  • William van Doorn

    Hi Robert,

    I see. I've tried a bit of hacking into the Java source but it didn't work
    either. Guess I will start to learn C# amongst digging into the source code
    and eventually contribute some Java code in the end when I have the full
    understanding of the library.

    Thank you very much! :)

    William van Doorn

     
  • Anonymous - 2012-09-14

    A fingerprint engine consists of template extractor and template matcher.
    Java has only the matcher.

    I suppose this is old news or does it mean the

    extract
    

    method of the

    AfisEngine
    

    class does not do anything?

     
  • Robert Važan

    Robert Važan - 2012-09-14

    Hi,

    Java port lacks native extractor. The extract method merely throws
    UnsupportedOperationException. The java port is still useful in combination
    with C# extractor or when using standard ISO template format.

    Unfortunately Bharavi, who ported the matcher to java, is too busy to do the
    extractor. And my time is used up on maintaining the core .NET SourceAFIS
    code. Unless some other developer steps in, java port will remain a matcher-
    only implementation.

    Kind Regards,

    Robert

     
  • Indiano

    Indiano - 2014-01-16

    Hi,

    Please let me know how are we calculating the matching percentage of any fingerprint as we can see in the AfisExample program , the highest score calculated during the matching process is being compared with the threshold value . Do we need to update the threshold value eveerytime ?
    Hence how should we check for a candidate fingerprint authenticity after the scores calculation ?

    With Regards & Thanks

     
  • Robert Važan

    Robert Važan - 2014-01-17

    Indiano, you should start a new thread and explain in more detail what you are trying to accomplish. As stated, your question doesn't make much sense.

     
  • Indiano

    Indiano - 2014-01-17

    Lets take an example .
    A : Candidate fingerprint
    B : Fingerprint in Database
    C : Fingerprint in Database

    Score for A & B comparison : 180.0
    Score for A & C comparison : 200.0
    threshold value : 25

    What is the logic / mathematics behind whether A exist in the database or not ? How should we calculate A's fingerprint matching percentage against the other fingerprints in the database ?

    In AFISExample code , it will take the maximum score and check whether it is greater than threshold or not ( 200.0 > 25 ) and thereafter it will print C's id detail .

     
  • Robert Važan

    Robert Važan - 2014-01-19

    SourceAFIS is built with assumption that any given person will be registered in the database only once. Match above threshold can happen for multiple enrollees only in case of matching error, which is a rare occurrence with high threshold and fingerprints from the tested readers. In that case, taking the higher score often removes the error since errouneous matches are often only slightly above threashold.

    There is no such thing as matching percentage. SourceAFIS doesn't convert score into FAR/FRR nor any such objective measure.

     
  • Indiano

    Indiano - 2014-01-21

    Thanks for your answer but there is one more question .
    How should one decide about the threshold value ?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks