[{"id":31305,"web_url":"https://patchwork.libcamera.org/comment/31305/","msgid":"<ry3j4oofrr4vazwskv7gyfyb6cvnfjsmvnem3fcoju3kyyv4al@iw5qjzmwte3s>","date":"2024-09-23T10:13:36","subject":"Re: [PATCH v5 2/3] libcamera: Add face detection controls","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Harvey,\n\nOn Mon, Sep 23, 2024 at 09:30:45AM GMT, Harvey Yang wrote:\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> ---\n>  include/libcamera/controls.h         |  6 ++\n>  src/libcamera/control_ids_draft.yaml | 85 ++++++++++++++++++++++++++++\n>  src/libcamera/controls.cpp           |  6 ++\n>  3 files changed, 97 insertions(+)\n>\n> diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\n> index 7c2bb287..bf1b8609 100644\n> --- a/include/libcamera/controls.h\n> +++ b/include/libcamera/controls.h\n> @@ -34,6 +34,7 @@ enum ControlType {\n>  \tControlTypeString,\n>  \tControlTypeRectangle,\n>  \tControlTypeSize,\n> +\tControlTypePoint,\n>  };\n>\n>  namespace details {\n> @@ -87,6 +88,11 @@ struct control_type<Size> {\n>  \tstatic constexpr ControlType value = ControlTypeSize;\n>  };\n>\n> +template<>\n> +struct control_type<Point> {\n> +\tstatic constexpr ControlType value = ControlTypePoint;\n> +};\n> +\n>  template<typename T, std::size_t N>\n>  struct control_type<Span<T, N>> : public control_type<std::remove_cv_t<T>> {\n>  };\n> diff --git a/src/libcamera/control_ids_draft.yaml b/src/libcamera/control_ids_draft.yaml\n> index 9bef5bf1..c0cf5320 100644\n> --- a/src/libcamera/control_ids_draft.yaml\n> +++ b/src/libcamera/control_ids_draft.yaml\n> @@ -227,4 +227,89 @@ 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: uint8_t\n> +      description: |\n> +        Reporting mode of face detection.\n> +\n> +        The number of faces in each list must be the same.\n\nI would drop this. See below how I would rather expand the\nrequirements of sizes in the single commands, now that they have been\ndescribed in full.\n\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 should not report face detection result.\n> +        - name: FaceDetectModeSimple\n> +          value: 1\n> +          description: |\n> +            Pipeline should at least report FaceDetectFaceRectangles and\n> +            FaceDetectFaceScores for each detected faces.\n> +            FaceDetectFaceLandmarks and FaceDetectFaceIds is optional.\n> +\n> +        - name: FaceDetectModeFull\n> +          value: 2\n> +          description: |\n> +            Pipeline should report all face controls, including\n> +            FaceDetectFaceRectangles, FaceDetectFaceScores,\n> +            FaceDetectFaceLandmarks, and FaceDeteceFaceIds.\n> +\n> +  - FaceDetectFaceRectangles:\n> +      type: Rectangle\n> +      description: |\n> +        Boundary rectangles of the detected faces.\n> +        The number of values should be the number of faces.\n\nIf this was not a draft I would have asked what is the reference\nsystem for the rectangles. The PixelArray sizes, the output stream\nsizes ? As it is draft, we can refer to ANDROID_STATISTICS_FACE_RECTANGLES.\n\n> +\n> +        The FaceDetectFaceRectangles control can only be returned in metadata.\n> +\n> +        Currently identical to ANDROID_STATISTICS_FACE_RECTANGLES.\n> +\n> +      size: [n]\n> +\n> +  - FaceDetectFaceScores:\n> +      type: uint8_t\n> +      description: |\n> +        Confidence score of each of the detected faces by face detector.\n> +        The range of score is [0, 100].\n> +        The FaceDetectFaceScores control can only be returned in metadata.\n> +        The number of values should be the number of faces.\n\n\"number of faces reported in FaceDetectFaceRectangles\"\n\n> +\n> +        Currently identical to ANDROID_STATISTICS_FACE_SCORES.\n> +\n> +      size: [n]\n> +\n> +  - FaceDetectFaceLandmarks:\n> +      type: Point\n> +      description: |\n> +        Array of human face landmark coordinates in format:\n> +        [..., left_eye_i, right_eye_i, mouth_i, left_eye_i+1, ...],\n> +        with i = index of face.\n> +        The number of values should be 3 * the number of faces.\n\n\"number of faces reported in FaceDetectFaceRectangles\"\n\n> +\n> +        The FaceDetectFaceLandmarks control can only be returned in metadata.\n> +\n> +        Currently identical to ANDROID_STATISTICS_FACE_LANDMARKS.\n> +\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\n> +        the face is visible to the camera device. A face that leaves the field\n> +        of view and later returns may be assigned a new ID.\n> +        The number of values should be the number of faces.\n> +\n> +        The FaceDetectFaceIds control can only be returned in metadata.\n\n\"number of faces reported in FaceDetectFaceRectangles\"\n\nI can apply the above changes when applying the patch if it's fine for\nyou.\n\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nThanks\n  j\n\n\n> +\n> +        Currently identical to ANDROID_STATISTICS_FACE_IDS.\n> +\n> +      size: [n]\n> +\n>  ...\n> diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\n> index dba74404..c452e607 100644\n> --- a/src/libcamera/controls.cpp\n> +++ b/src/libcamera/controls.cpp\n> @@ -60,6 +60,7 @@ static constexpr size_t ControlValueSize[] = {\n>  \t[ControlTypeString]\t\t= sizeof(char),\n>  \t[ControlTypeRectangle]\t\t= sizeof(Rectangle),\n>  \t[ControlTypeSize]\t\t= sizeof(Size),\n> +\t[ControlTypePoint]\t\t= sizeof(Point),\n>  };\n>\n>  } /* namespace */\n> @@ -254,6 +255,11 @@ std::string ControlValue::toString() const\n>  \t\t\tstr += value->toString();\n>  \t\t\tbreak;\n>  \t\t}\n> +\t\tcase ControlTypePoint: {\n> +\t\t\tconst Point *value = reinterpret_cast<const Point *>(data);\n> +\t\t\tstr += value->toString();\n> +\t\t\tbreak;\n> +\t\t}\n>  \t\tcase ControlTypeNone:\n>  \t\tcase ControlTypeString:\n>  \t\t\tbreak;\n> --\n> 2.46.0.792.g87dc391469-goog\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 B534FC3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Sep 2024 10:13:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C357D63513;\n\tMon, 23 Sep 2024 12:13:41 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1F9C66037E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Sep 2024 12:13:40 +0200 (CEST)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CF2702E0;\n\tMon, 23 Sep 2024 12:12:13 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"F5Y7Hd4q\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1727086333;\n\tbh=Y6BnbiKgmrRRmUeI9U1SwFQgLJlvBjoszZCivmbemDw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=F5Y7Hd4qSZz3ddhFJidr3LoptcPPimAUIdoeCg57qSwbuXOj9sG65xu93B436EkaC\n\tw3ClTlBhZqvUrpqSmXEOLcJcyQRV8aigFkqleItQjGOhlj5ss1to8HYAO5X7vDvWgy\n\t+7JptTH480LfsfX7r6Rz4XDlHSIbot0PETsQ4oJM=","Date":"Mon, 23 Sep 2024 12:13:36 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Harvey Yang <chenghaoyang@chromium.org>","Cc":"libcamera-devel@lists.libcamera.org, \n\tYudhistira Erlandinata <yerlandinata@chromium.org>,\n\tbecker hsieh <beckerh@chromium.org>","Subject":"Re: [PATCH v5 2/3] libcamera: Add face detection controls","Message-ID":"<ry3j4oofrr4vazwskv7gyfyb6cvnfjsmvnem3fcoju3kyyv4al@iw5qjzmwte3s>","References":"<20240923093317.3500444-1-chenghaoyang@google.com>\n\t<20240923093317.3500444-3-chenghaoyang@google.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240923093317.3500444-3-chenghaoyang@google.com>","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>"}},{"id":31308,"web_url":"https://patchwork.libcamera.org/comment/31308/","msgid":"<172708771583.3331495.10176320153015153527@ping.linuxembedded.co.uk>","date":"2024-09-23T10:35:15","subject":"Re: [PATCH v5 2/3] libcamera: Add face detection controls","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Jacopo Mondi (2024-09-23 11:13:36)\n> Hi Harvey,\n> \n> On Mon, Sep 23, 2024 at 09:30:45AM GMT, Harvey Yang wrote:\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> > ---\n> >  include/libcamera/controls.h         |  6 ++\n> >  src/libcamera/control_ids_draft.yaml | 85 ++++++++++++++++++++++++++++\n> >  src/libcamera/controls.cpp           |  6 ++\n> >  3 files changed, 97 insertions(+)\n> >\n> > diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\n> > index 7c2bb287..bf1b8609 100644\n> > --- a/include/libcamera/controls.h\n> > +++ b/include/libcamera/controls.h\n> > @@ -34,6 +34,7 @@ enum ControlType {\n> >       ControlTypeString,\n> >       ControlTypeRectangle,\n> >       ControlTypeSize,\n> > +     ControlTypePoint,\n> >  };\n> >\n> >  namespace details {\n> > @@ -87,6 +88,11 @@ struct control_type<Size> {\n> >       static constexpr ControlType value = ControlTypeSize;\n> >  };\n> >\n> > +template<>\n> > +struct control_type<Point> {\n> > +     static constexpr ControlType value = ControlTypePoint;\n> > +};\n> > +\n> >  template<typename T, std::size_t N>\n> >  struct control_type<Span<T, N>> : public control_type<std::remove_cv_t<T>> {\n> >  };\n> > diff --git a/src/libcamera/control_ids_draft.yaml b/src/libcamera/control_ids_draft.yaml\n> > index 9bef5bf1..c0cf5320 100644\n> > --- a/src/libcamera/control_ids_draft.yaml\n> > +++ b/src/libcamera/control_ids_draft.yaml\n> > @@ -227,4 +227,89 @@ 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: uint8_t\n> > +      description: |\n> > +        Reporting mode of face detection.\n> > +\n> > +        The number of faces in each list must be the same.\n> \n> I would drop this. See below how I would rather expand the\n> requirements of sizes in the single commands, now that they have been\n> described in full.\n> \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 should not report face detection result.\n> > +        - name: FaceDetectModeSimple\n> > +          value: 1\n> > +          description: |\n> > +            Pipeline should at least report FaceDetectFaceRectangles and\n> > +            FaceDetectFaceScores for each detected faces.\n> > +            FaceDetectFaceLandmarks and FaceDetectFaceIds is optional.\n> > +\n> > +        - name: FaceDetectModeFull\n> > +          value: 2\n> > +          description: |\n> > +            Pipeline should report all face controls, including\n> > +            FaceDetectFaceRectangles, FaceDetectFaceScores,\n> > +            FaceDetectFaceLandmarks, and FaceDeteceFaceIds.\n> > +\n> > +  - FaceDetectFaceRectangles:\n> > +      type: Rectangle\n> > +      description: |\n> > +        Boundary rectangles of the detected faces.\n> > +        The number of values should be the number of faces.\n> \n> If this was not a draft I would have asked what is the reference\n> system for the rectangles. The PixelArray sizes, the output stream\n> sizes ? As it is draft, we can refer to ANDROID_STATISTICS_FACE_RECTANGLES.\n\nI thought we were trying to avoid adding controls to ::draft::\n\nMaybe we should just rename ::draft:: to ::android:: now that we have\nnamespaced controls ? (or add ::android:: ?)\n\n--\nKieran","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 E9280C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Sep 2024 10:35:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 922926350C;\n\tMon, 23 Sep 2024 12:35:20 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AE9A76037E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Sep 2024 12:35:18 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 928672E0;\n\tMon, 23 Sep 2024 12:33:52 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"rk7EEjda\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1727087632;\n\tbh=cZuyWUGWN0ewAK7BCAddM/zIt1fHVryfG7T8A6YO5Tw=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=rk7EEjdaBN6dIpPfuAHR10c82MjN3248BbOocMv9stAUZLPv4vASKp/CfwZVjZkBr\n\tzUO4Ol/Qw2KvQduMOcuzw1MhebSijdO6JRlWJwiq5vkSo1GKPMr88EM45HuDmnNHh+\n\tT+w29Gp6SAzMUL+fjVRTh3Gs8kSmCoSc+ZbAW+ws=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<ry3j4oofrr4vazwskv7gyfyb6cvnfjsmvnem3fcoju3kyyv4al@iw5qjzmwte3s>","References":"<20240923093317.3500444-1-chenghaoyang@google.com>\n\t<20240923093317.3500444-3-chenghaoyang@google.com>\n\t<ry3j4oofrr4vazwskv7gyfyb6cvnfjsmvnem3fcoju3kyyv4al@iw5qjzmwte3s>","Subject":"Re: [PATCH v5 2/3] libcamera: Add face detection controls","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tYudhistira Erlandinata <yerlandinata@chromium.org>,\n\tbecker hsieh <beckerh@chromium.org>","To":"Harvey Yang <chenghaoyang@chromium.org>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>","Date":"Mon, 23 Sep 2024 11:35:15 +0100","Message-ID":"<172708771583.3331495.10176320153015153527@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>"}},{"id":31310,"web_url":"https://patchwork.libcamera.org/comment/31310/","msgid":"<bktlqnmbq5ykhvpuvxbbhn6jd2yavurbgc6nquoii5rstc52yw@tazyffd7d4jy>","date":"2024-09-23T12:59:15","subject":"Re: [PATCH v5 2/3] libcamera: Add face detection controls","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Kieran\n\nOn Mon, Sep 23, 2024 at 11:35:15AM GMT, Kieran Bingham wrote:\n> Quoting Jacopo Mondi (2024-09-23 11:13:36)\n> > Hi Harvey,\n> >\n> > On Mon, Sep 23, 2024 at 09:30:45AM GMT, Harvey Yang wrote:\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> > > ---\n> > >  include/libcamera/controls.h         |  6 ++\n> > >  src/libcamera/control_ids_draft.yaml | 85 ++++++++++++++++++++++++++++\n> > >  src/libcamera/controls.cpp           |  6 ++\n> > >  3 files changed, 97 insertions(+)\n> > >\n> > > diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\n> > > index 7c2bb287..bf1b8609 100644\n> > > --- a/include/libcamera/controls.h\n> > > +++ b/include/libcamera/controls.h\n> > > @@ -34,6 +34,7 @@ enum ControlType {\n> > >       ControlTypeString,\n> > >       ControlTypeRectangle,\n> > >       ControlTypeSize,\n> > > +     ControlTypePoint,\n> > >  };\n> > >\n> > >  namespace details {\n> > > @@ -87,6 +88,11 @@ struct control_type<Size> {\n> > >       static constexpr ControlType value = ControlTypeSize;\n> > >  };\n> > >\n> > > +template<>\n> > > +struct control_type<Point> {\n> > > +     static constexpr ControlType value = ControlTypePoint;\n> > > +};\n> > > +\n> > >  template<typename T, std::size_t N>\n> > >  struct control_type<Span<T, N>> : public control_type<std::remove_cv_t<T>> {\n> > >  };\n> > > diff --git a/src/libcamera/control_ids_draft.yaml b/src/libcamera/control_ids_draft.yaml\n> > > index 9bef5bf1..c0cf5320 100644\n> > > --- a/src/libcamera/control_ids_draft.yaml\n> > > +++ b/src/libcamera/control_ids_draft.yaml\n> > > @@ -227,4 +227,89 @@ 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: uint8_t\n> > > +      description: |\n> > > +        Reporting mode of face detection.\n> > > +\n> > > +        The number of faces in each list must be the same.\n> >\n> > I would drop this. See below how I would rather expand the\n> > requirements of sizes in the single commands, now that they have been\n> > described in full.\n> >\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 should not report face detection result.\n> > > +        - name: FaceDetectModeSimple\n> > > +          value: 1\n> > > +          description: |\n> > > +            Pipeline should at least report FaceDetectFaceRectangles and\n> > > +            FaceDetectFaceScores for each detected faces.\n> > > +            FaceDetectFaceLandmarks and FaceDetectFaceIds is optional.\n> > > +\n> > > +        - name: FaceDetectModeFull\n> > > +          value: 2\n> > > +          description: |\n> > > +            Pipeline should report all face controls, including\n> > > +            FaceDetectFaceRectangles, FaceDetectFaceScores,\n> > > +            FaceDetectFaceLandmarks, and FaceDeteceFaceIds.\n> > > +\n> > > +  - FaceDetectFaceRectangles:\n> > > +      type: Rectangle\n> > > +      description: |\n> > > +        Boundary rectangles of the detected faces.\n> > > +        The number of values should be the number of faces.\n> >\n> > If this was not a draft I would have asked what is the reference\n> > system for the rectangles. The PixelArray sizes, the output stream\n> > sizes ? As it is draft, we can refer to ANDROID_STATISTICS_FACE_RECTANGLES.\n>\n> I thought we were trying to avoid adding controls to ::draft::\n\nI think that asking to make out of these proper controls would require\nmore use cases and users than just mtkisp7\n\n>\n> Maybe we should just rename ::draft:: to ::android:: now that we have\n> namespaced controls ? (or add ::android:: ?)\n\nI wouldn't be opposed in principle, but I still would like to convey\nthe fact these are not stable or here to stay forever.\n\n>\n> --\n> Kieran","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 7BF39C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Sep 2024 12:59:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7AA736350B;\n\tMon, 23 Sep 2024 14:59:27 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 83DA36037E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Sep 2024 14:59:25 +0200 (CEST)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B45372E0;\n\tMon, 23 Sep 2024 14:57:58 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"cTTPGN7V\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1727096279;\n\tbh=87BTyjdiTVXXErWoWmvmSG2UZ16t9Uvk/dGuuq5VMAc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=cTTPGN7V/avjpkvybDTZa/oBOpdd/f85EmEpG4zLlUpDXcW9fVZqRrEJ7jWuDAAYs\n\t4Gdt7rXLmxDylnBctlmjPAJT+2jrsHxAWqhIp00D7kcGkcXmE+1DL1z9mdlBxHPCOY\n\t/iLXim5hymye5PN0FPU8mt9osOs3/aYrqQJM+huA=","Date":"Mon, 23 Sep 2024 14:59:15 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Harvey Yang <chenghaoyang@chromium.org>, \n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org, \n\tYudhistira Erlandinata <yerlandinata@chromium.org>,\n\tbecker hsieh <beckerh@chromium.org>","Subject":"Re: [PATCH v5 2/3] libcamera: Add face detection controls","Message-ID":"<bktlqnmbq5ykhvpuvxbbhn6jd2yavurbgc6nquoii5rstc52yw@tazyffd7d4jy>","References":"<20240923093317.3500444-1-chenghaoyang@google.com>\n\t<20240923093317.3500444-3-chenghaoyang@google.com>\n\t<ry3j4oofrr4vazwskv7gyfyb6cvnfjsmvnem3fcoju3kyyv4al@iw5qjzmwte3s>\n\t<172708771583.3331495.10176320153015153527@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<172708771583.3331495.10176320153015153527@ping.linuxembedded.co.uk>","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>"}},{"id":31312,"web_url":"https://patchwork.libcamera.org/comment/31312/","msgid":"<CAC=wSGUKaditogeK1mAb7t8YzgQwAqorTG+2sqm2rJrcp2YR4A@mail.gmail.com>","date":"2024-09-23T14:50:44","subject":"Re: [PATCH v5 2/3] libcamera: Add face detection controls","submitter":{"id":148,"url":"https://patchwork.libcamera.org/api/people/148/","name":"Cheng-Hao Yang","email":"chenghaoyang@google.com"},"content":"Hi Jacopo and Kieran,\n\nOn Mon, Sep 23, 2024 at 8:59 PM Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nwrote:\n\n> Hi Kieran\n>\n> On Mon, Sep 23, 2024 at 11:35:15AM GMT, Kieran Bingham wrote:\n> > Quoting Jacopo Mondi (2024-09-23 11:13:36)\n> > > Hi Harvey,\n> > >\n> > > On Mon, Sep 23, 2024 at 09:30:45AM GMT, Harvey Yang wrote:\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> > > > ---\n> > > >  include/libcamera/controls.h         |  6 ++\n> > > >  src/libcamera/control_ids_draft.yaml | 85\n> ++++++++++++++++++++++++++++\n> > > >  src/libcamera/controls.cpp           |  6 ++\n> > > >  3 files changed, 97 insertions(+)\n> > > >\n> > > > diff --git a/include/libcamera/controls.h\n> b/include/libcamera/controls.h\n> > > > index 7c2bb287..bf1b8609 100644\n> > > > --- a/include/libcamera/controls.h\n> > > > +++ b/include/libcamera/controls.h\n> > > > @@ -34,6 +34,7 @@ enum ControlType {\n> > > >       ControlTypeString,\n> > > >       ControlTypeRectangle,\n> > > >       ControlTypeSize,\n> > > > +     ControlTypePoint,\n> > > >  };\n> > > >\n> > > >  namespace details {\n> > > > @@ -87,6 +88,11 @@ struct control_type<Size> {\n> > > >       static constexpr ControlType value = ControlTypeSize;\n> > > >  };\n> > > >\n> > > > +template<>\n> > > > +struct control_type<Point> {\n> > > > +     static constexpr ControlType value = ControlTypePoint;\n> > > > +};\n> > > > +\n> > > >  template<typename T, std::size_t N>\n> > > >  struct control_type<Span<T, N>> : public\n> control_type<std::remove_cv_t<T>> {\n> > > >  };\n> > > > diff --git a/src/libcamera/control_ids_draft.yaml\n> b/src/libcamera/control_ids_draft.yaml\n> > > > index 9bef5bf1..c0cf5320 100644\n> > > > --- a/src/libcamera/control_ids_draft.yaml\n> > > > +++ b/src/libcamera/control_ids_draft.yaml\n> > > > @@ -227,4 +227,89 @@ controls:\n> > > >              value. All of the custom test patterns will be static\n> (that is the\n> > > >              raw image must not vary from frame to frame).\n> > > >\n> > > > +  - FaceDetectMode:\n> > > > +      type: uint8_t\n> > > > +      description: |\n> > > > +        Reporting mode of face detection.\n> > > > +\n> > > > +        The number of faces in each list must be the same.\n> > >\n> > > I would drop this. See below how I would rather expand the\n> > > requirements of sizes in the single commands, now that they have been\n> > > described in full.\n>\n\nRemoved, thanks!\n\n\n> > >\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 should not report face detection result.\n> > > > +        - name: FaceDetectModeSimple\n> > > > +          value: 1\n> > > > +          description: |\n> > > > +            Pipeline should at least report\n> FaceDetectFaceRectangles and\n> > > > +            FaceDetectFaceScores for each detected faces.\n> > > > +            FaceDetectFaceLandmarks and FaceDetectFaceIds is\n> optional.\n> > > > +\n> > > > +        - name: FaceDetectModeFull\n> > > > +          value: 2\n> > > > +          description: |\n> > > > +            Pipeline should report all face controls, including\n> > > > +            FaceDetectFaceRectangles, FaceDetectFaceScores,\n> > > > +            FaceDetectFaceLandmarks, and FaceDeteceFaceIds.\n> > > > +\n> > > > +  - FaceDetectFaceRectangles:\n> > > > +      type: Rectangle\n> > > > +      description: |\n> > > > +        Boundary rectangles of the detected faces.\n> > > > +        The number of values should be the number of faces.\n> > >\n> > > If this was not a draft I would have asked what is the reference\n> > > system for the rectangles. The PixelArray sizes, the output stream\n> > > sizes ? As it is draft, we can refer to\n> ANDROID_STATISTICS_FACE_RECTANGLES.\n>\n\nAh understood.\n\n\n> >\n> > I thought we were trying to avoid adding controls to ::draft::\n>\n> I think that asking to make out of these proper controls would require\n> more use cases and users than just mtkisp7\n>\n> >\n> > Maybe we should just rename ::draft:: to ::android:: now that we have\n> > namespaced controls ? (or add ::android:: ?)\n>\n> I wouldn't be opposed in principle, but I still would like to convey\n> the fact these are not stable or here to stay forever.\n>\n\nLet me add `control_ids_android.yaml` in the next version.\n\n\n>\n> >\n> > --\n> > Kieran\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 3495FC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Sep 2024 14:51:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BB8A26037E;\n\tMon, 23 Sep 2024 16:51:23 +0200 (CEST)","from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com\n\t[IPv6:2a00:1450:4864:20::52f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6282B6037E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Sep 2024 16:51:22 +0200 (CEST)","by mail-ed1-x52f.google.com with SMTP id\n\t4fb4d7f45d1cf-5c2460e885dso16804a12.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Sep 2024 07:51:22 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"C9ONG/I2\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=google.com; s=20230601; t=1727103082; x=1727707882;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=tX0sPjdPRrr5amja72TOJUfXb1jWRCH2UuM5rbNHxuc=;\n\tb=C9ONG/I2wIP8q2JEk9CH4nfkx/sH8WYOyTK1G39dTdru2eWV37Zf4pjfRX2R8xc/lj\n\tMLzZzUu+vaWTAXhCwoXN4RuDjhCaUYY0FgiZwxJAQtizXKFky4XtfMYlZiiDlj4tPk69\n\toxLEACKa6UhzBOW27omFBPBhjTcAJepn5q85tdOLv+yoIgQjZh61xdMi2/ZktcBYzf+4\n\tN6Gpw9QFl86y4z0b55ZBsdOrSs1Sgly6LKnedltYO2EnET8Q/BMaol+O7A9bGmhHj/ij\n\tMg1il8mLLAYo/LTsbwoQ3mnL93RejtlT0fAipQwu2txZx1cfjONYbdPP4dR/NXskUckK\n\tBPjA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1727103082; x=1727707882;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=tX0sPjdPRrr5amja72TOJUfXb1jWRCH2UuM5rbNHxuc=;\n\tb=WIpEft4nCVTtzeEF/feoMUpxV2hO+R/xTs4ZMLWP8wM6XSsCx7bSJTQeSGebKsv6dQ\n\t3P+H4e/OgjZ7OegasppiQ1X2kTBN+VGhYavcJKgRLEqMhF5YF4PB5tW2zSpwhdSjBR/2\n\tH1mSecbYS0bvFnHjrh8rMJXSFLwJHI/loFv4UaI1D6ypUHsyUwIDOMi5hwQZp6E5vlg8\n\tPSqPSUZRSsv7Fz/XDgQRSwYDUQRN1PWbQhwtBvkj7t/pp8WMxfGjzE/2DDhsi1iUm9hc\n\tDsEHo5CU9aT5EM96QGNYutOH+9c7TbWnKbfTGjCyHGS/C1QtjlNK1/cHeoDpCMvBDOgA\n\tSe6A==","X-Forwarded-Encrypted":"i=1;\n\tAJvYcCUvL7dGt0NjTk2k3jhANf4k5rL5+r/5up39pi8eQ6bY1C4WwjNMWQgctCHwMaQfeAp5VuNgpKGpGJ7cRZn/K/8=@lists.libcamera.org","X-Gm-Message-State":"AOJu0YwWBqie7HaLtNU44zr5z7AIZD52y/CHGhryfEJOprp/Gp0rBn2p\n\tpzy+ZMF+R46C1v241dukWhkYRiS9oH7/3snOMuivJOTQEACFrV4GZtddbmbWjM/bRG9L5EhQfKZ\n\tCl96AKehjFPKhnuCgAykKVk9r4+T6Njxb2+Kp","X-Google-Smtp-Source":"AGHT+IGjRfVU9Nr+1rWQlNWdPyN6OBMLHU7wzckSCZORQEW4nIWpNPTThehSCYymtvYEpqlCV6/0RnLB9xw93hN+bSs=","X-Received":"by 2002:aa7:df18:0:b0:5c5:b85c:9549 with SMTP id\n\t4fb4d7f45d1cf-5c5b85c95a5mr327360a12.1.1727103081408; Mon, 23 Sep 2024\n\t07:51:21 -0700 (PDT)","MIME-Version":"1.0","References":"<20240923093317.3500444-1-chenghaoyang@google.com>\n\t<20240923093317.3500444-3-chenghaoyang@google.com>\n\t<ry3j4oofrr4vazwskv7gyfyb6cvnfjsmvnem3fcoju3kyyv4al@iw5qjzmwte3s>\n\t<172708771583.3331495.10176320153015153527@ping.linuxembedded.co.uk>\n\t<bktlqnmbq5ykhvpuvxbbhn6jd2yavurbgc6nquoii5rstc52yw@tazyffd7d4jy>","In-Reply-To":"<bktlqnmbq5ykhvpuvxbbhn6jd2yavurbgc6nquoii5rstc52yw@tazyffd7d4jy>","From":"Cheng-Hao Yang <chenghaoyang@google.com>","Date":"Mon, 23 Sep 2024 22:50:44 +0800","Message-ID":"<CAC=wSGUKaditogeK1mAb7t8YzgQwAqorTG+2sqm2rJrcp2YR4A@mail.gmail.com>","Subject":"Re: [PATCH v5 2/3] libcamera: Add face detection controls","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>, \n\tHarvey Yang <chenghaoyang@chromium.org>,\n\tlibcamera-devel@lists.libcamera.org, \n\tYudhistira Erlandinata <yerlandinata@chromium.org>,\n\tbecker hsieh <beckerh@chromium.org>","Content-Type":"multipart/alternative; boundary=\"000000000000a93c3f0622ca8587\"","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>"}},{"id":31332,"web_url":"https://patchwork.libcamera.org/comment/31332/","msgid":"<172717632060.3726802.11524249433104949393@ping.linuxembedded.co.uk>","date":"2024-09-24T11:12:00","subject":"Re: [PATCH v5 2/3] libcamera: Add face detection controls","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Cheng-Hao Yang (2024-09-23 15:50:44)\n> Hi Jacopo and Kieran,\n> \n> On Mon, Sep 23, 2024 at 8:59 PM Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> wrote:\n> \n> > Hi Kieran\n> >\n> > On Mon, Sep 23, 2024 at 11:35:15AM GMT, Kieran Bingham wrote:\n> > > Quoting Jacopo Mondi (2024-09-23 11:13:36)\n> > > > Hi Harvey,\n> > > >\n> > > > On Mon, Sep 23, 2024 at 09:30:45AM GMT, Harvey Yang wrote:\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> > > > > ---\n> > > > >  include/libcamera/controls.h         |  6 ++\n> > > > >  src/libcamera/control_ids_draft.yaml | 85\n> > ++++++++++++++++++++++++++++\n> > > > >  src/libcamera/controls.cpp           |  6 ++\n> > > > >  3 files changed, 97 insertions(+)\n> > > > >\n> > > > > diff --git a/include/libcamera/controls.h\n> > b/include/libcamera/controls.h\n> > > > > index 7c2bb287..bf1b8609 100644\n> > > > > --- a/include/libcamera/controls.h\n> > > > > +++ b/include/libcamera/controls.h\n> > > > > @@ -34,6 +34,7 @@ enum ControlType {\n> > > > >       ControlTypeString,\n> > > > >       ControlTypeRectangle,\n> > > > >       ControlTypeSize,\n> > > > > +     ControlTypePoint,\n> > > > >  };\n> > > > >\n> > > > >  namespace details {\n> > > > > @@ -87,6 +88,11 @@ struct control_type<Size> {\n> > > > >       static constexpr ControlType value = ControlTypeSize;\n> > > > >  };\n> > > > >\n> > > > > +template<>\n> > > > > +struct control_type<Point> {\n> > > > > +     static constexpr ControlType value = ControlTypePoint;\n> > > > > +};\n> > > > > +\n> > > > >  template<typename T, std::size_t N>\n> > > > >  struct control_type<Span<T, N>> : public\n> > control_type<std::remove_cv_t<T>> {\n> > > > >  };\n> > > > > diff --git a/src/libcamera/control_ids_draft.yaml\n> > b/src/libcamera/control_ids_draft.yaml\n> > > > > index 9bef5bf1..c0cf5320 100644\n> > > > > --- a/src/libcamera/control_ids_draft.yaml\n> > > > > +++ b/src/libcamera/control_ids_draft.yaml\n> > > > > @@ -227,4 +227,89 @@ controls:\n> > > > >              value. All of the custom test patterns will be static\n> > (that is the\n> > > > >              raw image must not vary from frame to frame).\n> > > > >\n> > > > > +  - FaceDetectMode:\n> > > > > +      type: uint8_t\n> > > > > +      description: |\n> > > > > +        Reporting mode of face detection.\n> > > > > +\n> > > > > +        The number of faces in each list must be the same.\n> > > >\n> > > > I would drop this. See below how I would rather expand the\n> > > > requirements of sizes in the single commands, now that they have been\n> > > > described in full.\n> >\n> \n> Removed, thanks!\n> \n> \n> > > >\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 should not report face detection result.\n> > > > > +        - name: FaceDetectModeSimple\n> > > > > +          value: 1\n> > > > > +          description: |\n> > > > > +            Pipeline should at least report\n> > FaceDetectFaceRectangles and\n> > > > > +            FaceDetectFaceScores for each detected faces.\n> > > > > +            FaceDetectFaceLandmarks and FaceDetectFaceIds is\n> > optional.\n> > > > > +\n> > > > > +        - name: FaceDetectModeFull\n> > > > > +          value: 2\n> > > > > +          description: |\n> > > > > +            Pipeline should report all face controls, including\n> > > > > +            FaceDetectFaceRectangles, FaceDetectFaceScores,\n> > > > > +            FaceDetectFaceLandmarks, and FaceDeteceFaceIds.\n> > > > > +\n> > > > > +  - FaceDetectFaceRectangles:\n> > > > > +      type: Rectangle\n> > > > > +      description: |\n> > > > > +        Boundary rectangles of the detected faces.\n> > > > > +        The number of values should be the number of faces.\n> > > >\n> > > > If this was not a draft I would have asked what is the reference\n> > > > system for the rectangles. The PixelArray sizes, the output stream\n> > > > sizes ? As it is draft, we can refer to\n> > ANDROID_STATISTICS_FACE_RECTANGLES.\n> >\n> \n> Ah understood.\n> \n> \n> > >\n> > > I thought we were trying to avoid adding controls to ::draft::\n> >\n> > I think that asking to make out of these proper controls would require\n> > more use cases and users than just mtkisp7\n> >\n> > >\n> > > Maybe we should just rename ::draft:: to ::android:: now that we have\n> > > namespaced controls ? (or add ::android:: ?)\n> >\n> > I wouldn't be opposed in principle, but I still would like to convey\n> > the fact these are not stable or here to stay forever.\n> >\n> \n> Let me add `control_ids_android.yaml` in the next version.\n\nI'm sorry - I think my idea/proposal here was a bit too optimistic.\n\nWe're trying to make sure we do not have android specific controls, so\nthey should be generalised wherever possible. And creating an android\nnamespace here would lead us the wrong direction...\n\nSo I think I'm afraid - the version you had before was correct, keeping\nthese in draft - to at least convey that we should be moving these to a\ngeneric interface as soon as possible.\n\nOf course even better would be making sure we describe and document Face\ndetection as a feature without needing to refer to the Android\ndefinitions and ensuring that the android layer handles this\naccordingly.\n\n--\nKieran\n\n\n> \n> \n> >\n> > >\n> > > --\n> > > Kieran\n> >\n> \n> \n> -- \n> BR,\n> Harvey Yang","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 267BBC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 24 Sep 2024 11:12:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2493563502;\n\tTue, 24 Sep 2024 13:12:05 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6F62F63500\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 24 Sep 2024 13:12:03 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 717DE3DC;\n\tTue, 24 Sep 2024 13:10:36 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"hXQOFYlE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1727176236;\n\tbh=hAOd4BKafYIJZ6AYyPMkvXQPmuihY6pyFQdZpfWlaok=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=hXQOFYlEMA5q7UKFJS5EQ8nhj0duZFe38Hv9LgqKH8dVxSV6UwE8uk4k/eno2PIE2\n\t3NDP/vRMBqAIPghcqBlwM++0SNpU/fOWGxYcVfpawvSZdfg99K2m7cwdAGbOiYqxgT\n\tJ6xBx6QwjprLIE1zRrBRUi1qwuhVe+2Ad3WF7lzE=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<CAC=wSGUKaditogeK1mAb7t8YzgQwAqorTG+2sqm2rJrcp2YR4A@mail.gmail.com>","References":"<20240923093317.3500444-1-chenghaoyang@google.com>\n\t<20240923093317.3500444-3-chenghaoyang@google.com>\n\t<ry3j4oofrr4vazwskv7gyfyb6cvnfjsmvnem3fcoju3kyyv4al@iw5qjzmwte3s>\n\t<172708771583.3331495.10176320153015153527@ping.linuxembedded.co.uk>\n\t<bktlqnmbq5ykhvpuvxbbhn6jd2yavurbgc6nquoii5rstc52yw@tazyffd7d4jy>\n\t<CAC=wSGUKaditogeK1mAb7t8YzgQwAqorTG+2sqm2rJrcp2YR4A@mail.gmail.com>","Subject":"Re: [PATCH v5 2/3] libcamera: Add face detection controls","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Harvey Yang <chenghaoyang@chromium.org>,\n\tlibcamera-devel@lists.libcamera.org,\n\tYudhistira Erlandinata <yerlandinata@chromium.org>,\n\tbecker hsieh <beckerh@chromium.org>","To":"Cheng-Hao Yang <chenghaoyang@google.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>","Date":"Tue, 24 Sep 2024 12:12:00 +0100","Message-ID":"<172717632060.3726802.11524249433104949393@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>"}}]