Conversation
Edited 1 year ago
@libcamera has recently received an implementation proposal of an auto-focus algorithm for Rockchip RK3399. A great occasion to continue the work done at @fosdem to support the @PINE64 PinephonePro cameras.

Here it is a quick test of the auto-focus algorithm running in "continuous auto-focus mode" on the PinephonePro IMX258 rear camera.

Let's try to merge it soon upstream!

PS:
Sorry for my shaky hands during the first 10 seconds, let's say I was trying to make things harder for the algorithm
6
14
26
@PINE64 @fosdem @libcamera credits to Daniel Semkowicz from Theobroma Systems as original patches author https://patchwork.libcamera.org/project/libcamera/list/?submitter=126
0
1
2
@markgrieveson @libcamera @fosdem @PINE64 oh this is just 'cam' (one of the libcamera test applications) with SDL output. It's just for testing, shouldn't be considered a real camera application.

However, at fosdem we have (well, Kieran has, actually) just presented how is it possible to run any camera application that goes through pipewire/gstreamer with libcamera on the pro and mentions a few other libcamera-based camera application such as pinhole.

https://fosdem.org/2023/schedule/event/linux_camera_apps/
0
0
1
@rmader @libcamera @fosdem @PINE64 uh that's interesting! does this goes through pipewire/gst as well ?
1
0
0
@insl @libcamera @fosdem @PINE64 shaky hands don't help and for sure it's perfectible, but it indeed focuses (more visible after the first 10 seconds of video).

Of course it perfectible, but it's a starting point at least :)

I was honestly surprised myself, as I was told contrast based continuous auto-focus was a no-go, while it can achieve decent results.
0
0
1
@PINE64 @fosdem @libcamera for the image-tuning nerds, be aware that the #PinephonePro back camera is the PDAF capable version of the Sony IMX258 sensor.

PDAF provides an estimate of the image contrast and sharpness (which an algorithm needs to maximize by getting the focus distance right) through some "special" pixels and it's way more efficient than purely software-based algorithms where the scene contrast is estimated using the ISP provided statistics. It's way more efficient and performant, but needs dedicated hw support (which the ppp has).

The @Raspberry_Pi backend in @libcamera is, as usual, one step forward and provides a PDAF based algorithm for their newest v3 camera module which can be used as a base for extending the support to other platforms and sensors. It's not a negligible effort but the code is there and just need someone to work on that.
0
4
7
@RLetot @markgrieveson @libcamera @fosdem @PINE64 this is separate development from megapixels, which doesn't use libcamera.
0
0
0