Conversation

@Pavel Machek has rebased his #libcamera AutoFocus experimental branch above mainline v0.7.0 tag during @okias organized 6th #MobileLinux Hackday yesterday (thanks to #SUSE for hosting), and I have built it on my #oneplus6 #Qualcomm #sdm845 phone running my build of 6.19.0-rc4-next-20260106-sdm845-gdc7b19cffd9e kernel and #mobian. Then I have tested it with Pavel’s mcam and, probably the first time ever, with Gnome/Phosh snapshot application with a complete pipewire-libcamera stack. The simple SW AF prototype has been enabled by the addition of - Af: line into /usr/share/libcamera/ipa/simple/uncalibrated.yam. On the occasion, I had the chance to test the result to document an actual event: when the president of the Czech Republic, Petr Pavel, spoke at the #Ukraine Support meeting in #Prague Old Town Square today. The autofocus algorithm is quite unstable, periodically seeking a sharp image while the view is blurred in between. Same for the uncalibrated colors. But that could/should be solved in the longer perspective, see FOSDEM talk1 and talk2. But in general, the day when we can run at least older devices under real user control is yet closer. It depends now on @EUCommission whether the future is like 1984 or not for new devices. If it insists on Chat Control, which requires eliminating user control over what software runs on the device and supports rhetoric of sideloading for user control and even own builds of application installing, then the governments and corporations controlled botnet would be abused by mighty ones to control society as a whole. Back to today’s photos and the demonstration of goodwill to help the attacked neighborhood country to survive the imperial war. The original 1080p resolution photo with far focus is there and the short distance shot to the paper there. Both were taken by an IMX519 camera connected to MIPI C-phy.

2
8
15
@ppisa @EUCommission @okias Now I know how broken that autofocus code was. I fixed part of that bogosity, but there`s more work to do.
1
0
0
Edited 17 days ago
@pavel Thanks for update, I have had build it already yesterday and run it over the day. It is far from ideal, but it is big step forward and seems to connect all required components together as the real path finder.
1
0
1
@ppisa Another update is in. I slowed things down and added debugging, and it might actually work now.
1
0
1
Edited 16 days ago

@pavel Great. I expect that in the longer term it should switch to full range scan and sharpness computation only for really large change in statistical parameters. It should try to run some feedback loop to track focus instantaneously with some estimation whether changes are noise only and when change in statistic represent already high probability that sharpness changes. Could be really nice task for some of our #cvut #cvutfel control theory oriented students with combined computer vision knowledge. I am open to supervise such project, bachelor and or master theses.

2
0
1
Edited 16 days ago

Then next task can be face identificatio and tracking. Again this is taught at #cvut #cvutfel . Again task often used in Credit Test in the frame of the A6M33BIO - Biometrics course lecture 6, lecture 7.

0
0
0
@ppisa Yes, that makes sense for video recording. Long term, we really want different algorithms for still photos ("sweep and select best") and video recording ("do the tracking so we don't see the blur").

And actually PDAF could help a lot and is important for this.
0
0
0