ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
To convert from point cloud to image, maybe you can check this tutorial.
If my understanding is correct, you tried to store the point cloud X, Y, Z coordinate in a three-channel image. I am not sure if this is a proper way of doing it. I do not have experience in converting from point cloud to image. What I tried before is converting from image to point cloud. If we don't care about color information, point cloud and depth image are equivalent. From a depth image, if we have the camera model, the coordinate (x,y) in the image plane can be converted to X, Y in the world coordinate and the depth info stored in pixel (x,y) is the corresponding Z value in world coordinate. My understanding is if you want to convert from point cloud to image, you should do it in the reverse way instead of storing the X, Y, Z values directly as a vector. It can be done, but I am not sure if it is proper to store X, Y, Z directly in a 3-channel image data structure.