<div dir="ltr"><div dir="ltr">Hi Jacopo and Kieran,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 23, 2024 at 8:59 PM Jacopo Mondi <<a href="mailto:jacopo.mondi@ideasonboard.com" target="_blank">jacopo.mondi@ideasonboard.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Kieran<br>
<br>
On Mon, Sep 23, 2024 at 11:35:15AM GMT, Kieran Bingham wrote:<br>
> Quoting Jacopo Mondi (2024-09-23 11:13:36)<br>
> > Hi Harvey,<br>
> ><br>
> > On Mon, Sep 23, 2024 at 09:30:45AM GMT, Harvey Yang wrote:<br>
> > > From: Yudhistira Erlandinata <<a href="mailto:yerlandinata@chromium.org" target="_blank">yerlandinata@chromium.org</a>><br>
> > ><br>
> > > Add FaceDetectMode, FaceDetectFaceRectangles, FaceDetectFaceScores,<br>
> > > and FaceDetectFaceLandmark. Also add ControlTypePoint for supporting<br>
> > > FaceDetectFaceLandmark.<br>
> > ><br>
> > > Signed-off-by: Yudhistira Erlandinata <<a href="mailto:yerlandinata@chromium.org" target="_blank">yerlandinata@chromium.org</a>><br>
> > > Co-developed-by: becker hsieh <<a href="mailto:beckerh@chromium.org" target="_blank">beckerh@chromium.org</a>><br>
> > > Co-developed-by: Harvey Yang <<a href="mailto:chenghaoyang@chromium.org" target="_blank">chenghaoyang@chromium.org</a>><br>
> > > ---<br>
> > > include/libcamera/controls.h | 6 ++<br>
> > > src/libcamera/control_ids_draft.yaml | 85 ++++++++++++++++++++++++++++<br>
> > > src/libcamera/controls.cpp | 6 ++<br>
> > > 3 files changed, 97 insertions(+)<br>
> > ><br>
> > > diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h<br>
> > > index 7c2bb287..bf1b8609 100644<br>
> > > --- a/include/libcamera/controls.h<br>
> > > +++ b/include/libcamera/controls.h<br>
> > > @@ -34,6 +34,7 @@ enum ControlType {<br>
> > > ControlTypeString,<br>
> > > ControlTypeRectangle,<br>
> > > ControlTypeSize,<br>
> > > + ControlTypePoint,<br>
> > > };<br>
> > ><br>
> > > namespace details {<br>
> > > @@ -87,6 +88,11 @@ struct control_type<Size> {<br>
> > > static constexpr ControlType value = ControlTypeSize;<br>
> > > };<br>
> > ><br>
> > > +template<><br>
> > > +struct control_type<Point> {<br>
> > > + static constexpr ControlType value = ControlTypePoint;<br>
> > > +};<br>
> > > +<br>
> > > template<typename T, std::size_t N><br>
> > > struct control_type<Span<T, N>> : public control_type<std::remove_cv_t<T>> {<br>
> > > };<br>
> > > diff --git a/src/libcamera/control_ids_draft.yaml b/src/libcamera/control_ids_draft.yaml<br>
> > > index 9bef5bf1..c0cf5320 100644<br>
> > > --- a/src/libcamera/control_ids_draft.yaml<br>
> > > +++ b/src/libcamera/control_ids_draft.yaml<br>
> > > @@ -227,4 +227,89 @@ controls:<br>
> > > value. All of the custom test patterns will be static (that is the<br>
> > > raw image must not vary from frame to frame).<br>
> > ><br>
> > > + - FaceDetectMode:<br>
> > > + type: uint8_t<br>
> > > + description: |<br>
> > > + Reporting mode of face detection.<br>
> > > +<br>
> > > + The number of faces in each list must be the same.<br>
> ><br>
> > I would drop this. See below how I would rather expand the<br>
> > requirements of sizes in the single commands, now that they have been<br>
> > described in full.<br></blockquote><div><br></div><div>Removed, thanks!</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> ><br>
> > > +<br>
> > > + Currently identical to ANDROID_STATISTICS_FACE_DETECT_MODE.<br>
> > > +<br>
> > > + \sa FaceDetectFaceRectangles<br>
> > > + \sa FaceDetectFaceScores<br>
> > > + \sa FaceDetectFaceLandmarks<br>
> > > + \sa FaceDetectFaceIds<br>
> > > +<br>
> > > + enum:<br>
> > > + - name: FaceDetectModeOff<br>
> > > + value: 0<br>
> > > + description: |<br>
> > > + Pipeline should not report face detection result.<br>
> > > + - name: FaceDetectModeSimple<br>
> > > + value: 1<br>
> > > + description: |<br>
> > > + Pipeline should at least report FaceDetectFaceRectangles and<br>
> > > + FaceDetectFaceScores for each detected faces.<br>
> > > + FaceDetectFaceLandmarks and FaceDetectFaceIds is optional.<br>
> > > +<br>
> > > + - name: FaceDetectModeFull<br>
> > > + value: 2<br>
> > > + description: |<br>
> > > + Pipeline should report all face controls, including<br>
> > > + FaceDetectFaceRectangles, FaceDetectFaceScores,<br>
> > > + FaceDetectFaceLandmarks, and FaceDeteceFaceIds.<br>
> > > +<br>
> > > + - FaceDetectFaceRectangles:<br>
> > > + type: Rectangle<br>
> > > + description: |<br>
> > > + Boundary rectangles of the detected faces.<br>
> > > + The number of values should be the number of faces.<br>
> ><br>
> > If this was not a draft I would have asked what is the reference<br>
> > system for the rectangles. The PixelArray sizes, the output stream<br>
> > sizes ? As it is draft, we can refer to ANDROID_STATISTICS_FACE_RECTANGLES.<br></blockquote><div><br></div><div>Ah understood.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
><br>
> I thought we were trying to avoid adding controls to ::draft::<br>
<br>
I think that asking to make out of these proper controls would require<br>
more use cases and users than just mtkisp7<br>
<br>
><br>
> Maybe we should just rename ::draft:: to ::android:: now that we have<br>
> namespaced controls ? (or add ::android:: ?)<br>
<br>
I wouldn't be opposed in principle, but I still would like to convey<br>
the fact these are not stable or here to stay forever.<br></blockquote><div><br></div><div>Let me add `control_ids_android.yaml` in the next version.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
><br>
> --<br>
> Kieran<br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>BR,</div>Harvey Yang</div></div></div>