Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Photo autfocus issue #41

Open
mmib opened this issue Jan 31, 2025 · 6 comments
Open

Photo autfocus issue #41

mmib opened this issue Jan 31, 2025 · 6 comments

Comments

@mmib
Copy link

mmib commented Jan 31, 2025

Raspberry Pi Zero 2 W Rev 1.0
Board Revision 902120
Kernel Version 6.6.62+rpt-rpi-v8 
Debian GNU/Linux 12 (bookworm) - Version 12.9

Arducam imx519 camera with focus.

Focus works fine on video however whatever i do I cannot get it work with photos. All photos are taken with LensPosition 1.0 (1.0 m), tried all possible focus handling combinations - it is ignored for photo but works fine for video

@signag
Copy link
Owner

signag commented Feb 3, 2025

Hi, thanks for this post.
I tried to reproduce this with a Camera Module 3 (imx708) but I did not see the described behavior:

  1. Configure fucus settings with Window:

Image

  1. Trigger Autofocus:

Image

  1. Take photo:

Image

  1. Select different Autofocus Window:

Image

  1. Trigger Autofocus:

Image

  1. Take Photo:

Image

Could you please describe in more detail the steps which lead to your result?

Thanks

@mmib
Copy link
Author

mmib commented Feb 5, 2025

Hi, thank you for reply. Repeated same steps, here is what i get (photo on screen is the old one):Error in Camera.takeImage: Phototaking caused error: Control AeEnable is not advertised by libcamera

Image

@mmib
Copy link
Author

mmib commented Feb 5, 2025

Server needs to be restarted after any error, otherwise there is no video stream. If would be good to implement some try-catch.

@signag
Copy link
Owner

signag commented Feb 5, 2025

Hi,
AeEnable refers to automatic exposure (see picamera2_manual.pdf, p. 79)
This control parameter does not seem to be supported by your camera. That's what the error message sais.
Up to now, I assume that all control parameters documented in the picamera2_manual.pdf are valid, except

  • AfMode and all autofocus-related parameters
  • AeFlickerMode
  • HdrMode

For the latter, I check whether these parameters are available in the Picamera2.camera_controls structure.
This assumption applies to all original RaspberryPi cameras.
Probably, I would need to check for AeEnable too.

If you have activated any AutoExposure settings, you may try deactivating these.

However, this error is not related to focus handling.

@signag
Copy link
Owner

signag commented Feb 5, 2025

Server needs to be restarted after any error, otherwise there is no video stream. If would be good to implement some try-catch.

I know,
and I tried already to catch as much as I can.
But several of these errors occur in asynchronous threads started by Picamera and lower laying routines, which makes it difficult.

@mmib
Copy link
Author

mmib commented Feb 5, 2025

Yes, could be due to arducam imx519, which may not be fully supported by libcamera2. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants