JMRTD 0.4.6

org.jmrtd.lds
Class FaceInfo

java.lang.Object
  extended by org.jmrtd.lds.DisplayedImageInfo
      extended by org.jmrtd.lds.FaceInfo

public class FaceInfo
extends DisplayedImageInfo

Data structure for storing face information as found in DG2. Coding is based on ISO/IEC FCD 19794-5 (2004-03-22).

Version:
$Revision: 1271 $
Author:
Martijn Oostdijk (martijn.oostdijk@gmail.com)

Nested Class Summary
static class FaceInfo.Expression
          Expression code based on Section 5.5.7 of ISO 19794-5.
static class FaceInfo.EyeColor
          Eye color code based on Section 5.5.4 of ISO 19794-5.
static class FaceInfo.FaceImageType
          Face image type code based on Section 5.7.1 of ISO 19794-5.
static class FaceInfo.FeaturePoint
          Feature points as described in Section 5.6.3 of ISO/IEC FCD 19794-5.
static class FaceInfo.Features
          Feature flags meaning based on Section 5.5.6 of ISO 19794-5.
static class FaceInfo.HairColor
          Hair color code based on Section 5.5.5 of ISO 19794-5.
static class FaceInfo.ImageColorSpace
          Color space code based on Section 5.7.4 of ISO 19794-5.
static class FaceInfo.ImageData
          Image data type code based on Section 5.7.2 of ISO 19794-5.
static class FaceInfo.SourceType
          Source type based on Section 5.7.6 of ISO 19794-5.
 
Field Summary
static short EXPRESSION_EYES_LOOKING_AWAY
           
static short EXPRESSION_FROWNING
           
static short EXPRESSION_NEUTRAL
           
static short EXPRESSION_RAISED_EYEBROWS
           
static short EXPRESSION_SMILE_CLOSED
           
static short EXPRESSION_SMILE_OPEN
           
static short EXPRESSION_SQUINTING
           
static short EXPRESSION_UNSPECIFIED
           
static int EYE_COLOR_BLACK
           
static int EYE_COLOR_BLUE
           
static int EYE_COLOR_BROWN
           
static int EYE_COLOR_GRAY
           
static int EYE_COLOR_GREEN
           
static int EYE_COLOR_MULTI_COLORED
           
static int EYE_COLOR_PINK
           
static int EYE_COLOR_UNKNOWN
           
static int EYE_COLOR_UNSPECIFIED
           
static int FACE_IMAGE_TYPE_BASIC
           
static int FACE_IMAGE_TYPE_FULL_FRONTAL
           
static int FACE_IMAGE_TYPE_OTHER
           
static int FACE_IMAGE_TYPE_TOKEN_FRONTAL
           
static int FACE_IMAGE_TYPE_UNSPECIFIED
           
static int HAIR_COLOR_BALD
           
static int HAIR_COLOR_BLACK
           
static int HAIR_COLOR_BLONDE
           
static int HAIR_COLOR_BLUE
           
static int HAIR_COLOR_BROWN
           
static int HAIR_COLOR_GRAY
           
static int HAIR_COLOR_GREEN
           
static int HAIR_COLOR_RED
           
static int HAIR_COLOR_UNKNOWN
           
static int HAIR_COLOR_UNSPECIFIED
           
static int HAIR_COLOR_WHITE
           
static int IMAGE_COLOR_SPACE_GRAY8
           
static int IMAGE_COLOR_SPACE_OTHER
           
static int IMAGE_COLOR_SPACE_RGB24
           
static int IMAGE_COLOR_SPACE_UNSPECIFIED
           
static int IMAGE_COLOR_SPACE_YUV422
           
static int SOURCE_TYPE_STATIC_PHOTO_DIGITAL_CAM
           
static int SOURCE_TYPE_STATIC_PHOTO_SCANNER
           
static int SOURCE_TYPE_STATIC_PHOTO_UNKNOWN_SOURCE
           
static int SOURCE_TYPE_UNKNOWN
           
