public final class
FaceLandmarker
Performs face landmarks detection on images.
This API expects a pre-trained face landmarks model asset bundle. See
MPImage
FaceLandmarkerResult
Nested Classes
class | FaceLandmarker.FaceLandmarkerOptions | Options for setting up an FaceLandmarker . |
Fields
public static final Set<Connection> | FACE_LANDMARKS_CONNECTORS | |
public static final Set<Connection> | FACE_LANDMARKS_FACE_OVAL | |
public static final Set<Connection> | FACE_LANDMARKS_LEFT_EYE | |
public static final Set<Connection> | FACE_LANDMARKS_LEFT_EYE_BROW | |
public static final Set<Connection> | FACE_LANDMARKS_LEFT_IRIS | |
public static final Set<Connection> | FACE_LANDMARKS_LIPS | |
public static final Set<Connection> | FACE_LANDMARKS_RIGHT_EYE | |
public static final Set<Connection> | FACE_LANDMARKS_RIGHT_EYE_BROW | |
public static final Set<Connection> | FACE_LANDMARKS_RIGHT_IRIS | |
public static final Set<Connection> | FACE_LANDMARKS_TESSELATION |
Public Methods
static FaceLandmarker |
createFromBuffer(Context context, ByteBuffer modelAssetBuffer)
Creates a
FaceLandmarker instance from a model asset bundle buffer and the default
FaceLandmarker.FaceLandmarkerOptions . |
static FaceLandmarker |
createFromFile(Context context, String modelAssetPath)
Creates a
FaceLandmarker instance from a model asset bundle path and the default FaceLandmarker.FaceLandmarkerOptions . |
static FaceLandmarker |
createFromFile(Context context, File modelAssetFile)
Creates a
FaceLandmarker instance from a model asset bundle file and the default FaceLandmarker.FaceLandmarkerOptions . |
static FaceLandmarker |
createFromOptions(Context context, FaceLandmarker.FaceLandmarkerOptions landmarkerOptions)
Creates a
FaceLandmarker instance from a FaceLandmarker.FaceLandmarkerOptions . |
FaceLandmarkerResult | |
FaceLandmarkerResult |
detect(MPImage image, ImageProcessingOptions imageProcessingOptions)
Performs face landmarks detection on the provided single image.
|
void |
detectAsync(MPImage image, ImageProcessingOptions imageProcessingOptions, long timestampMs)
Sends live image data to perform face landmarks detection, and the results will be available
via the
OutputHandler.ResultListener provided in the FaceLandmarker.FaceLandmarkerOptions . |
void |
detectAsync(MPImage image, long timestampMs)
Sends live image data to perform face landmarks detection with default image processing
options, i.e.
|
FaceLandmarkerResult |
detectForVideo(MPImage image, ImageProcessingOptions imageProcessingOptions, long timestampMs)
Performs face landmarks detection on the provided video frame.
|
FaceLandmarkerResult |
detectForVideo(MPImage image, long timestampMs)
Performs face landmarks detection on the provided video frame with default image processing
options, i.e.
|