diff options
author | Daniel Semkowicz via libcamera-devel <libcamera-devel@lists.libcamera.org> | 2022-07-13 10:43:15 +0200 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2022-07-14 20:12:17 +0200 |
commit | 5e8c41ce4ed8c013234e03a067bc7dcac6cb287e (patch) | |
tree | dd4b17a23daa63574aece896dafc5e0fad364974 /src/ipa/libipa/algorithms/af_hill_climbing.cpp | |
parent | 0c249cbd2b3711e9372219b655e10bc5f5560a90 (diff) |
ipa: af_hill_climb: Skip the first frame after triggering auto focus
When AFTrigger is received, AF algorithm internal state is reset to
initial values. If reset happens between frames, then first contrast
value that arrives after this, is interpreted as contrast for initial
position. This is wrong, because it was measured for lens position
before the reset. Skip this first frame to allow correct contrast
measure for the initial lens position.
Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
Diffstat (limited to 'src/ipa/libipa/algorithms/af_hill_climbing.cpp')
-rw-r--r-- | src/ipa/libipa/algorithms/af_hill_climbing.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ipa/libipa/algorithms/af_hill_climbing.cpp b/src/ipa/libipa/algorithms/af_hill_climbing.cpp index f666c6c2..28d09176 100644 --- a/src/ipa/libipa/algorithms/af_hill_climbing.cpp +++ b/src/ipa/libipa/algorithms/af_hill_climbing.cpp @@ -84,6 +84,14 @@ namespace ipa::common::algorithms { * \return New lens position calculated by AF algorithm */ +/** + * \fn AfHillClimbing::setFramesToSkip() + * \brief Request AF to skip n frames + * \param[in] n Number of frames to be skipped + * + * Requested number of frames will not be used for AF calculation. + */ + } /* namespace ipa::common::algorithms */ } /* namespace libcamera */ |