[libcamera-devel] [PATCH v3 7/7] DNI: libcamera: sensor: ov5670: Add lens properties
Jacopo Mondi
jacopo at jmondi.org
Tue Feb 18 12:27:52 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 c5fdffda7412..5304dac658f4 100644
--- a/src/libcamera/sensor/ov5670.cpp
+++ b/src/libcamera/sensor/ov5670.cpp
@@ -70,6 +70,21 @@ int OV5670::initProperties()
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();
}
--
2.25.0
More information about the libcamera-devel
mailing list