From patchwork Fri Jun 26 10:25:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 8436 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 ECD2FC0109 for ; Fri, 26 Jun 2020 10:25:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 78288609C6; Fri, 26 Jun 2020 12:25:49 +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="CEWTGL/C"; dkim-atps=neutral Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 865FC609A3 for ; Fri, 26 Jun 2020 12:25:48 +0200 (CEST) Received: by mail-wm1-x32d.google.com with SMTP id l17so8357654wmj.0 for ; Fri, 26 Jun 2020 03:25:48 -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:mime-version :content-transfer-encoding; bh=G5CYLtzO4jUHmgTRrc1m13ONQ/BCSddDmFE3psNWyYg=; b=CEWTGL/Ca2fFYqz7r3nsWTxcHbOCihijkOwwLdvTHENHADCuhP7U4GwfyHb3LTZmdS ryfLsRD3OD7/t0HXjtoFFyYanvewlgUeAFq2DBNIHtEck5ORi1Sk7GSfEWirYohzZNUT bj7szhM4ytHy4LAbcyBzk4pc2UF79DqJjuTCQvdCKhFFdnUoIHe6TMvo7VaZ0inIeyn9 CsPmTXL0QkgwxBjQc7CJ+oJ9mhyhR8xZkjP9h4R0bTIhq0UsPd6rH4iKNyBot0nXCJQg qU+7vTN47gt5rF87zgd/aUWS2vlRO0tR8qkXEb1D9hMoQr5lxeHgiuMBswxkyYXsYFXT rGsw== 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:mime-version :content-transfer-encoding; bh=G5CYLtzO4jUHmgTRrc1m13ONQ/BCSddDmFE3psNWyYg=; b=jocu0OrMttcJA7TJGWhzY7gY+2GYZzXDp9YsA5p4VwJpgsGKfMlqWSgwVjKOuQ8jCQ qMBSoYaNFlT8M2EVcfWfftD88p9yYphrwguIbGUtGKso0OyvmBT4OZvqgpEc4ZFY3cJu 3k3B9SZneagvIdP/8L6yQMHGo5OWGMKoMUgHc4A5Y+apnjSx3ldskSXf7MTewwOKYj9P ZeM5XcLbVoCdeXiVSGZj2/rk8boxo65myORMEM1iCufUCYQN1w9kIuEEGQW3lNeUPhAv vF31FxZr2VN53zq2TPY5vqTTHYEMqIF6H0zOQ0FC1ccB82oGarwqnQATesRNuGI5Ontw Ja0w== X-Gm-Message-State: AOAM5324smFtnonOsmGkkFH6rYgHxZCtKzAXfzw0LI3/2Vr07eAOfVmr 51l+9X9FvH+JhZL96Is1W6SBx3Hhgyk= X-Google-Smtp-Source: ABdhPJz5Bo+nOdbRdFZBzJvrBm4YByFyqP4Xr76fjW+gg5yW3HUJalTpzUN9Bs3kfq+yX+c9Oq2Euw== X-Received: by 2002:a7b:c441:: with SMTP id l1mr2517252wmi.7.1593167147912; Fri, 26 Jun 2020 03:25:47 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 03:25:47 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Fri, 26 Jun 2020 11:25:27 +0100 Message-Id: <20200626102531.1187650-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/4] Focus feedback 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" Hi all, A number of our users use a focus metric for manually focussing the HQ camera lenses. This metric is derived from the ISP statistics block. This set of changes adds a Figure of Merit (FoM) libcamera control that can be used for such situations. As a note, this is a singular value that gives a numeric score for how in-focus an image is, not a means to run an AF algorithm. It is up to the IPA to calculate this score however it sees fit. The Raspberry Pi averages the middle two regions in a 4x3 grid to start with. We may change this later when we have adjustable regions. As always, comments welcome. Regards, Naush Naushir Patuck (4): libcamera: controls: Add focus Figure of Merit (FoM) control libcamera: ipa: raspberrypi: focus: Fix for uninitialised variable libcamera: ipa: raspberrypi: Populate libcamera metadata after controller process libcamera: ipa: raspberrypi: Populate focus FoM from the ISP statistics src/ipa/raspberrypi/controller/focus_status.h | 2 +- src/ipa/raspberrypi/controller/rpi/focus.cpp | 2 +- src/ipa/raspberrypi/raspberrypi.cpp | 15 ++++++++++++++- src/libcamera/control_ids.yaml | 11 +++++++++++ 4 files changed, 27 insertions(+), 3 deletions(-)