Contour

public final class Contour extends Object

A set of points that outlines a facial landmark or region such as eye, face, or lips.

When 'left' and 'right' are used, they are relative to the subject. For example, the LEFT_EYE contour is the subject's left eye, not the eye that is on the left when viewing the image.

Constant Summary

int FACE The outline of the subject's face.
int LEFT_EYE The outline of the subject's left eye cavity.
int LEFT_EYEBROW_BOTTOM The bottom outline of the subject's left eyebrow.
int LEFT_EYEBROW_TOP The top outline of the subject's left eyebrow.
int LOWER_LIP_BOTTOM The bottom outline of the subject's lower lip.
int LOWER_LIP_TOP The top outline of the subject's lower lip.
int NOSE_BOTTOM The outline of the subject's nose bridge.
int NOSE_BRIDGE The outline of the subject's nose bridge.
int RIGHT_EYE The outline of the subject's right eye cavity.
int RIGHT_EYEBROW_BOTTOM The bottom outline of the subject's right eyebrow.
int RIGHT_EYEBROW_TOP The top outline of the subject's right eyebrow.
int UPPER_LIP_BOTTOM The bottom outline of the subject's upper lip.
int UPPER_LIP_TOP The top outline of the subject's upper lip.

Public Method Summary

PointF[]
getPositions()
Returns a set of the (x, y) positions of the contour where (0, 0) is the upper-left corner of the image.
int
getType()
Returns the type of contour (LEFT_EYE, RIGHT_EYE, FACE, etc.).

Inherited Method Summary

Constants

public static final int FACE

The outline of the subject's face.

Constant Value: 1

public static final int LEFT_EYE

The outline of the subject's left eye cavity.

Constant Value: 6

public static final int LEFT_EYEBROW_BOTTOM

The bottom outline of the subject's left eyebrow.

Constant Value: 3

public static final int LEFT_EYEBROW_TOP

The top outline of the subject's left eyebrow.

Constant Value: 2

public static final int LOWER_LIP_BOTTOM

The bottom outline of the subject's lower lip.

Constant Value: 11

public static final int LOWER_LIP_TOP

The top outline of the subject's lower lip.

Constant Value: 10

public static final int NOSE_BOTTOM

The outline of the subject's nose bridge.

Constant Value: 13

public static final int NOSE_BRIDGE

The outline of the subject's nose bridge.

Constant Value: 12

public static final int RIGHT_EYE

The outline of the subject's right eye cavity.

Constant Value: 7

public static final int RIGHT_EYEBROW_BOTTOM

The bottom outline of the subject's right eyebrow.

Constant Value: 5

public static final int RIGHT_EYEBROW_TOP

The top outline of the subject's right eyebrow.

Constant Value: 4

public static final int UPPER_LIP_BOTTOM

The bottom outline of the subject's upper lip.

Constant Value: 9

public static final int UPPER_LIP_TOP

The top outline of the subject's upper lip.

Constant Value: 8

Public Methods

public PointF[] getPositions ()

Returns a set of the (x, y) positions of the contour where (0, 0) is the upper-left corner of the image. The points are guaranteed to be within the bounds of the image.

Returns
  • the positions of the contour

public int getType ()

Returns the type of contour (LEFT_EYE, RIGHT_EYE, FACE, etc.).

Returns
  • the type of contour