From patchwork Tue Oct 1 19:13:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 21465 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 57D39BD80A for ; Tue, 1 Oct 2024 19:14:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 15F77618D7; Tue, 1 Oct 2024 21:14:04 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="wWOiWVn2"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B0BF260553 for ; Tue, 1 Oct 2024 21:14:01 +0200 (CEST) Received: from ideasonboard.com (unknown [5.77.89.72]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1CE2AA1A; Tue, 1 Oct 2024 21:12:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1727809949; bh=QsajVl1tjVOvkKsmylTPyJgh1+mGwd3T3PMxPBVWuWM=; h=From:To:Cc:Subject:Date:From; b=wWOiWVn2qYqs1Z+lP6t6sOKIxOm6VJCb/RLtSFU2qDgaBKCJPo21o000bN/NaE+9C dU/gWnm7P+m/NjyTTO2VRQmZpca97NWo7r/2+N/bQJJvoMfMoPo9t/ivQXOauZZq9/ dFDf4DRKFFaobTaisOY3sPtwnDJVpTvickG0be8c= From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , Harvey Yang Subject: [PATCH v10 0/5] Add Face Detection Controls Date: Tue, 1 Oct 2024 21:13:44 +0200 Message-ID: <20241001191354.55056-1-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.46.1 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" I took over "[PATCH v8 0/3] Add Face Detection Controls" on top of the patch to the Rectangle class on which we have gone back and forth for the last week I'll merge this version v10: - Simplify patches 1 and 2 to avoid further discussions - Make subtraction between signed integers safer constexpr Rectangle(const Point &point1, const Point &point2) : Rectangle(std::min(point1.x, point2.x), std::min(point1.y, point2.y), static_cast(std::max(point1.x, point2.x)) - static_cast(std::min(point1.x, point2.x)), static_cast(std::max(point1.y, point2.y)) - static_cast(std::min(point1.y, point2.y))) - Collect tags Pipeline: https://gitlab.freedesktop.org/camera/libcamera/-/pipelines/1281864 v9: - add "libcamera: geometry: Clarify Rectangle's top-left corner" - Rebase 2/5 on top of this using min(p1.y, p2.y) - Break out 3/5 from 4/5 - Reword parts of 4/5 to make it more similar to the existing controls descriptions - Make FaceDetectMode a int32_t as required by e6da224926b0 ("libcamera: controls: Handle enum values without a cast") - Use int32_t as a type for FaceDetectMode in 5/5 - Populate ANDROID_STATISTICS_FACE_SCORES with actual face scores - Populate the ANDROID_STATISTICS_FACE_DETECT_MODE metadata from settings only if present Pipeline: https://gitlab.freedesktop.org/camera/libcamera/-/pipelines/1280968 v8: Reverted back to v5 that new control ids in the draft. v7: Fixed comments. v6: - Added control_ids_android as the new control id list. - Moved the new control ids there, instead of in draft. v5: - Rewrote Rectangle's c'tor that allows any two diagonal points. - Added unit tests. v4: - Added support of FaceDetectModeFull and FaceDetectFaceIds. - Fixed descriptions of control sizes. v3: Applied fixes according to Jacopo's comments. - Moved the new face detection controls from core to draft. - Amended new controls' descriptions. v2: - Squashed the fourth CL into the last patch, as it's a fix. - Fixed CLs based on checkstyle's suggestions. Harvey Yang (1): libcamera: android: Add face detection control support Jacopo Mondi (1): libcamera: geometry: Clarify Rectangle's top-left corner Yudhistira Erlandinata (3): libcamera: geometry: Add two-point Rectangle constructor libcamera: controls: Add ControlTypePoint libcamera: control_ids_draft: Add face detection controls include/libcamera/controls.h | 6 ++ include/libcamera/geometry.h | 9 +++ src/android/camera_capabilities.cpp | 44 +++++++++++++-- src/android/camera_device.cpp | 66 +++++++++++++++++++++- src/libcamera/control_ids_draft.yaml | 82 ++++++++++++++++++++++++++++ src/libcamera/controls.cpp | 6 ++ src/libcamera/geometry.cpp | 20 +++++++ test/geometry.cpp | 14 +++++ 8 files changed, 241 insertions(+), 6 deletions(-) --- 2.46.1