Package org.jmrtd.lds.iso19794
Class FingerInfo
- java.lang.Object
-
- org.jmrtd.lds.AbstractLDSInfo
-
- org.jmrtd.lds.AbstractListInfo<FingerImageInfo>
-
- org.jmrtd.lds.iso19794.FingerInfo
-
- All Implemented Interfaces:
Serializable
,BiometricDataBlock
,LDSElement
public class FingerInfo extends AbstractListInfo<FingerImageInfo> implements BiometricDataBlock
Fingerprint general record header and finger image data blocks based on Section 7 and Table 2 of ISO/IEC FCD 19794-4 aka Annex F.- Version:
- $Revision: 1799 $
- Author:
- The JMRTD team ([email protected])
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
COMPRESSION_JPEG
Image compression algorithm type as specified in Section 7.1.13 and Table 3 of ISO 19794-4.static int
COMPRESSION_JPEG2000
Image compression algorithm type as specified in Section 7.1.13 and Table 3 of ISO 19794-4.static int
COMPRESSION_PNG
Image compression algorithm type as specified in Section 7.1.13 and Table 3 of ISO 19794-4.static int
COMPRESSION_UNCOMPRESSED_BIT_PACKED
Image compression algorithm type as specified in Section 7.1.13 and Table 3 of ISO 19794-4.static int
COMPRESSION_UNCOMPRESSED_NO_BIT_PACKING
Image compression algorithm type as specified in Section 7.1.13 and Table 3 of ISO 19794-4.static int
COMPRESSION_WSQ
Image compression algorithm type as specified in Section 7.1.13 and Table 3 of ISO 19794-4.static int
SCALE_UNITS_PPCM
Scale units points per centimeter.static int
SCALE_UNITS_PPI
Scale units points per inch.
-
Constructor Summary
Constructors Constructor Description FingerInfo(int captureDeviceId, int acquisitionLevel, int scaleUnits, int scanResolutionHorizontal, int scanResolutionVertical, int imageResolutionHorizontal, int imageResolutionVertical, int depth, int compressionAlgorithm, List<FingerImageInfo> fingerImageInfos)
Constructs a finger info record.FingerInfo(InputStream inputStream)
Constructs a finger info record.FingerInfo(StandardBiometricHeader sbh, int captureDeviceId, int acquisitionLevel, int scaleUnits, int scanResolutionHorizontal, int scanResolutionVertical, int imageResolutionHorizontal, int imageResolutionVertical, int depth, int compressionAlgorithm, List<FingerImageInfo> fingerImageInfos)
Constructs a finger info record.FingerInfo(StandardBiometricHeader sbh, InputStream inputStream)
Constructs a finger info record.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFingerImageInfo(FingerImageInfo fingerImageInfo)
Adds a finger image info to this finger info.boolean
equals(Object obj)
int
getAcquisitionLevel()
Returns the image acquisition level as specified in Section 7.1.5 and Table 1 of ISO 19794-4.int
getCaptureDeviceId()
Returns the capture device identifier as specified in Section 7.1.4 of ISO 19794-4.int
getCompressionAlgorithm()
Returns the compression algorithm as specified in Section 7.1.13 of ISO 19794-4.int
getDepth()
Returns the pixel depth.List<FingerImageInfo>
getFingerImageInfos()
Returns the finger image infos embedded in this finger info.int
getHorizontalImageResolution()
Returns the rounded image resolution used in the horizontal direction as specified in Section 7.1.10 of ISO 19794-4.int
getHorizontalScanningResolution()
Returns the rounded scanning resolution used in the horizontal direction.int
getScaleUnits()
Returns the units used to describe the scanning and resolution of the image.StandardBiometricHeader
getStandardBiometricHeader()
Returns the standard biometric header of this biometric data block.int
getVerticalImageResolution()
Returns the rounded image resolution used in the vertical direction as specified in Section 7.1.11 of ISO 19794-4.int
getVerticalScanningResolution()
Returns the rounded scanning resolution used in the vertical direction.int
hashCode()
void
readObject(InputStream inputStream)
Reads a finger info from an input stream.void
removeFingerImageInfo(int index)
Removes a finger image info from this finger info.String
toString()
void
writeObject(OutputStream outputStream)
Writes this finger info to an output stream.-
Methods inherited from class org.jmrtd.lds.AbstractLDSInfo
getEncoded
-
Methods inherited from class org.jmrtd.lds.AbstractListInfo
add, addAll, getSubRecords, remove
-
-
-
-
Field Detail
-
SCALE_UNITS_PPI
public static final int SCALE_UNITS_PPI
Scale units points per inch.- See Also:
- Constant Field Values
-
SCALE_UNITS_PPCM
public static final int SCALE_UNITS_PPCM
Scale units points per centimeter.- See Also:
- Constant Field Values
-
COMPRESSION_UNCOMPRESSED_NO_BIT_PACKING
public static final int COMPRESSION_UNCOMPRESSED_NO_BIT_PACKING
Image compression algorithm type as specified in Section 7.1.13 and Table 3 of ISO 19794-4.- See Also:
- Constant Field Values
-
COMPRESSION_UNCOMPRESSED_BIT_PACKED
public static final int COMPRESSION_UNCOMPRESSED_BIT_PACKED
Image compression algorithm type as specified in Section 7.1.13 and Table 3 of ISO 19794-4.- See Also:
- Constant Field Values
-
COMPRESSION_WSQ
public static final int COMPRESSION_WSQ
Image compression algorithm type as specified in Section 7.1.13 and Table 3 of ISO 19794-4.- See Also:
- Constant Field Values
-
COMPRESSION_JPEG
public static final int COMPRESSION_JPEG
Image compression algorithm type as specified in Section 7.1.13 and Table 3 of ISO 19794-4.- See Also:
- Constant Field Values
-
COMPRESSION_JPEG2000
public static final int COMPRESSION_JPEG2000
Image compression algorithm type as specified in Section 7.1.13 and Table 3 of ISO 19794-4.- See Also:
- Constant Field Values
-
COMPRESSION_PNG
public static final int COMPRESSION_PNG
Image compression algorithm type as specified in Section 7.1.13 and Table 3 of ISO 19794-4.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FingerInfo
public FingerInfo(int captureDeviceId, int acquisitionLevel, int scaleUnits, int scanResolutionHorizontal, int scanResolutionVertical, int imageResolutionHorizontal, int imageResolutionVertical, int depth, int compressionAlgorithm, List<FingerImageInfo> fingerImageInfos)
Constructs a finger info record.- Parameters:
captureDeviceId
- capture device identifieracquisitionLevel
- acquisition levelscaleUnits
- scale units, one ofSCALE_UNITS_PPI
,SCALE_UNITS_PPCM
scanResolutionHorizontal
- horizontal scan resolutionscanResolutionVertical
- vertical scan resolutionimageResolutionHorizontal
- horizontal image resolutionimageResolutionVertical
- vertical image resolutiondepth
- image depthcompressionAlgorithm
- compression algorithm, seegetCompressionAlgorithm()
for valid valuesfingerImageInfos
- the image records
-
FingerInfo
public FingerInfo(StandardBiometricHeader sbh, int captureDeviceId, int acquisitionLevel, int scaleUnits, int scanResolutionHorizontal, int scanResolutionVertical, int imageResolutionHorizontal, int imageResolutionVertical, int depth, int compressionAlgorithm, List<FingerImageInfo> fingerImageInfos)
Constructs a finger info record.- Parameters:
sbh
- standard biometric header to usecaptureDeviceId
- capture device identifieracquisitionLevel
- acquisition levelscaleUnits
- scale units, one ofSCALE_UNITS_PPI
,SCALE_UNITS_PPCM
scanResolutionHorizontal
- horizontal scan resolutionscanResolutionVertical
- vertical scan resolutionimageResolutionHorizontal
- horizontal image resolutionimageResolutionVertical
- vertical image resolutiondepth
- image depthcompressionAlgorithm
- compression algorithm, seegetCompressionAlgorithm()
for valid valuesfingerImageInfos
- the image records
-
FingerInfo
public FingerInfo(InputStream inputStream) throws IOException
Constructs a finger info record.- Parameters:
inputStream
- input stream- Throws:
IOException
- on I/O error
-
FingerInfo
public FingerInfo(StandardBiometricHeader sbh, InputStream inputStream) throws IOException
Constructs a finger info record.- Parameters:
sbh
- standard biometric header to useinputStream
- input stream- Throws:
IOException
- on I/O error
-
-
Method Detail
-
getCaptureDeviceId
public int getCaptureDeviceId()
Returns the capture device identifier as specified in Section 7.1.4 of ISO 19794-4. Only the low-order 12 bits are significant.- Returns:
- the capture device identifier
-
getAcquisitionLevel
public int getAcquisitionLevel()
Returns the image acquisition level as specified in Section 7.1.5 and Table 1 of ISO 19794-4. Valid settings are: 10 (125 ppi), 20 (250 ppi), 30 (500 ppi), 31 (500 ppi), 40 (1000 ppi), 41 (1000 ppi).- Returns:
- image acquisition level
-
getScaleUnits
public int getScaleUnits()
Returns the units used to describe the scanning and resolution of the image. EitherPPI
orPPCM
. As specified in Section 7.1.7 of ISO 19794-4.- Returns:
- scale units type
-
getHorizontalScanningResolution
public int getHorizontalScanningResolution()
Returns the rounded scanning resolution used in the horizontal direction. As specified in Section 7.1.8 of ISO 19794-4. Depending ongetScaleUnits()
the result is either in PPI or PPCM.- Returns:
- the horizontal scanning resolution
-
getVerticalScanningResolution
public int getVerticalScanningResolution()
Returns the rounded scanning resolution used in the vertical direction. As specified in Section 7.1.9 of ISO 19794-4. Depending ongetScaleUnits()
the result is either in PPI or PPCM.- Returns:
- the vertical scanning resolution
-
getHorizontalImageResolution
public int getHorizontalImageResolution()
Returns the rounded image resolution used in the horizontal direction as specified in Section 7.1.10 of ISO 19794-4. Depending ongetScaleUnits()
the result is either in PPI or PPCM.- Returns:
- the horizontal image resolution
-
getVerticalImageResolution
public int getVerticalImageResolution()
Returns the rounded image resolution used in the vertical direction as specified in Section 7.1.11 of ISO 19794-4. Depending ongetScaleUnits()
the result is either in PPI or PPCM.- Returns:
- the vertical image resolution
-
getDepth
public int getDepth()
Returns the pixel depth. As specified in Section 7.1.12 of ISO 19794-4. Valid values are between0x01
to0x10
.- Returns:
- the pixel depth
-
getCompressionAlgorithm
public int getCompressionAlgorithm()
Returns the compression algorithm as specified in Section 7.1.13 of ISO 19794-4. One ofCOMPRESSION_UNCOMPRESSED_BIT_PACKED
,COMPRESSION_UNCOMPRESSED_NO_BIT_PACKING
,COMPRESSION_JPEG
,COMPRESSION_JPEG2000
,COMPRESSION_PNG
,COMPRESSION_WSQ
.- Returns:
- a constant representing the used image compression algorithm
-
readObject
public void readObject(InputStream inputStream) throws IOException
Reads a finger info from an input stream.- Specified by:
readObject
in classAbstractListInfo<FingerImageInfo>
- Parameters:
inputStream
- an input stream- Throws:
IOException
- if reading fails
-
writeObject
public void writeObject(OutputStream outputStream) throws IOException
Writes this finger info to an output stream.- Specified by:
writeObject
in classAbstractListInfo<FingerImageInfo>
- Parameters:
outputStream
- an output stream- Throws:
IOException
- if writing fails
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractListInfo<FingerImageInfo>
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractListInfo<FingerImageInfo>
-
getStandardBiometricHeader
public StandardBiometricHeader getStandardBiometricHeader()
Returns the standard biometric header of this biometric data block.- Specified by:
getStandardBiometricHeader
in interfaceBiometricDataBlock
- Returns:
- the standard biometric header
-
getFingerImageInfos
public List<FingerImageInfo> getFingerImageInfos()
Returns the finger image infos embedded in this finger info.- Returns:
- the embedded finger image infos
-
addFingerImageInfo
public void addFingerImageInfo(FingerImageInfo fingerImageInfo)
Adds a finger image info to this finger info.- Parameters:
fingerImageInfo
- the finger image info to add
-
removeFingerImageInfo
public void removeFingerImageInfo(int index)
Removes a finger image info from this finger info.- Parameters:
index
- the index of the finger image info to remove
-
-