How to convert sensor_msgs/Image to PointCloud<pcl::RGB>??
I am trying to use PCL implementation of generating pointcloud and disparity from stereo images. I am using pcl::StereoMatching Class and stereo.compute() function to get disparity image. But compute() function requires left and right camera images in PointCloud<pcl::rgb> format. While I am using ros and my images are in the form of sensor_msgs/Image. Is there any way to do this conversion??
PCL stereo implementation guide: here
I am able to convert sensor_msgs/Image to PCLImage format using function pcl_conversions::toPCL(), but apparently PCLImage format is not same as PointCloud<pcl::rgb> format. please someone help me.