Package org.jmrtd.lds.iso19794
Class FingerImageInfo
- java.lang.Object
-
- org.jmrtd.lds.AbstractImageInfo
-
- org.jmrtd.lds.iso19794.FingerImageInfo
-
- All Implemented Interfaces:
Serializable
,ImageInfo
,LDSElement
public class FingerImageInfo extends AbstractImageInfo
Data structure for storing view of a single finger image, multi-finger image, or palm. This represents a finger image record header as specified in Section 7.2 of ISO/IEC FCD 19794-4 aka Annex F. TODO: proper enums for data types- Version:
- $Revision: 1808 $
- Author:
- The JMRTD team ([email protected])
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
IMPRESSION_TYPE_LATENT
Finger or palm impression type, according to Table 7 in ISO 19794-4.static int
IMPRESSION_TYPE_LIVE_SCAN_CONTACTLESS
Finger or palm impression type, according to Table 7 in ISO 19794-4.static int
IMPRESSION_TYPE_LIVE_SCAN_PLAIN
Finger or palm impression type, according to Table 7 in ISO 19794-4.static int
IMPRESSION_TYPE_LIVE_SCAN_ROLLED
Finger or palm impression type, according to Table 7 in ISO 19794-4.static int
IMPRESSION_TYPE_NON_LIVE_SCAN_PLAIN
Finger or palm impression type, according to Table 7 in ISO 19794-4.static int
IMPRESSION_TYPE_NON_LIVE_SCAN_ROLLED
Finger or palm impression type, according to Table 7 in ISO 19794-4.static int
IMPRESSION_TYPE_SWIPE
Finger or palm impression type, according to Table 7 in ISO 19794-4.static int
POSITION_LEFT_FULL_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_LEFT_HYPOTHENAR
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_LEFT_INDEX_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.static int
POSITION_LEFT_INTERDIGITAL
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_LEFT_LITTLE_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.static int
POSITION_LEFT_LOWER_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_LEFT_MIDDLE_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.static int
POSITION_LEFT_OTHER
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_LEFT_RING_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.static int
POSITION_LEFT_THENAR
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_LEFT_THUMB
Finger code, according to Table 5, 7.2.2, ISO 19794-4.static int
POSITION_LEFT_UPPER_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_LEFT_WRITER_S_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_PLAIN_LEFT_FOUR_FINGERS
Finger code, according to Table 5, 7.2.2, ISO 19794-4.static int
POSITION_PLAIN_RIGHT_FOUR_FINGERS
Finger code, according to Table 5, 7.2.2, ISO 19794-4.static int
POSITION_PLAIN_THUMBS
Finger code, according to Table 5, 7.2.2, ISO 19794-4.static int
POSITION_RIGHT_FULL_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_RIGHT_HYPOTHENAR
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_RIGHT_INDEX_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.static int
POSITION_RIGHT_INTERDIGITAL
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_RIGHT_LITTLE_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.static int
POSITION_RIGHT_LOWER_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_RIGHT_MIDDLE_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.static int
POSITION_RIGHT_OTHER
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_RIGHT_RING_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.static int
POSITION_RIGHT_THENAR
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_RIGHT_THUMB
Finger code, according to Table 5, 7.2.2, ISO 19794-4.static int
POSITION_RIGHT_UPPER_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_RIGHT_WRITER_S_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.static int
POSITION_UNKNOWN_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.static int
POSITION_UNKNOWN_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.-
Fields inherited from interface org.jmrtd.lds.ImageInfo
JPEG_MIME_TYPE, JPEG2000_MIME_TYPE, TYPE_FINGER, TYPE_IRIS, TYPE_PORTRAIT, TYPE_SIGNATURE_OR_MARK, TYPE_UNKNOWN, WSQ_MIME_TYPE
-
-
Constructor Summary
Constructors Constructor Description FingerImageInfo(int position, int viewCount, int viewNumber, int quality, int impressionType, int width, int height, InputStream imageBytes, int imageLength, int compressionAlgorithm)
Constructs a finger image info.FingerImageInfo(InputStream inputStream, int compressionAlgorithm)
Constructs a new finger information record.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
getBiometricSubtype()
Returns the biometric sub-type.int
getCompressionAlgorithm()
Returns the compression algorithm.byte[]
getFormatType()
Returns the format type.int
getImpressionType()
Returns the impression type.int
getPosition()
Returns the finger/palm position.int
getQuality()
Returns the quality of the overall scanned finger/palm image as a number between 0 and 100.long
getRecordLength()
Returns the record length.int
getViewCount()
Returns the total number of specific views available for this finger.int
getViewNumber()
Returns the specific image view number associated with the finger.int
hashCode()
protected void
readObject(InputStream inputStream)
Reads this object from a stream.String
toString()
Generates a textual representation of this object.protected void
writeObject(OutputStream out)
Writes the biometric data toout
.-
Methods inherited from class org.jmrtd.lds.AbstractImageInfo
getEncoded, getHeight, getImageInputStream, getImageLength, getMimeType, getType, getWidth, readImage, setHeight, setImageBytes, setMimeType, setType, setWidth, writeImage
-
-
-
-
Field Detail
-
POSITION_UNKNOWN_FINGER
public static final int POSITION_UNKNOWN_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_RIGHT_THUMB
public static final int POSITION_RIGHT_THUMB
Finger code, according to Table 5, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_RIGHT_INDEX_FINGER
public static final int POSITION_RIGHT_INDEX_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_RIGHT_MIDDLE_FINGER
public static final int POSITION_RIGHT_MIDDLE_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_RIGHT_RING_FINGER
public static final int POSITION_RIGHT_RING_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_RIGHT_LITTLE_FINGER
public static final int POSITION_RIGHT_LITTLE_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_LEFT_THUMB
public static final int POSITION_LEFT_THUMB
Finger code, according to Table 5, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_LEFT_INDEX_FINGER
public static final int POSITION_LEFT_INDEX_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_LEFT_MIDDLE_FINGER
public static final int POSITION_LEFT_MIDDLE_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_LEFT_RING_FINGER
public static final int POSITION_LEFT_RING_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_LEFT_LITTLE_FINGER
public static final int POSITION_LEFT_LITTLE_FINGER
Finger code, according to Table 5, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_PLAIN_RIGHT_FOUR_FINGERS
public static final int POSITION_PLAIN_RIGHT_FOUR_FINGERS
Finger code, according to Table 5, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_PLAIN_LEFT_FOUR_FINGERS
public static final int POSITION_PLAIN_LEFT_FOUR_FINGERS
Finger code, according to Table 5, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_PLAIN_THUMBS
public static final int POSITION_PLAIN_THUMBS
Finger code, according to Table 5, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_UNKNOWN_PALM
public static final int POSITION_UNKNOWN_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_RIGHT_FULL_PALM
public static final int POSITION_RIGHT_FULL_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_RIGHT_WRITER_S_PALM
public static final int POSITION_RIGHT_WRITER_S_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_LEFT_FULL_PALM
public static final int POSITION_LEFT_FULL_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_LEFT_WRITER_S_PALM
public static final int POSITION_LEFT_WRITER_S_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_RIGHT_LOWER_PALM
public static final int POSITION_RIGHT_LOWER_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_RIGHT_UPPER_PALM
public static final int POSITION_RIGHT_UPPER_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_LEFT_LOWER_PALM
public static final int POSITION_LEFT_LOWER_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_LEFT_UPPER_PALM
public static final int POSITION_LEFT_UPPER_PALM
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_RIGHT_OTHER
public static final int POSITION_RIGHT_OTHER
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_LEFT_OTHER
public static final int POSITION_LEFT_OTHER
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_RIGHT_INTERDIGITAL
public static final int POSITION_RIGHT_INTERDIGITAL
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_RIGHT_THENAR
public static final int POSITION_RIGHT_THENAR
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_RIGHT_HYPOTHENAR
public static final int POSITION_RIGHT_HYPOTHENAR
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_LEFT_INTERDIGITAL
public static final int POSITION_LEFT_INTERDIGITAL
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_LEFT_THENAR
public static final int POSITION_LEFT_THENAR
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
POSITION_LEFT_HYPOTHENAR
public static final int POSITION_LEFT_HYPOTHENAR
Palm code, according to Table 6, 7.2.2, ISO 19794-4.- See Also:
- Constant Field Values
-
IMPRESSION_TYPE_LIVE_SCAN_PLAIN
public static final int IMPRESSION_TYPE_LIVE_SCAN_PLAIN
Finger or palm impression type, according to Table 7 in ISO 19794-4.- See Also:
- Constant Field Values
-
IMPRESSION_TYPE_LIVE_SCAN_ROLLED
public static final int IMPRESSION_TYPE_LIVE_SCAN_ROLLED
Finger or palm impression type, according to Table 7 in ISO 19794-4.- See Also:
- Constant Field Values
-
IMPRESSION_TYPE_NON_LIVE_SCAN_PLAIN
public static final int IMPRESSION_TYPE_NON_LIVE_SCAN_PLAIN
Finger or palm impression type, according to Table 7 in ISO 19794-4.- See Also:
- Constant Field Values
-
IMPRESSION_TYPE_NON_LIVE_SCAN_ROLLED
public static final int IMPRESSION_TYPE_NON_LIVE_SCAN_ROLLED
Finger or palm impression type, according to Table 7 in ISO 19794-4.- See Also:
- Constant Field Values
-
IMPRESSION_TYPE_LATENT
public static final int IMPRESSION_TYPE_LATENT
Finger or palm impression type, according to Table 7 in ISO 19794-4.- See Also:
- Constant Field Values
-
IMPRESSION_TYPE_SWIPE
public static final int IMPRESSION_TYPE_SWIPE
Finger or palm impression type, according to Table 7 in ISO 19794-4.- See Also:
- Constant Field Values
-
IMPRESSION_TYPE_LIVE_SCAN_CONTACTLESS
public static final int IMPRESSION_TYPE_LIVE_SCAN_CONTACTLESS
Finger or palm impression type, according to Table 7 in ISO 19794-4.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FingerImageInfo
public FingerImageInfo(int position, int viewCount, int viewNumber, int quality, int impressionType, int width, int height, InputStream imageBytes, int imageLength, int compressionAlgorithm) throws IOException
Constructs a finger image info.- Parameters:
position
- finger position according to ISO 19794-4viewCount
- number of viewsviewNumber
- the view numberquality
- qualityimpressionType
- impression type accordign to ISO 19794-4width
- widthheight
- heightimageBytes
- encoded image bytesimageLength
- length of encoded imagecompressionAlgorithm
- image encoding type according to ISO 19794-4- Throws:
IOException
- if input cannot be read
-
FingerImageInfo
public FingerImageInfo(InputStream inputStream, int compressionAlgorithm) throws IOException
Constructs a new finger information record.- Parameters:
inputStream
- input streamcompressionAlgorithm
- image format type (which is given in the general record header, not for each individual image)- Throws:
IOException
- if input cannot be read
-
-
Method Detail
-
getQuality
public int getQuality()
Returns the quality of the overall scanned finger/palm image as a number between 0 and 100. As specified in 7.2.5 of ISO 19794-4.- Returns:
- the quality of the overall scanned finger/palm image as a number between 0 and 100
-
getPosition
public int getPosition()
Returns the finger/palm position. As specified in Section 7.2.2 of ISO 19794-4.- Returns:
- a constant representing the position (see constant definitions starting with
POSITION_
)
-
getCompressionAlgorithm
public int getCompressionAlgorithm()
Returns the compression algorithm. One ofFingerInfo.COMPRESSION_UNCOMPRESSED_BIT_PACKED
,FingerInfo.COMPRESSION_UNCOMPRESSED_NO_BIT_PACKING
,FingerInfo.COMPRESSION_JPEG
,FingerInfo.COMPRESSION_JPEG2000
,FingerInfo.COMPRESSION_PNG
,FingerInfo.COMPRESSION_WSQ
. As specified in Section 7.1.13 of ISO 19794-4.- Returns:
- a constant representing the used image compression algorithm
-
getViewCount
public int getViewCount()
Returns the total number of specific views available for this finger. As specified in Section 7.2.3 of ISO 19794-4.- Returns:
- the total number of specific views available for this finger
-
getViewNumber
public int getViewNumber()
Returns the specific image view number associated with the finger. As specified in Section 7.2.4 of ISO 19794-4.- Returns:
- the specific image view number associated with the finger
-
getImpressionType
public int getImpressionType()
Returns the impression type. As specified in Section 7.2.6 of ISO 19794-4.- Returns:
- a constant indicating the impression type (see constant definitions starting with
IMPRESSION_TYPE_
)
-
readObject
protected void readObject(InputStream inputStream) throws IOException
Description copied from class:AbstractImageInfo
Reads this object from a stream.- Specified by:
readObject
in classAbstractImageInfo
- Parameters:
inputStream
- the stream to read from- Throws:
IOException
- on error reading from the stream
-
writeObject
protected void writeObject(OutputStream out) throws IOException
Writes the biometric data toout
. Based on Table 4 in Section 8.3 of ISO/IEC FCD 19794-4.- Specified by:
writeObject
in classAbstractImageInfo
- Parameters:
out
- stream to write to- Throws:
IOException
- if writing to out fails
-
getRecordLength
public long getRecordLength()
Returns the record length.- Returns:
- the record length
-
getFormatType
public byte[] getFormatType()
Returns the format type.- Returns:
- a byte array of length 2
-
getBiometricSubtype
public int getBiometricSubtype()
Returns the biometric sub-type.- Returns:
- the ICAO/CBEFF (BHT) biometric sub-type
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractImageInfo
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractImageInfo
-
toString
public String toString()
Generates a textual representation of this object.- Overrides:
toString
in classAbstractImageInfo
- Returns:
- a textual representation of this object
- See Also:
Object.toString()
-
-