From patchwork Fri Jun 26 10:25:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 8439 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 604C2C0109 for ; Fri, 26 Jun 2020 10:25:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1A863609DF; Fri, 26 Jun 2020 12:25:55 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="McLarQn+"; dkim-atps=neutral Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B9F9F609C9 for ; Fri, 26 Jun 2020 12:25:51 +0200 (CEST) Received: by mail-wm1-x341.google.com with SMTP id t194so8866375wmt.4 for ; Fri, 26 Jun 2020 03:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ssrOPFUZVLpjswytpOgwcHjf0cjPo3Sc5g8pdExedpw=; b=McLarQn+MguUonMzzXQeNRIf8dU1OQFhpyWJgqOI+Kp7lWvEWdUUEg012Q95OWjsqY odhNYSfrYyP0IkwKQjlDCTFrgo/RlFa0fwI68FfFbGJ/b3mRcAChRYL6d4FwM55sgHST IeuuOh3IRlCdGeF/1ZJ03Lx5npBImC8bmbTD2Y4snPxa560nHtZuIIA0tiIRtQJouAXQ PmvK0hxPq45mnwHnHJpB1Bnx/hCdRRQ0MJKcgzWbynDdQSMvbDCKmFXs2eyAd/oWYBAY na5gdSln8Ax8H9213s2F1SClrusj4MKr6rzbgVhNf4zS04jAV3eA3F8S/6JzSu95Fy5u DnLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ssrOPFUZVLpjswytpOgwcHjf0cjPo3Sc5g8pdExedpw=; b=sCqyk272VrEXApypOGMemC71o2r53mD3La5XJWp23RJj1rUwFLnXcZDle/i1NuldFq rhW2LvsrzkR9qqM5AKPZIx4lnmb0w3i8Bq5lK51KXLss0XpCKLnvQFVHsUyVf/wlAuyg L6NuH3jOz9TRZeIZZZ7wzF0a1cACTY5AzbzCNf4HubO5X5BvyRxavUKQsKtjwdGopWag W8frHaFLgSSzbbKEgyoTdfRqLvjqAd0NsxWi3Vh/3MIfPDL77FXbFEXjY3bW1uUJadli kxo7PSbm07KbXp9ZanQNPVUAUtw/h7DQD4+vSXRpjzKXZ+YIAllR2K2BId/1GiJTvy/g utmQ== X-Gm-Message-State: AOAM532iNwZ1Vy5kVyOmmS1l4JNadcTBshjezp2xLs4wlKinkZb1O6G4 WVoRxYVWteu/XhCl0V/trvV0Sx1Lio0= X-Google-Smtp-Source: ABdhPJyNLbclmQ41bWTCWFi2oNMOcLPzqLghWX27RGxEhzEGI0j1ImY9C0p5Wv9e1ENN1VSOdWGxeg== X-Received: by 2002:a1c:4185:: with SMTP id o127mr2639525wma.8.1593167148975; Fri, 26 Jun 2020 03:25:48 -0700 (PDT) Received: from naushir-VirtualBox.patuck.local ([88.97.76.4]) by smtp.gmail.com with ESMTPSA id r8sm21959679wrp.40.2020.06.26.03.25.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 03:25:48 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Fri, 26 Jun 2020 11:25:28 +0100 Message-Id: <20200626102531.1187650-2-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200626102531.1187650-1-naush@raspberrypi.com> References: <20200626102531.1187650-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/4] libcamera: controls: Add focus Figure of Merit (FoM) control 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" Provide a control to allow the IPA to return a FoM to indicate how in-focus a scene is. Note, this is not to be used as a means to implement a focus algorithm by the application, rather an indication of how in-focus a scene is. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman --- src/libcamera/control_ids.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index 8c3e4c72..b46693ec 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -251,4 +251,15 @@ controls: higher than anyone could reasonably want. Negative values are not allowed. Note also that sharpening is not applied to raw streams. + + - FocusFoM: + type: int32_t + description: | + Reports a Figure of Merit (FoM) to indicate how in-focus the frame is. + A larger FocusFoM value indicates a more in-focus frame. This control + depends on the IPA to gather ISP statistics from the defined focus + region, and combine them in a suitable way to generate a FocusFoM value. + In this respect, it is not necessarily aimed a providing a way to + implement a focus algorithm by the application, rather an indication of + how in-focus a frame is. ...