[libcamera-devel] [RFC PATCH 4/4] libcamera: lens: Add the hyperfocale property support
Jean-Michel Hautbois
jeanmichel.hautbois at ideasonboard.com
Thu Jun 9 08:03:06 CEST 2022
A tuned lens may have measured its hyperfocale, which can then be used
by the controls::LensPosition control. Add support for it in the camera
lens properties database.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois at ideasonboard.com>
---
include/libcamera/internal/camera_lens_properties.h | 1 +
src/libcamera/camera_lens_properties.cpp | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/include/libcamera/internal/camera_lens_properties.h b/include/libcamera/internal/camera_lens_properties.h
index 7424b375..13fa025c 100644
--- a/include/libcamera/internal/camera_lens_properties.h
+++ b/include/libcamera/internal/camera_lens_properties.h
@@ -19,6 +19,7 @@ struct CameraLensProperties {
static const CameraLensProperties *get(const std::string &lens);
Size lensFocusRange;
+ float hyperfocal;
};
} /* namespace libcamera */
diff --git a/src/libcamera/camera_lens_properties.cpp b/src/libcamera/camera_lens_properties.cpp
index 225546ae..7cab2704 100644
--- a/src/libcamera/camera_lens_properties.cpp
+++ b/src/libcamera/camera_lens_properties.cpp
@@ -35,6 +35,9 @@ LOG_DEFINE_CATEGORY(CameraLensProperties)
*
* \var CameraLensProperties::lensFocusRange
* \brief The limits for the sensor position, stored as a min and a max.
+ *
+ * \var CameraLensProperties::hyperfocal
+ * \brief The hyperfocal distance measured, expressed in millimeters
*/
/**
@@ -48,6 +51,7 @@ const CameraLensProperties *CameraLensProperties::get(const std::string &lens)
static const std::map<std::string, const CameraLensProperties> lensProps = {
{ "dw9714", {
.lensFocusRange = { 150, 800 },
+ .hyperfocal = 500,
} },
};
--
2.34.1
More information about the libcamera-devel
mailing list