VerIDFace

Package com.appliedrec.ver_id.model

public class VerIDFace

Implements

Constructor

VerIDFace

Introduced in version 4.0.0

public VerIDFace(FaceTemplate)

Construct a face from a face template

Parameters

faceTemplate com.appliedrec.ver_id.model.FaceTemplate

Throws

java.lang.Exception

Methods

getFbFace

Introduced in version 1.6

public getFbFace()

Alias for getFBFace()

Returns

com.appliedrec.detreclib.detection.FBFace
The underlying face received from the face detector

getFBFace

Introduced in version 1.2

public getFBFace()

Returns

com.appliedrec.detreclib.detection.FBFace
The underlying face received from the face detector

See also

saveTemplate

Introduced in version 1.6.1

public saveTemplate()

Used internally to save the template when it's obtainable

getTemplate

Introduced in version 1.6.1

Deprecated in 4.0.0, use com.appliedrec.ver_id.model.VerIDFace.html#getFaceTemplate() instead

public getTemplate()

Get the face recognition template/signature associated with this face

Returns

float[]
float array representation of the template or null if the template could not be retrieved

See also

getFaceTemplate

Introduced in version 4.0.0

public getFaceTemplate()

Get face template

Returns

com.appliedrec.ver_id.model.FaceTemplate
Face template

getTemplateBase64

Introduced in version 1.6.1

Deprecated in 4.0.0, use com.appliedrec.ver_id.model.VerIDFace.html#getFaceTemplate() instead

public getTemplateBase64()

Get the face recognition template/signature associated with this face represented as base64-encoded string

Returns

java.lang.String
base64 string representation of the template or null if the template could not be retrieved or converted

getId

Introduced in version 1.2

public getId()

The id of the face. Will be null if the face cannot used for face recognition.

Returns

long
id or -1

hasEyes

Introduced in version 1.2

public hasEyes()

Indicates whether this face has accurate eye coordinates.

Returns

boolean
true if Ver-ID detected eyes

getEyeCoordinates

Introduced in version 1.7.1

public getEyeCoordinates()

Returns

android.graphics.PointF[]
Eye coordinates

getNose

Introduced in version 1.0

public getNose()

Returns

android.graphics.PointF

getMouth

Introduced in version 1.0

public getMouth()

Returns

android.graphics.PointF

getBounds

Introduced in version 1.0

public getBounds()

Returns

android.graphics.RectF

getRotation

Introduced in version 1.0

public getRotation()

Returns

com.appliedrec.detreclib.detection.FBFace.Rotation

getCenterOfFace

Introduced in version 1.0

public getCenterOfFace()

Returns

android.graphics.PointF

getEyeCoordinatesRelativeToFace

Introduced in version 1.2

public getEyeCoordinatesRelativeToFace()

Returns

android.graphics.PointF[]

getYawEstimate

Introduced in version 1.2

public getYawEstimate()

Returns

java.lang.Float

getBoundingBox

Introduced in version 1.2

public getBoundingBox()

Returns

android.graphics.RectF

getFaceWidthHeightRatio

Introduced in version 1.2

public getFaceWidthHeightRatio()

Returns

float

getCenter

Introduced in version 1.2

Deprecated in version 1.6

public getCenter()

Get coordinates of the center of the face. The coordinates are expressed as fractions of the width and height of the image.

Returns

android.graphics.PointF
PointF corresponding to the center of face in the image

getBoundingBoxSize

Introduced in version 1.2

Deprecated in version 1.6

public getBoundingBoxSize()

Get coordinates of the bounding box of the face. The coordinates are expressed as fractions of the width and height of the image. This bounding box may be rotated.

Returns

android.graphics.PointF
PointF whose x corresponds to the width of the face bounding box and y corresponds to the height

getYaw

Introduced in version 1.2

public getYaw()

The rotation of the detected face along an imaginary axis leading from the top of the head towards the heels. 0 means the subject is looking straight ahead. Negative angles or angles larger than 180º indicate rotation to the subject's left. Other angles indicate rotation to the subject's right.

Returns

float
yaw in degrees

getPitch

Introduced in version 1.2

public getPitch()

The rotation of the detected face along an imaginary axis leading from left to right ear. 0 means the subject's head is level, looking ahead. Negative angles or angles larger than 180º indicate the subject is looking up. Other angles indicate the subject is looking down.

Returns

float
pitch in degrees

getRoll

Introduced in version 1.0

public getRoll()

The rotation of the selected face along an imaginary axis leading from the nose towards the back of the head. 0 means the subject's head is level. Negative angles or angles larger than 180º indicate the subject tilting her head to the left. Other angles indicate the subject tilting her head right.

Returns

float
roll in degrees

isSuitableForRecognition

Introduced in version 1.2

public isSuitableForRecognition()

Specifies whether the given face is suitable for face recognition. Ver-ID will not register or authenticate an unsuitable face.

Returns

boolean
true if the face can be used for recognition

hasExtractedTemplate

Introduced in version 1.0

public hasExtractedTemplate()

Returns

boolean

isBackgroundProcessing

Introduced in version 1.0

public isBackgroundProcessing()

Returns

boolean

isDiscardable

Introduced in version 1.0

public isDiscardable()

Returns

boolean

isTrackable

Introduced in version 1.2

public isTrackable()

Specifies whether the face contains landmarks like eye and nose coordinates. Determines whether the face is suitable for bearing anti-spoofing.

Returns

boolean
true if the face can be used to determine bearing

getQuality

Introduced in version 1.2

public getQuality()

Specifies the quality of the face detected. The higher, the more symmetrical the face is. Ranges from 0.0 to 1.0.

Returns

float
float representing face quality measure

getNoseCoordinates

Introduced in version 1.2

Deprecated in version 1.6

public getNoseCoordinates()

Specifies x and y coordinates of the nose expressed as fractions of the image width and height respectively. The origin is the top left corner of the image.

Returns

android.graphics.PointF
PointF representing coordinates of nose or null if nose coordinates are not available

getMouthCoordinates

Introduced in version 1.2

Deprecated in version 1.6

public getMouthCoordinates()

Specifies x and y coordinates of the mouth expressed as fractions of the image width and height respectively. The origin is the top left corner of the image.

Returns

android.graphics.PointF
PointF representing coordinates of mouth or null if mouth coordinates are not available

getEyeHeightRelativeToFaceHeight

Introduced in version 1.2

public getEyeHeightRelativeToFaceHeight()

Returns

java.lang.Float

getImageSize

Introduced in version 1.2

Deprecated in version 1.6

public getImageSize()

Returns

android.graphics.PointF

toJSON

Introduced in version 4.0.0

public toJSON()

Returns

org.json.JSONObject
Face encoded to a JSON object

Throws

org.json.JSONException

fromJSON

Introduced in version 4.0.0

public static fromJSON(JSONObject)

Factory method for creating a face from a JSON object

Parameters

jsonObject org.json.JSONObject
Face encoded to JSON object

Returns

com.appliedrec.ver_id.model.VerIDFace
Ver-ID face

Throws

java.lang.Exception
If the face cannot be decoded