piontcloud to depth image codification
Hello,
I have a depth image in a cv::Mat(height,widht,CV_64F) where each pixel is either 0 if it has no 3D or the distance to produce a 3D point allong the optical ray through that pixel. This distance is encoded between a minimum and maximum distance in the range [0..255]. I know how to convert cv::Mat to sensor_msgs/Image using cv_bridge. However I have not found how to properly codify the information in my cv::Mat image so I can visualize its 3D in rviz. Could you tell me how to convert it? I have been reading and the only information I found was this but I it has not been helpful to me.
Thank you.