ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Instead of trying to do that conversion by hand for each pixel, I recommend that you use the cv_bridge package to convert your sensor_msgs/Image
into a cv::Mat
, which should be easier to use. The cv_bridge tutorial is probably a good place to start, but obviously you'll need to change the image encoding parameters.