public static interface Detector.Detection
Modifier and Type | Method and Description |
---|---|
void |
onFaceDetectionStarted()
Indicates that the face detector has started tracking a face.
|
void |
onFaceDetectionStopped()
Indicates that the face detector has stopped tracking a face.
|
void |
onImageResults(java.util.List<Metric> metrics,
Frame image,
double timeOfOccurence)
Contains information for facial expressions detected for a particular frame.
|
void |
onProcessingFinished()
Indicates that the face detector has processed the video.
|
void onProcessingFinished()
void onFaceDetectionStarted()
void onFaceDetectionStopped()
void onImageResults(java.util.List<Metric> metrics, Frame image, double timeOfOccurence)
Metric
objects. The number of objects passed equals to the number of
facial expressions enabled when the detector was initialized, plus one if the face points have been requested
(see DetectorAPI.setReturnFacePoints(boolean)
).
A reference to the actual Frame
that was analyzed is passed as well. This can be useful for
displaying in a view or doing other relevant processing.
The time into the stream that the facial expression occurred is also available. This is a relative time,
indicating the number of seconds into the processing stream that the frame occurred.
This method will also be called if captured frame did not result in the detection of any metrics. This may
happen for when no face is detected. In this case the list of Metric objects will be nil.metrics
- A list of Metric
objects which represents the facial expressions that were expressed.
null
if unprocessed frame (setSendUnprocessedFrames set to true
) Each Metric
is Float.NaN
if no face found.image
- A reference to the Frame
which was analyzed.timeOfOccurence
- The time into the stream that the facial expression was expressed, in seconds.