Create image from ISO/IEC 19794-4 image data file
Asked Answered
L

5

8

I am having a Bio metric finger print scanning device and we are able to read the data scanned by image. Now we have to make the image in accordace with the ISO compliance i.e. we have to add the Binary Data Interchange Record(BDIR) with the image data to follow the data record interchange format as specified in ISO/IEC 19794-4:2011.

UPDATE: I have an ISO/IEC 19794-4 image data file. I have to make image from the data. Now the data has the additional General header and Representation header information along with image data. How can I make image from this data. Should I just extract the image data from ISO/IEC 19794-4 image data and show it on screen?

OR

What is the proper way of creating and showing image from ISO/IEC 19794-4 image data file.

Thanks in advance

Leyden answered 28/5, 2013 at 8:22 Comment(2)
Shouldn't the Standard Document for ISO 19794-4 tell you this? Or am I missing something. I don't know the contents of the document, but I'd expect that to be defined there.Planarian
@Planarian yes I have the document but from the document what I understand is that I should put image data with the BDIR header. But I want to know how do people/biometric device process the image with bdir information.Leyden
W
4

You can get inspiration from the source code of JMRTD. Especially the FingerImageInfo.java file.

Wingspan answered 3/6, 2013 at 13:2 Comment(0)
H
1

If you see Table B-2 of ISO 19794-4, have an example of file were uncompressed image data will be from 15th bytes from end of file. But this depends of what compression algorithm is been used: WSQ, JPEG, JPEG2000 or PNG. I don`t know a commercial or opensource libray that take an ISO file and converts to image.

Needs to read entire specification to understand this standard. It`s like a normal image file, have a header telling somethings about image and after that the pixel data. But if you see annex B maybe you can understand better this standard.

I already work with this standard and we have a library developed by us to use it. If you need more specific question, please ask and I will try answer without violating my NDA at work.

Hounding answered 5/6, 2013 at 21:8 Comment(3)
thanks for the help.I am struck at capturing date and time. According to ISO example they are encoding "December 15,2005 at 17:35:19.000" as "07D5 0C 0F 11 23 13 0000Hex". I am not getting how they are doing it. Could you guide me?Leyden
I do not know the standard - but it looks like hexadecimal numbers to me. 0x07d5=2005, 0x0C=12, 0x0F=15, 0x11=17, 0x23=35, 0x23=19. Straight forward ;-).Wingspan
@Wingspan Yes i got that point. But as per defined in ISO19794-4 document "The capture date and time field shall be encoded in accordance to the requirements given in ISO/IEC 19794-1." So I want to know about the same.Leyden
H
1

Disclaimer: I don't know the spec.

Anyway, if @Celino is right about the offsets and the formats for the image data you should be able to show the images fairly easy. ImageIO can read the data if it's either JPEG (JFIF) or PNG. If it's JPEG2000, you might need JAI (jai-imageio) to read it. However, if it's WSQ, I'm not sure if there's a plugin or Java library available.

Hanafee answered 8/6, 2013 at 22:3 Comment(1)
Yes, you are right. With ImageIO will be easy to read it. To WSQ, I already saw a plugin used by another developer in a project I worked. But I don`t know about license of this plugin.Hounding
P
0

There are some commercial libs available to decode WSQ, search for Neurotechnology, Cognaxon ... All these are native C libs so you need to integrate them via JNI.

Platitudinous answered 13/3, 2014 at 9:25 Comment(0)
R
0

If you are using Secugen fingerprint scanner you can use this method It's working for me. Here you should pass image width, height, file path and JSGPLib object. My import's: enter code here

import java.awt.image.BufferedImage;
import java.awt.image.*;
import java.awt.*;
import java.awt.color.ColorSpace;
import javax.imageio.ImageIO;
import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public void getImageIconF(int imageWidth, int imageHeight, JSGFPLib sgfplib, String path) {
        int[] quality = new int[1];
        long nfiqvalue;
        BufferedImage img1gray = new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_BYTE_GRAY);
        byte[] imageBuffer1 = ((java.awt.image.DataBufferByte) img1gray.getRaster().getDataBuffer()).getData();
        sgfplib.GetImageEx(imageBuffer1, 10 * 1000, 0, 50);
        try {
            ImageIO.write(img1gray, "PNG", new File(path));
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        
    }
Rosettarosette answered 11/5, 2023 at 4:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.