static int SOURCE_TYPE_UNSPECIFIED
           
static int SOURCE_TYPE_VIDEO_FRAME_ANALOG_CAM
           
static int SOURCE_TYPE_VIDEO_FRAME_DIGITAL_CAM
           
static int SOURCE_TYPE_VIDEO_FRAME_UNKNOWN_SOURCE
           
 
Fields inherited from class org.jmrtd.lds.DisplayedImageInfo
type, TYPE_FINGER, TYPE_IRIS, TYPE_PORTRAIT, TYPE_SIGNATURE_OR_MARK
 
Constructor Summary
FaceInfo(Gender gender, FaceInfo.EyeColor eyeColor, int hairColor, short expression, int sourceType, BufferedImage image)
          Constructs a new face information data structure instance.
 
Method Summary
 void addImageReadUpdateListener(ImageReadUpdateListener l)
          Adds a listener which will be notified when new image data is available.
 int getDeviceType()
          Gets the device type.
 byte[] getEncoded()
           
 short getExpression()
          Gets the expression (neutral, smiling, eyebrow raised, etc).
 FaceInfo.EyeColor getEyeColor()
          Gets the eye color (black, blue, brown, etc).
 int getFaceImageType()
          Gets the face image type (full frontal, token frontal, etc).
 FaceInfo.FeaturePoint[] getFeaturePoints()
          Gets the available feature points of this face.
 Gender getGender()
          Gets the gender (male, female, etc).
 int getHairColor()
          Gets the hair color (bald, black, blonde, etc).
 int getHeight()
          Gets the height of this face.
 BufferedImage getImage()
           
 BufferedImage getImage(boolean isProgressiveMode)
          Gets the image.
 int getImageColorSpace()
          Gets the image color space (rgb, grayscale, etc).
 int[] getPoseAngle()
          Gets the pose angle as an integer array of length 3, containing yaw, pitch, and roll angle in degrees.
 int[] getPoseAngleUncertainty()
          Gets the pose angle uncertainty as an integer array of length 3, containing yaw, pitch, and roll angle uncertainty in degrees.
 int getQuality()
          Gets the quality as unsigned integer.
 int getSourceType()
          Gets the source type (camera, scanner, etc).
 int getWidth()
          Gets the width of this face.
 void removeImageReadUpdateListener(ImageReadUpdateListener l)
          Removes a listener.
 String toString()
          Generates a textual representation of this object.
 
Methods inherited from class org.jmrtd.lds.DisplayedImageInfo
getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EYE_COLOR_UNSPECIFIED

public static final int EYE_COLOR_UNSPECIFIED
See Also:
Constant Field Values

EYE_COLOR_BLACK

public static final int EYE_COLOR_BLACK
See Also:
Constant Field Values

EYE_COLOR_BLUE

public static final int EYE_COLOR_BLUE
See Also:
Constant Field Values

EYE_COLOR_BROWN

public static final int EYE_COLOR_BROWN
See Also:
Constant Field Values

EYE_COLOR_GRAY

public static final int EYE_COLOR_GRAY
See Also:
Constant Field Values

EYE_COLOR_GREEN

public static final int EYE_COLOR_GREEN
See Also:
Constant Field Values

EYE_COLOR_MULTI_COLORED

public static final int EYE_COLOR_MULTI_COLORED
See Also:
Constant Field Values

EYE_COLOR_PINK

public static final int EYE_COLOR_PINK
See Also:
Constant Field Values

EYE_COLOR_UNKNOWN

public static final int EYE_COLOR_UNKNOWN
See Also:
Constant Field Values

HAIR_COLOR_UNSPECIFIED

public static final int HAIR_COLOR_UNSPECIFIED
See Also:
Constant Field Values

HAIR_COLOR_BALD

public static final int HAIR_COLOR_BALD
See Also:
Constant Field Values

HAIR_COLOR_BLACK

public static final int HAIR_COLOR_BLACK
See Also:
Constant Field Values

