10000 Disable auto focus on USB cameras by default by 1Revenger1 · Pull Request #487 · PhotonVision/photonvision · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Disable auto focus on USB cameras by default #487

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

Merged
merged 4 commits into from
Oct 9, 2022
Merged

Disable auto focus on USB cameras by default #487

merged 4 commits into from
Oct 9, 2022

Conversation

1Revenger1
Copy link
Contributor

My Logitech C925-e has auto focus enabled by default, which causes issues with the camera calibration. This PR disables auto focus, though I'm not sure how universal the two properties I used are. I tested this on my Raspberry Pi 3b.

@1Revenger1 1Revenger1 requested a review from a team as a code owner October 9, 2022 03:48
Copy link
Contributor
@gerth2 gerth2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL there is at least one logitec camera that doesn't break things entirely. Very sweet.

Directionally I 100% agree with this change. If focus is adjustable, it needs to get fixed in place. Excellent find.

Historically we've been using the Camera Quirk system to express the notion that "This camera has something special about it and needs special handling". This was usually necessary because the .getProperty() values weren't actually well standardized, and the quirk system lets us ensure that we only do "special processing" to cameras we know and have tested.

If you have time.... can you add/implement an ADJUSTABLE_FOCUS quirk, key it off of your specific model of camera, and then only invoke the two .set(0) calls when a camera has the quirk?

As we find and test more cameras, we can add more of them to the quirk.

@1Revenger1
Copy link
Contributor Author

@gerth2 I've added the quirk (and also ran spotlessApply so hopefully the CI is happy at me). Is there a better place to disable auto focus? I just put it in the constructor since it never seems to revert except on a reboot.

Copy link
Contributor
@gerth2 gerth2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks right to me. I don't have the ability to test the end functionality but logically doesn't look like it should break anything existing.

@mcm001 mcm001 merged commit 9bf589e into PhotonVision:master Oct 9, 2022
@1Revenger1 1Revenger1 deleted the USBNoAutofocus branch October 9, 2022 22:24
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

Successfully merging this pull request may close these issues.

3 participants
0