video_stream_opencv icon indicating copy to clipboard operation
video_stream_opencv copied to clipboard

normalize properties to fix issues after upgrading OpenCV

Open machinekoder opened this issue 3 years ago • 1 comments

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 https://github.com/ros-drivers/video_stream_opencv/issues/92

machinekoder avatar May 10 '21 09:05 machinekoder

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" />

marcelino-pensa avatar Apr 29 '22 21:04 marcelino-pensa