Class 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: 1765 $
    Author:
    The JMRTD team ([email protected])
    See Also:
    Serialized Form
    • 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-4
        viewCount - number of views
        viewNumber - the view number
        quality - quality
        impressionType - impression type accordign to ISO 19794-4
        width - width
        height - height
        imageBytes - encoded image bytes
        imageLength - length of encoded image
        compressionAlgorithm - 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 stream
        compressionAlgorithm - 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()
        Gets 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()
        Gets 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_)
      • getViewCount

        public int getViewCount()
        Gets 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()
        Gets 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()
        Gets 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_)
      • writeObject

        protected void writeObject​(OutputStream out)
                            throws IOException
        Writes the biometric data to out. Based on Table 4 in Section 8.3 of ISO/IEC FCD 19794-4.
        Specified by:
        writeObject in class AbstractImageInfo
        Parameters:
        out - stream to write to
        Throws:
        IOException - if writing to out fails
      • getRecordLength

        public long getRecordLength()
        Gets the record length.
        Returns:
        the record length
      • getFormatType

        public byte[] getFormatType()
        Gets the format type.
        Returns:
        a byte array of length 2
      • getBiometricSubtype

        public int getBiometricSubtype()
        Gets the biometric sub-type.
        Returns:
        the ICAO/CBEFF (BHT) biometric sub-type