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

normalize properties to fix issues after upgrading OpenCV #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

machinekoder
Copy link
Contributor

@machinekoder machinekoder commented May 10, 2021

OpenCV 4 (e.g. in Ubuntu bionic with ROS noetic) disables the normalize-properties feature in the V4L2 driver per default. This patch re-enables to old behavior.

See also #92

@marcelino-pensa
Copy link

Not sure if anyone is still monitoring this one year later, but I appreciate the solution, I tested it locally and it worked. I just had to make sure to send the desired camera parameters in the launch file. To that end, I appended the following to the launch file that launches video_stream_opencv:

    <!-- Camera params -->
    <param name="auto_exposure" value="True" />

    <!-- The params below are in the range: [0.0, 1.0] -->
    <!-- You should start with default values and renormalize it to the range [0.0, 1.0] -->
    <!-- You can get the default values for a given camera with the command line command from: -->
    <!-- https://people.eng.unimelb.edu.au/pbeuchat/asclinic/software/workflow_usb_camera_settings.html#display-everything-about-a-device -->
    <param name="brightness" value="0.5" />
    <param name="contrast" value="0.5" />
    <param name="hue" value="0.5" />
    <param name="saturation" value="0.46875" />

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.

2 participants