From patchwork Mon Jul 6 08:56:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 8645 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 13EBEBD792 for ; Mon, 6 Jul 2020 08:56:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8B1B760C59; Mon, 6 Jul 2020 10:56:39 +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="F0pF90f6"; dkim-atps=neutral Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CEE77603B1 for ; Mon, 6 Jul 2020 10:56:37 +0200 (CEST) Received: by mail-wm1-x343.google.com with SMTP id f139so41030059wmf.5 for ; Mon, 06 Jul 2020 01:56:37 -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=n32uuMBO84Te9GK7nFDuckXfnJke7rImJZsKTjKeGHo=; b=F0pF90f62UV/HMZ1BFzIQw9YGSyfhO3RStkuJu+emd0g69HlWWfyDHnhfVm538/6zH RPfhQA+G70DfGwwRDdppfYxyRGydn0IfuP8ER0RPuLzRyaM71wIj5rEDmPjuZxLI5UFs D0vfS8wLfNBTYz56E42ZvH/Rldt8X5nxUjf8MM89qi7iey1VNA4HTbPYn0/bRPU7+CSK gke4VfyefoNfTmHmMyB4RtdWimZKQcdpD0yYDpvRFDb8l2GKbCNgcTn6OuDbELwpMJrq cx/QKPHRaRpmR49eyBIk/fPj8LsCgbWftytWc9nNm61XDi7FFSRRI5wrJ0IXewVzv/+M bNdA== 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=n32uuMBO84Te9GK7nFDuckXfnJke7rImJZsKTjKeGHo=; b=a4m0FcxqIWnZ5D3HUVQ1qmXPYPYrVTe7KhggbuPNd+Go74uOSzQLivQ0Hucce7Ivam Iy5zW+pdNGqAHimzDuNKeJKnS0HcLXl5HzCBuSMXW2SawC3kcOrre1Dnd4e6aTjmYcaK hlq/Qyssup4Uzunz781wpLbkoQSD8VNilBfSxCYp5+5gCGQxym06zaMYwg9dMeWiapv4 9xLzekuKXD8ub+GZL7jHJeY3aww0fUbK9pxhjsdn/1TVkhWcMxRB+qwzHDJp8BZ7fAvS S29GJ0nNmawBGQ7Omk/UfnmezBNst4UjiZUeHr9FMQ4p7Spq4LZE10Fq+OzcMLCaVkQu Oi+w== X-Gm-Message-State: AOAM5311CsyBzASgBHsZXu89xyxTDfHnPHL82ozQdwWFK1c9uv0dDZ51 z870QVMVzWG/Sp88BTC5MFeFE15HJoY= X-Google-Smtp-Source: ABdhPJxO+fpRFEhFBsfWJUcZH/VsYfQqiGEHTMEsk7zz93zoRYVCnwmQ4PCCycE6EebvJkm2OU36zw== X-Received: by 2002:a1c:1bc6:: with SMTP id b189mr46471606wmb.166.1594025797276; Mon, 06 Jul 2020 01:56:37 -0700 (PDT) Received: from naushir-VirtualBox.patuck.local ([88.97.76.4]) by smtp.gmail.com with ESMTPSA id k185sm22600282wmk.47.2020.07.06.01.56.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2020 01:56:36 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Mon, 6 Jul 2020 09:56:23 +0100 Message-Id: <20200706085625.1625432-2-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200706085625.1625432-1-naush@raspberrypi.com> References: <20200706085625.1625432-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/3] 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: Laurent Pinchart --- 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..988b5016 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 at providing a way to + implement a focus algorithm by the application, rather an indication of + how in-focus a frame is. ...