From patchwork Thu Nov 17 15:45:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 17810 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 E3269BE08B for ; Thu, 17 Nov 2022 15:45:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A5E436308F; Thu, 17 Nov 2022 16:45:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1668699908; bh=ftLM8naKjL8YKhpx8qNdue12tjb1tvtXu1X8rukWDk8=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=R93wJIlr44Q8yy54rHIPoOYYHKZztd0FmxX+yF5v7yxuQsymcwku+UICMHmCLQS2M zTTGa+cvghKPfX+V8rRrJkA43775jFpHJ1gzJtnyIesnbi/iEjwh7ttWXhPziTLa9E IadFQoACZkoumM3Xd1Pv3UsAOZaFKPFkdtBJT8G7Nb9MCFGBWgOjXFy0dPbf12aJp9 8NP060H+tMJWcjI5Iv+4NJtPvMOdSXptwhyrPrk3r7SJFJFk+VPCd89FbKhYl3oDQV KjYEMiUp5beKWkXq+JoX9T/R7KB9kAqEj/BMJmqxJLMa7VFLqwPrIybayFlW67J/Jf 3NYPjsYKgaDug== Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A899161F32 for ; Thu, 17 Nov 2022 16:45:05 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="QGvpj3jv"; dkim-atps=neutral Received: by mail-wm1-x32f.google.com with SMTP id t1so1662890wmi.4 for ; Thu, 17 Nov 2022 07:45:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wKEskL/cmPbXtE9KRAG3Cape98ttE87f4LFRyTbSncE=; b=QGvpj3jvhYFssUf9wYuhELu8jSizg5UZWi6J/pU/itsv63RMAzEU9O3rwWi2aM/U6V IT+af9/bT91shR0E11ZMRgqED+vJ0OnRVhYXobhUUEIdHQL5PW/W/rrdBclnzQf84V4W SDCyDDTMSzYsV7CEVl9r8cNHOrtYaNdoROCqZYHXsHXlEipld1dln1AY/5k0Iwqa3Mao sKaODBoGzWb+NU713nFgs3XevfKilBNKWC7Gv0JXmDRYT8qEhgSq3RsTrl/ba0jKR8m4 vA22tQDjbH+gNXbOVw5NdAo4p2XVU4H77bMQvYsjRBSbj1Geb0LmhwJW4ocmSHuGF9yk gnhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wKEskL/cmPbXtE9KRAG3Cape98ttE87f4LFRyTbSncE=; b=RlSd3dYfaQvd5aVYx/VgsPnfUljYh95Br3NqGN3ti+Lxe0oXWIKf7nV5TnOxg9Xre1 Vm+sWJchsDU2709HDSpMx69dw432qke2z3Yru1HBC4ZWUQokAYwot5BpIrUaefVBzUkb H0JBR63Nbtg0TfMQBuco5YONkwG5OE6on5MR403meV0J8fy3h8Ito2KWU/6LkLRdIVzV S2x5kAr3nDZFpUF49AVAQVCyTftQiyettqh7hPPEPnC+eoJD1Pd6LKPW2129rxdHxTNG QWYlWZmPRl2fFj0PKN4DYGZ77y56Z/2Ci7utWqG4ovAMMJqPqhCSzz/BaSm47MpoFLGA DKOw== X-Gm-Message-State: ANoB5pmMfQZp4ghZQzaUDu69daOrjvglw4TyrgkzHHTTn9t/tYWuGDO+ eRvMMlLEeB6bZWGfTcBNxw1XLuJKIntQ1A== X-Google-Smtp-Source: AA0mqf6yp2Q3PU2LqUnpYmVNCeANA8bPHpUU735In9/Jp+WW0OSMlHaIX2Qs2rl2NwTucwuurIhhNw== X-Received: by 2002:a05:600c:4b18:b0:3c5:9cf6:32a4 with SMTP id i24-20020a05600c4b1800b003c59cf632a4mr2220050wmp.88.1668699905041; Thu, 17 Nov 2022 07:45:05 -0800 (PST) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:e4a2:3070:eea4:e434]) by smtp.gmail.com with ESMTPSA id e21-20020a05600c219500b003cf894dbc4fsm1606687wme.25.2022.11.17.07.45.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 07:45:04 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Thu, 17 Nov 2022 15:45:00 +0000 Message-Id: <20221117154500.8829-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221117154500.8829-1-david.plowman@raspberrypi.com> References: <20221117154500.8829-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/1] libcamera: controls: Change LensPosition units to dioptres 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: , X-Patchwork-Original-From: David Plowman via libcamera-devel From: David Plowman Reply-To: David Plowman Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The units for the LensPosition control, previously defined as being in units of 1 / hyperfocal_distance, are changed to 1 / distance (in metres). Signed-off-by: David Plowman Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- src/libcamera/control_ids.yaml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index a456e6c0..adea5f90 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -591,25 +591,27 @@ controls: AfModeManual, though the value is reported back unconditionally in all modes. - The units are a reciprocal distance scale like dioptres but normalised - for the hyperfocal distance. That is, for a lens with hyperfocal - distance H, and setting it to a focal distance D, the lens position LP, - which is generally a non-integer, is given by + This value, which is generally a non-integer, is the reciprocal of the + focal distance in metres, also known as dioptres. That is, to set a + focal distance D, the lens position LP is given by - \f$LP = \frac{H}{D}\f$ + \f$LP = \frac{1\mathrm{m}}{D}\f$ For example: 0 moves the lens to infinity. - 0.5 moves the lens to twice the hyperfocal distance. - 1 moves the lens to the hyperfocal position. - And larger values will focus the lens ever closer. + 0.5 moves the lens to focus on objects 2m away. + 2 moves the lens to focus on objects 50cm away. + And larger values will focus the lens closer. - \todo Define a property to report the Hyperforcal distance of calibrated - lenses. + The default value of the control should indicate a good general position + for the lens, often corresponding to the hyperfocal distance (the + closest position for which objects at infinity are still acceptably + sharp). The minimum will often be zero (meaning infinity), and the + maximum value defines the closest focus position. - \todo Define a property to report the maximum and minimum positions of - this lens. The minimum value will often be zero (meaning infinity). + \todo Define a property to report the Hyperfocal distance of calibrated + lenses. - AfState: type: int32_t