[libcamera-devel] Autofocus -- any code I could copy? was: Software gathering of image statistics for libcamera on Librem 5

Pavel Machek pavel at ucw.cz
Mon Dec 26 23:19:15 CET 2022


Hi!

At some point I'll need to do autofocus on Librem 5, but first step is
at least manual focus.

Right now, millipixels are using exec() to launch a helper to actually
set the focus:

        let _ = Command::new("v4l2-ctl")
            .args(&[
                "--media-bus-info", "platform:30b80000.csi",
                "--device", "dw9714 3-000c",
                "--set-ctrl", &format!("focus_absolute={}", absolute),
            ])

I believe that is not way to go, and support for focus_absolute should
be added to libcamera. If you have any hints where/how to add it (or
example code), that would be welcome. I suspect it should be handled
by "simple" pipeline in a similar way to gain, but did not do good
investigation yet.

Best regards,
								Pavel
-- 
People of Russia, stop Putin before his war on Ukraine escalates.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20221226/1e631e81/attachment.sig>


More information about the libcamera-devel mailing list