[{"id":31481,"web_url":"https://patchwork.libcamera.org/comment/31481/","msgid":"<CAEB1ahsxHHKck=7YEAewTnhXcMk2YpfBRTWehNO2o78aZP984Q@mail.gmail.com>","date":"2024-10-01T07:10:34","subject":"Re: [PATCH v9 4/5] libcamera: control_ids_draft: Add face detection\n\tcontrols","submitter":{"id":117,"url":"https://patchwork.libcamera.org/api/people/117/","name":"Cheng-Hao Yang","email":"chenghaoyang@chromium.org"},"content":"Thanks Jacopo,\n\nLGTM.\nReviewed-by: Harvey Yang <chenghaoyang@chromium.org>\n\nBR,\nHarvey\n\nOn Tue, Oct 1, 2024 at 3:59 AM Jacopo Mondi\n<jacopo.mondi@ideasonboard.com> wrote:\n>\n> From: Yudhistira Erlandinata <yerlandinata@chromium.org>\n>\n> Add FaceDetectMode, FaceDetectFaceRectangles, FaceDetectFaceScores,\n> and FaceDetectFaceLandmark. Also add ControlTypePoint for supporting\n> FaceDetectFaceLandmark.\n>\n> Signed-off-by: Yudhistira Erlandinata <yerlandinata@chromium.org>\n> Co-developed-by: Becker Hsieh <beckerh@chromium.org>\n> Co-developed-by: Harvey Yang <chenghaoyang@chromium.org>\n> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> ---\n>  src/libcamera/control_ids_draft.yaml | 82 ++++++++++++++++++++++++++++\n>  1 file changed, 82 insertions(+)\n>\n> diff --git a/src/libcamera/control_ids_draft.yaml b/src/libcamera/control_ids_draft.yaml\n> index 9bef5bf15238..1b284257f601 100644\n> --- a/src/libcamera/control_ids_draft.yaml\n> +++ b/src/libcamera/control_ids_draft.yaml\n> @@ -227,4 +227,86 @@ controls:\n>              value. All of the custom test patterns will be static (that is the\n>              raw image must not vary from frame to frame).\n>\n> +  - FaceDetectMode:\n> +      type: int32_t\n> +      description: |\n> +        Control to select the face detection mode used by the pipeline.\n> +\n> +        Currently identical to ANDROID_STATISTICS_FACE_DETECT_MODE.\n> +\n> +        \\sa FaceDetectFaceRectangles\n> +        \\sa FaceDetectFaceScores\n> +        \\sa FaceDetectFaceLandmarks\n> +        \\sa FaceDetectFaceIds\n> +\n> +      enum:\n> +        - name: FaceDetectModeOff\n> +          value: 0\n> +          description: |\n> +            Pipeline doesn't perform face detection and doesn't report any\n> +            control related to face detection.\n> +        - name: FaceDetectModeSimple\n> +          value: 1\n> +          description: |\n> +            Pipeline performs face detection and reports the\n> +            FaceDetectFaceRectangles and FaceDetectFaceScores controls for each\n> +            detected face. FaceDetectFaceLandmarks and FaceDetectFaceIds are\n> +            optional.\n> +        - name: FaceDetectModeFull\n> +          value: 2\n> +          description: |\n> +            Pipeline performs face detection and reports all the controls\n> +            related to face detection including FaceDetectFaceRectangles,\n> +            FaceDetectFaceScores, FaceDetectFaceLandmarks, and\n> +            FaceDeteceFaceIds for each detected face.\n> +\n> +  - FaceDetectFaceRectangles:\n> +      type: Rectangle\n> +      description: |\n> +        Boundary rectangles of the detected faces. The number of values is\n> +        the number of detected faces.\n> +\n> +        The FaceDetectFaceRectangles control can only be returned in metadata.\n> +\n> +        Currently identical to ANDROID_STATISTICS_FACE_RECTANGLES.\n> +      size: [n]\n> +\n> +  - FaceDetectFaceScores:\n> +      type: uint8_t\n> +      description: |\n> +        Confidence score of each of the detected faces. The range of score is\n> +        [0, 100]. The number of values should be the number of faces reported\n> +        in FaceDetectFaceRectangles.\n> +\n> +        The FaceDetectFaceScores control can only be returned in metadata.\n> +\n> +        Currently identical to ANDROID_STATISTICS_FACE_SCORES.\n> +      size: [n]\n> +\n> +  - FaceDetectFaceLandmarks:\n> +      type: Point\n> +      description: |\n> +        Array of human face landmark coordinates in format [..., left_eye_i,\n> +        right_eye_i, mouth_i, left_eye_i+1, ...], with i = index of face. The\n> +        number of values should be 3 * the number of faces reported in\n> +        FaceDetectFaceRectangles.\n> +\n> +        The FaceDetectFaceLandmarks control can only be returned in metadata.\n> +\n> +        Currently identical to ANDROID_STATISTICS_FACE_LANDMARKS.\n> +      size: [n]\n> +\n> +  - FaceDetectFaceIds:\n> +      type: int32_t\n> +      description: |\n> +        Each detected face is given a unique ID that is valid for as long as the\n> +        face is visible to the camera device. A face that leaves the field of\n> +        view and later returns may be assigned a new ID. The number of values\n> +        should be the number of faces reported in FaceDetectFaceRectangles.\n> +\n> +        The FaceDetectFaceIds control can only be returned in metadata.\n> +\n> +        Currently identical to ANDROID_STATISTICS_FACE_IDS.\n> +      size: [n]\n> +\n>  ...\n> --\n> 2.46.1\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id ED803BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  1 Oct 2024 07:10:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 97B3C63517;\n\tTue,  1 Oct 2024 09:10:48 +0200 (CEST)","from mail-lj1-x232.google.com (mail-lj1-x232.google.com\n\t[IPv6:2a00:1450:4864:20::232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B18A46350E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  1 Oct 2024 09:10:46 +0200 (CEST)","by mail-lj1-x232.google.com with SMTP id\n\t38308e7fff4ca-2fad15b3eeeso15200691fa.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 01 Oct 2024 00:10:46 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"LZ+CxsyJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1727766646; x=1728371446;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=Anzg0st4iDCqJmf2PAoMsc/2GvJU+6ti9OcG4Jlb8aA=;\n\tb=LZ+CxsyJgn6fTcgARlJDZwVmvnK+CichVHiPJo342dhOFjILLxvxTwX//gPA5ue0qq\n\tx8jR+3GuHH87oUB6Bin18g0uGlO3X5hkcA8HEnksqHAHmeEMmhN1NULqBfW3CwmN1r4x\n\tojBonq8D4BwactAzz0X/jJlQN1yLZTOv2hpt4=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1727766646; x=1728371446;\n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=Anzg0st4iDCqJmf2PAoMsc/2GvJU+6ti9OcG4Jlb8aA=;\n\tb=FoRLYCyJF9EnXrHkM3QQz1IhYqKFKDirgVdlXepIwOIMBwPbKSeBEj9casaFXQXvTh\n\tGgVrlZX2ZL12UrOGRnFMO1MxLfDeaWvZFiuQAl1kiRIr2KrTQrn6hDPCbIxuyd3GiERW\n\tWGxIPTdimg916jdFS5g3hIUzTeOHs1n2FZG9vmjPm2iLwizQP1hXchoMqIUtOa1LWfwP\n\t9ibsCvyA6hLsd5PLRNjEJgbMOabZGf4ImD9LQbxTt85mglcWiyMdhaHf9fHlLTvP7qOK\n\tpJ/L9Dj6l+P7Vt+QnxH59WZ958c+cy0nC5hSU8mBcYshfndcYzKXaf9twuO44WYQiK5C\n\t3SEA==","X-Gm-Message-State":"AOJu0YwymQDETKTKcoWzSGLIOQGIaHcYqGApNxXfRycyBrlso0bN+GMh\n\tUrrt0Uum5PNo8LjjtO29/Ov2Si3DZrMitK8gZxgXRMPAliZobrPQtW9rjvuBam+CvWYRrefYAYH\n\tQouZsz3xhkj11oYHD2zDKOMTlbD3bXPJE9uwq","X-Google-Smtp-Source":"AGHT+IFzT15pZDmxb5KZm3z+O6wqMJ42OK4NBWleUovcwWtHhL/YtRcs+jgRonvwf8cUnoL/K3TJgYwJwZ4fkWaXXrA=","X-Received":"by 2002:a05:651c:544:b0:2fa:cf73:a2fb with SMTP id\n\t38308e7fff4ca-2facf73a726mr31469681fa.2.1727766645936;\n\tTue, 01 Oct 2024 00:10:45 -0700 (PDT)","MIME-Version":"1.0","References":"<20240930195915.152187-1-jacopo.mondi@ideasonboard.com>\n\t<20240930195915.152187-5-jacopo.mondi@ideasonboard.com>","In-Reply-To":"<20240930195915.152187-5-jacopo.mondi@ideasonboard.com>","From":"Cheng-Hao Yang <chenghaoyang@chromium.org>","Date":"Tue, 1 Oct 2024 15:10:34 +0800","Message-ID":"<CAEB1ahsxHHKck=7YEAewTnhXcMk2YpfBRTWehNO2o78aZP984Q@mail.gmail.com>","Subject":"Re: [PATCH v9 4/5] libcamera: control_ids_draft: Add face detection\n\tcontrols","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tHarvey Yang <chenghaoyang@google.com>, \n\tYudhistira Erlandinata <yerlandinata@chromium.org>,\n\tBecker Hsieh <beckerh@chromium.org>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]