Read Focus from Arducam 64mp in Python with Picamera2

  1. Where did you get the camera module(s)?
    From you

  2. Model number of the product(s)?
    64mp arducam

  3. What hardware/platform were you working on?
    RPi

  4. Instructions you have followed. (link/manual/etc.)
    manual and then troubleshooting the forum

  5. Problems you were having?
    Reading the current focus level that was previously set by autofocus

  6. The dmesg log from your hardware?

  7. Troubleshooting attempts you’ve made?

  8. What help do you need?
    Hi! It seems like RPi has been updating things that have been breaking things, and yall have been doing a good job scrambling to update your versions of the libcamera picamera2 libraries for the Arducam 64

One thing i needed for a problem I am working on with the Arducam is that I want to be able to READ what the current focus the camera gets set to. After lots of troubleshooting (and ddisable_touchscreen=1
in the config.txt) i got the camera working and can manually set the focus using the LensPosition control in python.

BUT i want to be able to READ what the current focus the camera had been set to before was (especially after an autofocus) so that I could do things like increment the focus slightly toward or away from what it had been focused to.

I noticed when I did a printout of the metadata there is nothing i can poll about the lensposition or focus.

Is there a call i can make to the controls to READ the focus level? Thanks!

Hi,
At the present time, I am sorry to tell you that we do not have an off-the-shelf function for your requirement. :sweat:
But your idea is interesting, maybe we will try to do it when we have spare time.

1 Like

ah too bad. Is there a way to read what the focus is from like a libcamera call?

(or something else i can run from my python script to just see what the focus is? Because somehow the focuser example is reading the focus the camera is at, right?)