java.lang.Object | |
↳ | com.google.android.gms.vision.face.FaceDetector.Builder |
Builder for creating face detector instances.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a face detector builder with the supplied context.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builds a face detector instance.
| |||||||||||
Indicates whether to run additional classifiers for characterizing attributes such as
“smiling” and “eyes open”.
| |||||||||||
Sets whether to detect no landmarks or all landmarks.
| |||||||||||
Extended option for controlling additional accuracy / speed trade-offs in performing face
detection.
| |||||||||||
Indicates whether to detect all faces, or to only detect the most prominent face (i.e., a
large face that is most central within the frame).
| |||||||||||
Enables or disables face tracking, which will maintain a consistent ID for each face when
processing consecutive frames.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Creates a face detector builder with the supplied context.
Indicates whether to run additional classifiers for characterizing attributes such as
“smiling” and “eyes open”. Default: NO_CLASSIFICATIONS
classificationType | the subset of classifiers to use. One of
NO_CLASSIFICATIONS or ALL_CLASSIFICATIONS . |
---|
IllegalArgumentException | if classificationType is invalid. |
---|
Sets whether to detect no landmarks or all landmarks. Processing time increases as the
number of landmarks to search for increases, so detecting all landmarks will increase the
overall detection time. Detecting landmarks can improve pose estimation.
Default: NO_LANDMARKS
landmarkType | the type of landmark detector to use. One of
NO_LANDMARKS or ALL_LANDMARKS . |
---|
IllegalArgumentException | if an invalid landmark detector type is provided |
---|
Extended option for controlling additional accuracy / speed trade-offs in performing face
detection. In general, choosing the more accurate mode will generally result in longer
runtime, whereas choosing the faster mode will generally result in detecting fewer faces.
Default: FAST_MODE
mode | fast/accurate trade-off mode. One of FAST_MODE or
ACCURATE_MODE . |
---|
IllegalArgumentException | if mode is invalid. |
---|
Indicates whether to detect all faces, or to only detect the most prominent face (i.e., a large face that is most central within the frame). Default: false
By default, there is no limit in the number of faces detected. Setting this value to true can increase the speed of the detector since the detector does not need to search exhaustively for all faces.
Enables or disables face tracking, which will maintain a consistent ID for each face when processing consecutive frames. Default: true
If your code uses a MultiProcessor
or
FocusingProcessor
instance, tracking must be
enabled. Having tracking enabled is also recommended for handling live video.
Tracking should be disabled for handling a series of non-consecutive still images.