From patchwork Wed Sep 25 08:12:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng-Hao Yang X-Patchwork-Id: 21349 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 2C426C0F1B for ; Wed, 25 Sep 2024 08:16:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3B1F76350F; Wed, 25 Sep 2024 10:16:02 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="BrgPPuZH"; dkim-atps=neutral Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 12667634F4 for ; Wed, 25 Sep 2024 10:16:01 +0200 (CEST) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-20792913262so76096015ad.3 for ; Wed, 25 Sep 2024 01:16:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727252159; x=1727856959; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=XPXWRnLkBCOGOqqbWaOgbmBFdvvaxd8o9a+SNF+IppU=; b=BrgPPuZHWF4181BwS0GbHR6oscQtMH+/egj65zgKOmDxBuSbEcmERLUPetCpxf396N 0wrfzuxVGK4XG0R7Zqd29QXwS/oSQ8mC932jUSp7eWl4OxRzV/+FtO8BPDESS6oDtDRI AF8nNkYm45a8eOb/Rv5oChZRPPA2sjTac7kAc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727252159; x=1727856959; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XPXWRnLkBCOGOqqbWaOgbmBFdvvaxd8o9a+SNF+IppU=; b=iseBkG09ejudbE030URUREixRcbeFIbBJ7JxtsI+LmAY73cPc0/ifaqeKUqgvl6MWc xSIeHGEJ3+g7+SZh/8AQmP/Ff/ez4iQ7x++zJPmRy85/YESq7k/PpcCjvvql5MLpFsY9 u2GYF6vqvpZ5F3/0vgirKfrczU+TJSrYq2xAXdDD1bLMOMT5RQd1pqHCgLhhPR9VpZYl NxrnlE10eqaK6I0tRdnZxXq3WjPhjAKdekQRczj6p0qWCfWOyDaurdD8KF94qe8UcX9K F0FSD8o7Jn3CgI89va3Hs5a7KY+MqnX2KkD6xIox7rKJYYKcOXsN/2AWjmKPtGXUyyS4 +4Sw== X-Gm-Message-State: AOJu0Yxd8RqVd13dESmOf0dl6KZi1DfeJFc97Djy99tR/TMFYR+tLFlK Vy4GenWPYB8lGfhsYAAnqDOsmd/spHS5KQpKkIRcD+PjWfSwlJtYp2s6pWiwktmo25z9H7H5HQM = X-Google-Smtp-Source: AGHT+IEcOBu2ak6B0OQtkL2RUtK7KOJ/4ApV9Z1Wfi5ZP98HrSuuCDcwbWU9f2tFvf/IhOGIvMpHpQ== X-Received: by 2002:a17:903:41cd:b0:205:5582:d650 with SMTP id d9443c01a7336-20afc5e3a39mr28438625ad.52.1727252158720; Wed, 25 Sep 2024 01:15:58 -0700 (PDT) Received: from chenghaoyang-low.c.googlers.com.com (0.223.81.34.bc.googleusercontent.com. [34.81.223.0]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20b002aaa8fsm6336465ad.240.2024.09.25.01.15.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2024 01:15:58 -0700 (PDT) From: Harvey Yang X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang Subject: [PATCH v8 0/3] Add Face Detection Controls Date: Wed, 25 Sep 2024 08:12:23 +0000 Message-ID: <20240925081551.3265942-1-chenghaoyang@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog 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" Hi folks, This series of patches adds face detection controls in the control ids, the corresponding usages, and a c'tor of libcamera::Rectangle to construct it easiler with face detection results. It passed gitlab pipeline checks: https://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1276999 This is one of the series cherry-picked from cros mtkisp7 branch. The corresponding CLs in cros are: https://chromium-review.googlesource.com/c/chromiumos/third_party/libcamera/+/4741266 https://chromium-review.googlesource.com/c/chromiumos/third_party/libcamera/+/4741267 https://chromium-review.googlesource.com/c/chromiumos/third_party/libcamera/+/5669229 https://chromium-review.googlesource.com/c/chromiumos/third_party/libcamera/+/5669232 The usages in pipeline handler mtkisp7 will be added later. The checkstyle's suggestion on the second patch is ignored, as it changes the style of previous code. 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 Yudhistira Erlandinata (2): libcamera: Add rectangle two-point constructor libcamera: Add face detection controls include/libcamera/controls.h | 6 ++ include/libcamera/geometry.h | 7 +++ src/android/camera_capabilities.cpp | 45 ++++++++++++-- src/android/camera_device.cpp | 70 +++++++++++++++++++++- src/libcamera/control_ids_draft.yaml | 88 ++++++++++++++++++++++++++++ src/libcamera/controls.cpp | 6 ++ src/libcamera/geometry.cpp | 7 +++ test/geometry.cpp | 14 +++++ 8 files changed, 237 insertions(+), 6 deletions(-)