From patchwork Mon Sep 23 09:30:43 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: 21330 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 9EB51C0F1B for ; Mon, 23 Sep 2024 09:33:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3B5E56350E; Mon, 23 Sep 2024 11:33:26 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="hP+c/kUC"; dkim-atps=neutral Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 687D26037E for ; Mon, 23 Sep 2024 11:33:24 +0200 (CEST) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-206aee4073cso44118565ad.1 for ; Mon, 23 Sep 2024 02:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727084002; x=1727688802; 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=bQ88hznwBAVdbzTOFWqOMrnt2jK5dY561baBX+AixiI=; b=hP+c/kUCRoFyPhoxFZE/delLyKbsuYflUtNPcCy7C+lYDgek3PN3+WybY92kEjQIVu zlOS3RGkJ/0uXFk6tp6tcqQw/dd1MJx4yZs/6H1u11b3ETh2YUDCp/KTLA7DE5L9DXWX wrJYiGkdT2i1R0cd5NqzWKMS2osNzGS4Kg0mA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727084002; x=1727688802; 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=bQ88hznwBAVdbzTOFWqOMrnt2jK5dY561baBX+AixiI=; b=FNY+PmgOMos2+oQAa964GYZE4STmw3aqj4oYYhEid4232OHk57t2QNjUKNoETpGt2n evGLJxwwNfMPPC/NV5h//uc1yMnIYGtcilbSfxDVow5+SbRRLekWO5qTe/Krc5RoBc7D rJ6l3hO3ttsbE64xRytFP1QccfaFMfc4Ou0pQ+rNkaF+75V+GZFJynEN+ftcRhozm1Xk kbEizaE9kJ9sbK8gfqbi6jmUShCUEfi8o9n/3Lt+ZvH2bKTBjP2bu+uBnLzRN/NScqyL GY9EzgnBdN+CG1VDUF80jadQc0xxBw2k94xwBPKZXg/2GfsGuLI45vbxFQPKdoGkP1LG 1LXQ== X-Gm-Message-State: AOJu0YwsogRuQciEeOYDmZ0NbCDz5/GSD6F8FVj8nScu2nzi+hLlAJce xEqs5aug6hV0AaMzaZN5RrjNaln5X9F0CODu4fsEo5cTqZv2u28mrepyH6eiCZ3NaVv/bfImkoQ = X-Google-Smtp-Source: AGHT+IGhD3VhAFA72a3P47gTCpjTOn3IVEu1mpDwXh7emdmlBvhiAuaDBNqpjePU2J2++jfhxzlHAQ== X-Received: by 2002:a17:902:f60f:b0:202:51ca:9823 with SMTP id d9443c01a7336-208d9854d26mr173182045ad.46.1727084002603; Mon, 23 Sep 2024 02:33:22 -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-207946d6673sm129864995ad.158.2024.09.23.02.33.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 02:33:22 -0700 (PDT) From: Harvey Yang X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang Subject: [PATCH v5 0/3] Add Face Detection Controls Date: Mon, 23 Sep 2024 09:30:43 +0000 Message-ID: <20240923093317.3500444-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/1276305 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. 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 | 75 +++++++++++++++++++++++- src/libcamera/control_ids_draft.yaml | 85 ++++++++++++++++++++++++++++ src/libcamera/controls.cpp | 6 ++ src/libcamera/geometry.cpp | 7 +++ test/geometry.cpp | 14 +++++ 8 files changed, 239 insertions(+), 6 deletions(-)