[libcamera-devel] libcamera on Librem 5, phase detection auto focus

Dorota Czaplejewicz dorota.czaplejewicz at puri.sm
Mon Nov 21 18:02:15 CET 2022


On Mon, 21 Nov 2022 17:31:56 +0100
Pavel Machek <pavel at ucw.cz> wrote:

> Hi!
> 
> > > > So far I'm working with contrast detection, but samsung chip should
> > > > support phase detection auto focus, too. So far I hacked
> > > > drivers/media/i2c/s5k3l6xx.ko not to filter out those bits and took
> > > > photos (and looked at them in darktable), but I don't see any obvious
> > > > "defects" indicating presense of focus data. Do you have any pointers
> > > > to more information by chance?
> > > > 
> > > > I took deliberately defocused photo to make "defects" easier to see. I
> > > > guess I should take another one with less gain to keep other noise
> > > > down. Any ideas how to locate those bits?    
> > > 
> > > The PDAF pixels will be located at fixed positions in the pixel array,
> > > documented by the sensor vendor. Some sensors will process the PDAF
> > > pixels and provide the processed information in the CSI-2 embedded data.
> > > I don't have access to the sensor datasheet, so I can't help much I'm
> > > afraid :-(
> > >   
> > The focus pixels will appear sometimes - I haven't quite figured out when - when the resolution is full and when denoising is off. That's not described in the datasheet very well. I did prepare a bunch of scripts to mess with the sensors registers in this repo (beware, here be dragons) https://source.puri.sm/dorota.czaplejewicz/nani
> >  
> 
> Thanks for pointer.
> 
> Is it possible to get the datasheet somewhere?
> 
> Would you have example file with the focus pixels by chance? I guess
> first step is to figure out the pattern of the dots...
> 
> Best regards,
> 								Pavel

I don't think I kept raw data, but: https://source.puri.sm/Librem5/linux/-/issues/325#note_157970
https://source.puri.sm/Librem5/linux/-/issues/44#note_137718
https://source.puri.sm/Librem5/linux/-/issues/44#note_137742
https://source.puri.sm/Librem5/linux/uploads/ecdd6080b4aea4a129496fc644182020/image.png
https://source.puri.sm/Librem5/linux/-/issues/44#note_139754

I think this is the most explanatory: https://source.puri.sm/Librem5/linux/-/issues/44#note_139755
https://source.puri.sm/Librem5/linux/-/issues/44#note_145053

--Dorota
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20221121/dd18d678/attachment.sig>


More information about the libcamera-devel mailing list