Open machinekoder opened 3 years ago
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" />
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