-
Notifications
You must be signed in to change notification settings - Fork 746
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
Allow arbitrary camera frame dimensions #459
base: main
Are you sure you want to change the base?
Allow arbitrary camera frame dimensions #459
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Could we do the same for intealrealsense.py after merging/rebasing master?
Then I am happy to quickly review again and approve
def test_camera_resize( | ||
request_resolution: tuple[int, int], read_resolution: tuple[int, int], is_camera_available: bool | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After rebasing on top of master, could we add the mock version to it?
What this does
Allows arbitrary camera dimensions for
OpenCVCamera
. Previously, if the camera dimensions were not supported by the camera, an exception would be raised. With this PR, the frame is resized as a postprocessing step.How it was tested
Added test which has full coverage if you have a camera connected, but only partial coverage otherwise (see the test docstring).
I also tested it locally with a camera.
How to checkout & try? (for the reviewer)
Run this script.
You should probably get logs like:
You should see a window with 40x40 image appear.