Class FaceImageInfo

  • All Implemented Interfaces:
    Serializable, ImageInfo, LDSElement

    public class FaceImageInfo
    extends AbstractImageInfo
    Data structure for storing facial image data. This represents a facial record data block as specified in Section 5.5, 5.6, and 5.7 of ISO/IEC FCD 19794-5 (2004-03-22, AKA Annex D). A facial record data block contains a single facial image.
    Version:
    $Revision: 1808 $
    Author:
    The JMRTD team ([email protected])
    See Also:
    Serialized Form
    • Constructor Detail

      • FaceImageInfo

        public FaceImageInfo​(net.sf.scuba.data.Gender gender,
                             FaceImageInfo.EyeColor eyeColor,
                             int featureMask,
                             int hairColor,
                             int expression,
                             int[] poseAngle,
                             int[] poseAngleUncertainty,
                             int faceImageType,
                             int colorSpace,
                             int sourceType,
                             int deviceType,
                             int quality,
                             FaceImageInfo.FeaturePoint[] featurePoints,
                             int width,
                             int height,
                             InputStream imageInputStream,
                             int imageLength,
                             int imageDataType)
                      throws IOException
        Constructs a new face information data structure instance.
        Parameters:
        gender - gender
        eyeColor - eye color
        featureMask - feature mask (least significant 3 bytes)
        hairColor - hair color
        expression - expression
        poseAngle - (encoded) pose angle
        poseAngleUncertainty - pose angle uncertainty
        faceImageType - face image type
        colorSpace - color space
        sourceType - source type
        deviceType - capture device type (unspecified is 0x00)
        quality - quality
        featurePoints - feature points
        width - width
        height - height
        imageInputStream - encoded image bytes
        imageLength - length of encoded image
        imageDataType - either IMAGE_DATA_TYPE_JPEG or IMAGE_DATA_TYPE_JPEG2000
        Throws:
        IOException - on error reading input
      • FaceImageInfo

        public FaceImageInfo​(InputStream inputStream)
                      throws IOException
        Constructs a new face information structure from binary encoding.
        Parameters:
        inputStream - an input stream
        Throws:
        IOException - if input cannot be read
    • Method Detail

      • getRecordLength

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

        public FaceImageInfo.FeaturePoint[] getFeaturePoints()
        Returns the available feature points of this face.
        Returns:
        feature points
      • getExpression

        public int getExpression()
        Returns the expression (neutral, smiling, eyebrow raised, etc).
        Returns:
        expression
      • getEyeColor

        public FaceImageInfo.EyeColor getEyeColor()
        Returns the eye color (black, blue, brown, etc).
        Returns:
        eye color
      • getGender

        public net.sf.scuba.data.Gender getGender()
        Returns the gender (male, female, etc).
        Returns:
        gender
      • getHairColor

        public int getHairColor()
        Returns the hair color (bald, black, blonde, etc).
        Returns:
        hair color
      • getFaceImageType

        public int getFaceImageType()
        Returns the face image type (full frontal, token frontal, etc).
        Returns:
        face image type
      • getFeatureMask

        public int getFeatureMask()
        Returns the feature mask.
        Returns:
        feature mask
      • getQuality

        public int getQuality()
        Returns the quality as unsigned integer.
        Returns:
        quality
      • getSourceType

        public int getSourceType()
        Returns the source type (camera, scanner, etc).
        Returns:
        source type
      • getImageDataType

        public int getImageDataType()
        Returns the image data type.
        Returns:
        image data type
      • getColorSpace

        public int getColorSpace()
        Returns the image color space (rgb, grayscale, etc).
        Returns:
        image color space
      • getDeviceType

        public int getDeviceType()
        Returns the device type.
        Returns:
        device type
      • getPoseAngle

        public int[] getPoseAngle()
        Returns the pose angle as an integer array of length 3, containing yaw, pitch, and roll angle in encoded form.
        Returns:
        an integer array of length 3
      • getPoseAngleUncertainty

        public int[] getPoseAngleUncertainty()
        Returns the pose angle uncertainty as an integer array of length 3, containing yaw, pitch, and roll angle uncertainty.
        Returns:
        an integer array of length 3