Get the 3D point from image exported from PCLVisualizer

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Get the 3D point from image exported from PCLVisualizer

ravijoshi
I have exported image of the point cloud from PCLVisualizer. Please see the
code snippet below used for exporting the image-
------------------------------------
pcl::visualization::PCLVisualizer viewer("Cloud Viewer");
viewer.addPointCloud(cloud, "raw_cloud");

vtkSmartPointer<vtkRenderWindow> render = viewer.getRenderWindow();
unsigned char* pixels = render->GetRGBACharPixelData(0, 0,
render->GetSize()[0] - 1, render->GetSize()[1] - 1, 1);

cv::Mat image = cv::Mat(render->GetSize()[1], render->GetSize()[0], CV_8UC4,
pixels);
cv::cvtColor(image, image, cv::COLOR_RGBA2BGRA);
cv::flip(image, image, 0);
------------------------------------

My question is, how to get the 3D point of the point cloud from the image
pixels? Please note that this image is exported from PCLVisualizer.

-
Thanks a lot



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users