libcamera: control_ids_draft: Add face detection controls

Add FaceDetectMode, FaceDetectFaceRectangles, FaceDetectFaceScores,
and FaceDetectFaceLandmark. Also add ControlTypePoint for supporting
FaceDetectFaceLandmark.

Signed-off-by: Yudhistira Erlandinata <yerlandinata@chromium.org>
Co-developed-by: Becker Hsieh <beckerh@chromium.org>
Co-developed-by: Harvey Yang <chenghaoyang@chromium.org>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Harvey Yang <chenghaoyang@chromium.org>
This commit is contained in:
Yudhistira Erlandinata
2024-09-25 08:12:25 +00:00
committed by Jacopo Mondi
parent 200d535ca8
commit dada914339

View File

@@ -227,4 +227,86 @@ controls:
value. All of the custom test patterns will be static (that is the
raw image must not vary from frame to frame).
- FaceDetectMode:
type: int32_t
description: |
Control to select the face detection mode used by the pipeline.
Currently identical to ANDROID_STATISTICS_FACE_DETECT_MODE.
\sa FaceDetectFaceRectangles
\sa FaceDetectFaceScores
\sa FaceDetectFaceLandmarks
\sa FaceDetectFaceIds
enum:
- name: FaceDetectModeOff
value: 0
description: |
Pipeline doesn't perform face detection and doesn't report any
control related to face detection.
- name: FaceDetectModeSimple
value: 1
description: |
Pipeline performs face detection and reports the
FaceDetectFaceRectangles and FaceDetectFaceScores controls for each
detected face. FaceDetectFaceLandmarks and FaceDetectFaceIds are
optional.
- name: FaceDetectModeFull
value: 2
description: |
Pipeline performs face detection and reports all the controls
related to face detection including FaceDetectFaceRectangles,
FaceDetectFaceScores, FaceDetectFaceLandmarks, and
FaceDeteceFaceIds for each detected face.
- FaceDetectFaceRectangles:
type: Rectangle
description: |
Boundary rectangles of the detected faces. The number of values is
the number of detected faces.
The FaceDetectFaceRectangles control can only be returned in metadata.
Currently identical to ANDROID_STATISTICS_FACE_RECTANGLES.
size: [n]
- FaceDetectFaceScores:
type: uint8_t
description: |
Confidence score of each of the detected faces. The range of score is
[0, 100]. The number of values should be the number of faces reported
in FaceDetectFaceRectangles.
The FaceDetectFaceScores control can only be returned in metadata.
Currently identical to ANDROID_STATISTICS_FACE_SCORES.
size: [n]
- FaceDetectFaceLandmarks:
type: Point
description: |
Array of human face landmark coordinates in format [..., left_eye_i,
right_eye_i, mouth_i, left_eye_i+1, ...], with i = index of face. The
number of values should be 3 * the number of faces reported in
FaceDetectFaceRectangles.
The FaceDetectFaceLandmarks control can only be returned in metadata.
Currently identical to ANDROID_STATISTICS_FACE_LANDMARKS.
size: [n]
- FaceDetectFaceIds:
type: int32_t
description: |
Each detected face is given a unique ID that is valid for as long as the
face is visible to the camera device. A face that leaves the field of
view and later returns may be assigned a new ID. The number of values
should be the number of faces reported in FaceDetectFaceRectangles.
The FaceDetectFaceIds control can only be returned in metadata.
Currently identical to ANDROID_STATISTICS_FACE_IDS.
size: [n]
...