Closed christian-rauch closed 4 months ago
This is a backport of https://github.com/ros-perception/vision_opencv/pull/228 to ROS 2.
You can use the same conversion script in that PR to test that without this PR the data that is converted from the original 16bit image becomes an 8bit image where the values do not match anymore:
original: 2500 uint16 converted: 9 uint8 match? False
and with this PR, the conversion is done correctly and the values match:
original: 2500 uint16 converted: 2500 uint16 match? True
This is a backport of https://github.com/ros-perception/vision_opencv/pull/228 to ROS 2.
You can use the same conversion script in that PR to test that without this PR the data that is converted from the original 16bit image becomes an 8bit image where the values do not match anymore:
and with this PR, the conversion is done correctly and the values match: