Generate image from an unorganized Point Cloud in PCL
问题 I have an unorganized point cloud of the scene. Below is a screenshot of the point cloud- I want to compose an image from this point cloud. Below is the code snippet- #include <iostream> #include <pcl/io/pcd_io.h> #include <pcl/point_types.h> #include <opencv2/opencv.hpp> int main(int argc, char** argv) { pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGBA>); pcl::io::loadPCDFile("file.pcd", *cloud); cv::Mat image = cv::Mat(cloud->height, cloud->width, CV_8UC3)