HAIR_COLOR_BLONDE

public static final int HAIR_COLOR_BLONDE
See Also:
Constant Field Values

HAIR_COLOR_BROWN

public static final int HAIR_COLOR_BROWN
See Also:
Constant Field Values

HAIR_COLOR_GRAY

public static final int HAIR_COLOR_GRAY
See Also:
Constant Field Values

HAIR_COLOR_WHITE

public static final int HAIR_COLOR_WHITE
See Also:
Constant Field Values

HAIR_COLOR_RED

public static final int HAIR_COLOR_RED
See Also:
Constant Field Values

HAIR_COLOR_GREEN

public static final int HAIR_COLOR_GREEN
See Also:
Constant Field Values

HAIR_COLOR_BLUE

public static final int HAIR_COLOR_BLUE
See Also:
Constant Field Values

HAIR_COLOR_UNKNOWN

public static final int HAIR_COLOR_UNKNOWN
See Also:
Constant Field Values

EXPRESSION_UNSPECIFIED

public static final short EXPRESSION_UNSPECIFIED
See Also:
Constant Field Values

EXPRESSION_NEUTRAL

public static final short EXPRESSION_NEUTRAL
See Also:
Constant Field Values

EXPRESSION_SMILE_CLOSED

public static final short EXPRESSION_SMILE_CLOSED
See Also:
Constant Field Values

EXPRESSION_SMILE_OPEN

public static final short EXPRESSION_SMILE_OPEN
See Also:
Constant Field Values

EXPRESSION_RAISED_EYEBROWS

public static final short EXPRESSION_RAISED_EYEBROWS
See Also:
Constant Field Values

EXPRESSION_EYES_LOOKING_AWAY

public static final short EXPRESSION_EYES_LOOKING_AWAY
See Also:
Constant Field Values

EXPRESSION_SQUINTING

public static final short EXPRESSION_SQUINTING
See Also:
Constant Field Values

EXPRESSION_FROWNING

public static final short EXPRESSION_FROWNING
See Also:
Constant Field Values

FACE_IMAGE_TYPE_UNSPECIFIED

public static final int FACE_IMAGE_TYPE_UNSPECIFIED
See Also:
Constant Field Values

FACE_IMAGE_TYPE_BASIC

public static final int FACE_IMAGE_TYPE_BASIC
See Also:
Constant Field Values

FACE_IMAGE_TYPE_FULL_FRONTAL

public static final int FACE_IMAGE_TYPE_FULL_FRONTAL
See Also:
Constant Field Values

FACE_IMAGE_TYPE_TOKEN_FRONTAL

public static final int FACE_IMAGE_TYPE_TOKEN_FRONTAL
See Also:
Constant Field Values

FACE_IMAGE_TYPE_OTHER

public static final int FACE_IMAGE_TYPE_OTHER
See Also:
Constant Field Values

IMAGE_COLOR_SPACE_UNSPECIFIED

public static final int IMAGE_COLOR_SPACE_UNSPECIFIED
See Also:
Constant Field Values

IMAGE_COLOR_SPACE_RGB24

public static final int IMAGE_COLOR_SPACE_RGB24
See Also:
Constant Field Values

IMAGE_COLOR_SPACE_YUV422

public static final int IMAGE_COLOR_SPACE_YUV422
See Also:
Constant Field Values

IMAGE_COLOR_SPACE_GRAY8

public static final int IMAGE_COLOR_SPACE_GRAY8
See Also:
Constant Field Values

IMAGE_COLOR_SPACE_OTHER

public static final int IMAGE_COLOR_SPACE_OTHER
See Also:
Constant Field Values

SOURCE_TYPE_UNSPECIFIED

public static final int SOURCE_TYPE_UNSPECIFIED
See Also:
Constant Field Values

SOURCE_TYPE_STATIC_PHOTO_UNKNOWN_SOURCE

public static final int SOURCE_TYPE_STATIC_PHOTO_UNKNOWN_SOURCE
See Also:
Constant Field Values

