[libcamera-devel] [PATCH v2 7/7] DNI: libcamera: sensor: ov5670: Add lens properties
Jacopo Mondi
jacopo at jmondi.org
Thu Feb 6 19:52:47 CET 2020
Register lens properties in the ov5670 sensor handler.
This patch is not intended for merge as we know lens properties do no
belong to the sensor handler, but I am including it anyhow to trigger
discussions on where they would be more appropriately defined.
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/libcamera/sensor/ov5670.cpp | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp
index a49fcebb2d9d..1396e9fe94dc 100644
--- a/src/libcamera/sensor/ov5670.cpp
+++ b/src/libcamera/sensor/ov5670.cpp
@@ -75,6 +75,21 @@ int OV5670CameraSensor::initProperties(const ControlInfoMap &controlMap)
properties_.set(properties::ISOSensitivityRange,
Span<int32_t>{ isoSensitivities });
+ /* Lens Properties. */
+ std::array<float, 1> lensApertures = { 0.0f };
+ properties_.set(properties::LensApertures,
+ Span<float>{ lensApertures });
+
+ std::array<float, 1> lensFocalLengths = { 3.69f };
+ properties_.set(properties::LensFocalLength,
+ Span<float>{ lensFocalLengths });
+
+ std::array<float, 1> lensHyperfocalMinDistance = { 0.0f };
+ properties_.set(properties::LensHyperfocalDistance,
+ Span<float>{ lensHyperfocalMinDistance });
+
+ properties_.set(properties::LensMinimumFocusDistance, 3.69f);
+
return CameraSensor::initProperties(controlMap);
}
--
2.24.1
More information about the libcamera-devel
mailing list