-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add support for autofocus #4
base: master
Are you sure you want to change the base?
Conversation
You should check the camera model (that's some code I wrote), and only set auto focus if it's a V3? Also, per an earlier Discord conversation, autofocus focusing will mess up camera calibration coefficients -- maybe it makes the most sense to just lock it at infinity? |
Also can we undo all the reformatting this PR does? I can't tell what I should be reviewing |
Sorry, I may not have been clear as to the purpose. The end goal is to have a button on the camera calibration page to focus the camera for use prior to calibrating the camera. It is not intended to focus the camera during use.
I used the included format script for my changes but the rest of the repo didn't seem to have been run through it. I don't see an easy way to undo the formatting of other areas while keeping the formatting of my changes. Important changes are in camera_grabber.h/cpp. |
What if they don't have the AF compatibility installed (very possible) despite using the V3? |
2023-01-21.18-41-46.mp4
This PR intends to add support for autofocus with Photonvision. I am using Arducam Picam V3 to test. See the attached video to see it working. I set up the code very similar to auto exposure, but I would appreciate someone looking to see if I missed anything.
The respective PR for integration into PV is here
I haven't found a good way to determine if the camera being used supports AF. If it doesn't, the following continuously prints:
WARN IPARPI raspberrypi.cpp:796 Could not set AF_MODE - no AF algorithm
Two options I see:
Thoughts?