SOURCE_TYPE_STATIC_PHOTO_DIGITAL_CAM

public static final int SOURCE_TYPE_STATIC_PHOTO_DIGITAL_CAM
See Also:
Constant Field Values

SOURCE_TYPE_STATIC_PHOTO_SCANNER

public static final int SOURCE_TYPE_STATIC_PHOTO_SCANNER
See Also:
Constant Field Values

SOURCE_TYPE_VIDEO_FRAME_UNKNOWN_SOURCE

public static final int SOURCE_TYPE_VIDEO_FRAME_UNKNOWN_SOURCE
See Also:
Constant Field Values

SOURCE_TYPE_VIDEO_FRAME_ANALOG_CAM

public static final int SOURCE_TYPE_VIDEO_FRAME_ANALOG_CAM
See Also:
Constant Field Values

SOURCE_TYPE_VIDEO_FRAME_DIGITAL_CAM

public static final int SOURCE_TYPE_VIDEO_FRAME_DIGITAL_CAM
See Also:
Constant Field Values

SOURCE_TYPE_UNKNOWN

public static final int SOURCE_TYPE_UNKNOWN
See Also:
Constant Field Values
Constructor Detail

FaceInfo

public FaceInfo(Gender gender,
                FaceInfo.EyeColor eyeColor,
                int hairColor,
                short expression,
                int sourceType,
                BufferedImage image)
Constructs a new face information data structure instance.

Parameters:
gender - gender
eyeColor - eye color
hairColor - hair color
expression - expression
sourceType - source type
image - image
Method Detail

getEncoded

public byte[] getEncoded()

getImage

public BufferedImage getImage(boolean isProgressiveMode)
Gets the image.

Overrides:
getImage in class DisplayedImageInfo
Returns:
image

getImage

public BufferedImage getImage()
Overrides:
getImage in class DisplayedImageInfo

getFeaturePoints

public FaceInfo.FeaturePoint[] getFeaturePoints()
Gets the available feature points of this face.

Returns:
feature points

toString

public String toString()
Generates a textual representation of this object.

Overrides:
toString in class Object
Returns:
a textual representation of this object
See Also:
Object.toString()

getWidth

public int getWidth()
Gets the width of this face.

Returns:
width

getHeight

public int getHeight()
Gets the height of this face.

Returns:
height;

getExpression

public short getExpression()
Gets the expression (neutral, smiling, eyebrow raised, etc).

Returns:
expression

getEyeColor

public FaceInfo.EyeColor getEyeColor()
Gets the eye color (black, blue, brown, etc).

Returns:
eye color

getGender

public Gender getGender()
Gets the gender (male, female, etc).

Returns:
gender

getHairColor

public int getHairColor()
Gets the hair color (bald, black, blonde, etc).

Returns:
hair color

getFaceImageType

public int getFaceImageType()
Gets the face image type (full frontal, token frontal, etc).

Returns:
face image type

getQuality

public int getQuality()
Gets the quality as unsigned integer.

Returns:
quality

getSourceType

public int getSourceType()
Gets the source type (camera, scanner, etc).

Returns:
source type

getImageColorSpace

public int getImageColorSpace()
Gets the image color space (rgb, grayscale, etc).

Returns:
image color space

getDeviceType

public int getDeviceType()
Gets the device type.

Returns:
device type

getPoseAngle

public int[] getPoseAngle()
Gets the pose angle as an integer array of length 3, containing yaw, pitch, and roll angle in degrees.

Returns:
an integer array of length 3

getPoseAngleUncertainty

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

Returns:
an integer array of length 3

addImageReadUpdateListener

public void addImageReadUpdateListener(ImageReadUpdateListener l)
Adds a listener which will be notified when new image data is available.

Parameters:
l - the listener

removeImageReadUpdateListener

public void removeImageReadUpdateListener(ImageReadUpdateListener l)
Removes a listener.

Parameters:
l - the listener

JMRTD 0.4.6