From patchwork Tue Sep 3 10:35:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 21151 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 5E5E8C324C for ; Tue, 3 Sep 2024 10:38:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7219F634E7; Tue, 3 Sep 2024 12:38:15 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oTcNNG6q"; dkim-atps=neutral Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 29F81634A6 for ; Tue, 3 Sep 2024 12:38:14 +0200 (CEST) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-371ba7e46easo3472821f8f.0 for ; Tue, 03 Sep 2024 03:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1725359893; x=1725964693; 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=E/+sGcvKB1bIMpbCjSserfPhdOfGdCnL+Fk2rSqbIzk=; b=oTcNNG6qJ6CeiOrdQW+oOvG8Pqe5rgkB028IyOPx1eeogV5bYZ2RF+wabSz4vxAEGK DDOOhLqHCBbDAYQ6R5Bi2XO/c3Qse5seu1LKB800Zbi8AJXm9CcP279ZUuy6hPonSKEr NaPHtb/Whamdq+Dpoz6ibuAmhzZ7DEH80hdlc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725359893; x=1725964693; 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=E/+sGcvKB1bIMpbCjSserfPhdOfGdCnL+Fk2rSqbIzk=; b=ovU01HiqnyTHsXOI7UORow5KNWdn0stEYhxbt6nCrdzx2XbOVfUf6as9lWLfI65ewC /yRyv/XNXe0uYBscHfazEp8/BFPwHDTPGe0Xd0pug2n6Si74rkucajYE+kM3Eo26Jehr oEwbQvUCx0Bd0dii8xMR7qN9/Q+09qe4HsDT2z2Pf4/oBbqyVBBqEwnz6phg/7jrqDWw HAFuAusWR5IwDfT/SJxQeTR/ifEcyvePsP8LvOHrGTlO91FQqu1q8NFIMJ3gdXygDNPH CCLzpXkZXSuUGDTDheR1EAegCmkh1F+38JSKRMvWM4IdBbSej7P/4a/Z0M3SU7boDcGv P1FA== X-Gm-Message-State: AOJu0Yx+TXJz1b7bxHFUoRCeRVDySN84zG33V4cXNk1g+EsOJMHFiiuf CvVzWL+RD6m51+OmJDVVkcTySK3Q0/DJnL1efMmu3B0VxN6qbaGI5DbVj3y7GPd0ZJjYK8fJj1Z nag== X-Google-Smtp-Source: AGHT+IHntg3AAe6T3fmT5BBiW1YByUjvWsiV2RwMzEEUwoJvaAVIyvVT+3/ube5kTVL3ZcRrPt6Now== X-Received: by 2002:a5d:470f:0:b0:35f:d70:6193 with SMTP id ffacd0b85a97d-374bcfe5e4dmr6548826f8f.41.1725359893041; Tue, 03 Sep 2024 03:38:13 -0700 (PDT) Received: from chenghaoyang-germany.c.googlers.com.com (161.126.77.34.bc.googleusercontent.com. [34.77.126.161]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-374bfbfc7b7sm8929393f8f.88.2024.09.03.03.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 03:38:12 -0700 (PDT) From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang Subject: [PATCH v4 0/3] Add Face Detection Controls Date: Tue, 3 Sep 2024 10:35:24 +0000 Message-ID: <20240903103810.3288042-1-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.46.0.469.g59c65b2a67-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/1261374 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. 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 | 2 + 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 | 14 +++++ 7 files changed, 227 insertions(+), 6 deletions(-)