[libcamera-devel] [PATCH v1] android: Hardcode lens focus range in result metadata
David Plowman
david.plowman at raspberrypi.com
Tue Dec 21 13:12:19 CET 2021
Hi Paul
On Tue, 21 Dec 2021 at 12:04, Kieran Bingham
<kieran.bingham at ideasonboard.com> wrote:
>
> Quoting Paul Elder (2021-12-21 04:53:40)
> > Hardcode the lens focus range in result metadata. As our lens focus
> > distance calibration is hardcoded to uncalibrated, and our minimum focus
> > distance is zero, we hardcode the lens focus range to [0, 0].
Just a little question on this - I thought 0 was supposed to mean
"infinite" and close focus distances should get larger numbers. So is
[0, 0] the right thing? Sorry if I've misunderstood!
Thanks
David
> >
> > Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
>
> Given we don't yet have a libcamera control to return something else,
> this is probably ok - but we should make sure we remember to get this
> updated when the controls go in.
>
>
> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>
> > ---
> > src/android/camera_device.cpp | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> > index 6c2ea61f..8861447d 100644
> > --- a/src/android/camera_device.cpp
> > +++ b/src/android/camera_device.cpp
> > @@ -1650,6 +1650,9 @@ CameraDevice::getResultMetadata(const Camera3RequestDescriptor &descriptor) cons
> > testPatternMode);
> > }
> >
> > + std::vector<float> focusRange = { 0.0f, 0.0f };
> > + resultMetadata->addEntry(ANDROID_LENS_FOCUS_RANGE, focusRange);
> > +
> > /*
> > * Return the result metadata pack even is not valid: get() will return
> > * nullptr.
> > --
> > 2.27.0
> >
More information about the libcamera-devel
mailing list