0
$\begingroup$

Rosanswers logo

Hi, everyone,

Recently, I tried to run through the pcl_ros tutorial to convert a point cloud from a Kinect to an image. My hope is to be able to do the exact same thing in Python, not C++, and then work with the image using the OpenCV Python interface.

here's the tutorial link: http://www.ros.org/wiki/pcl_ros/Tutorials/CloudToImage

I hit a small snag, though. It seems like the tutorial is referencing a Ros Topic from openni_camera called /camera/depth/points2, but I can't seem to find this topic in list of topics published by openni_camera.

Rather, I found: /camera/depth/points, but this doesn't seem to generate an image when I make this change in the tutorial.

Will getting the image from /camera/depth/points2 be necessary to fulfill my overall goal?

Also, are there any other ways to easily convert a Point Cloud from the Kinect to an image in Python? Many Thanks in advance for everyone's words of wisdom!


Originally posted by Poofjunior on ROS Answers with karma: 88 on 2011-07-06

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

There are currently no PCL-python bindings, so there is no single function to convert a point cloud into an image. You can however subscribe to /camera/depth/image, which is already an image and has 32-bit float valued pixels (values are in meters). It can be converted easily into a cvMat using cv_bridge (see this post for further details).


Originally posted by fergs with karma: 13902 on 2011-07-06

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$
0
$\begingroup$

Rosanswers logo

For anyone coming across this now: Python bindings for PCL were released in February of 2013 by Strawlab at http://strawlab.github.io/python-pcl/


Originally posted by misaugstad with karma: 21 on 2015-12-27

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.