Convert ROS DisparityImage msg with image encoding 32FC1 into openCV Mat using cv_bridge
Hi,
I have a ROS DisparityImage msg which has an encoding of 32FC1. I would like to convert this into an openCV mat. However, the toCvCopy
function from cv_bridge
doesn't seem to account for that encoding. It only supports MONO
and BGR/RGB/BGRA/RGBA
.
How do I interpret the data[]
field of sensor_msgs/Image
in stereo_msgs/DisparityImage
to convert this floating point representation into MONO
values?
Thank you.