Consistency of camera focus between different units (IMX519)

First, I am very happy with the IMX519 camera with autofocus! The image quality is great and the focus works fine. Thank you! :slight_smile:

Now, I wonder how consistent the focus can be set via script (Arducam-Pivariety-V4L2-Driver/FocuserExample.py at master · ArduCAM/Arducam-Pivariety-V4L2-Driver · GitHub)

If I use the focus.write(focusvalue) function and set a specific focusvalue, will the resulting focal plane/distance be the same, when using a different unit of the IMX519. Or does every unit have to be calibrated individually?
(i.e. lets say a focusvalue = 3000 corresponds to a focal plane 10cm away from the camera with my imx519 camera. Will this be the same with a different IMX519?)

Thank you again and best regards,
Thomas


I have done some measurements and the focal distance seems to follow a nice potential function with y = A * x^B (at least for smaller distances < 32cm)

I really wonder if this holds true for other units of IMX519 or if they would behave differently.

Thank you so much for your information!
We haven’t calibrated them one by one at the moment, and we still have a lot to explore in the implementation of the autofocus function.
Do you have any suggestions or comments to offer?Any information has the potential to help us do better.

To be honest, I am absolutely happy with the current functionality and the provided python script for focussing! I will do some more hardware testing as soon as I got my Kickstarter delivery :wink:

There is only one thing, that I am currently missing: A python library similar to pycamera.py (which was totally skipped by the Raspberry Pi foundation in the latest updates). I don’t know whether you have something under development, or whether I just have to wait for the Pi Foundation to release a new python library for the libcamera stack.

Anyway, thank you for your great work and prompt replies.

Sorry for the late reply, we just finished the Chinese New Year holiday.
In fact, we made a simple python binding, but it still has a lot of imperfections. Raspberry Pi officially claims that they are developing an official python binding, so we did not develop it further:

@Openscan could you be so kind an tell me where I can find the kernel driver soruce for the kernel 5.19 ?