Hi rosmaker,
If you are using
roslaunch openni_launch openni.launch
then the conversion is already being done for you.
You only need to subscribe to the topic /camera/depth_registered/points. This topic is of type sensor_msgs/PointCloud2 and represents the 3D point cloud of the scene in meters.
You can find further information on how to access point cloud data in http://www.ros.org/wiki/pcl/Tutorials
I hope this helps
Originally posted by Martin Peris with karma: 5625 on 2012-07-04
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by rosmaker on 2012-07-05:
What is the way to use the scene in [mm]? If I am using other launch file or not, does I use other way?
Comment by Martin Peris on 2012-07-05:
Well, if you want your coordinates in mm, one thing you can do is multiply by 1000 all the values in /camera/depth_registered/points
Comment by rosmaker on 2012-07-05:
openni have convertprojectivetorealworld function in windows openni. Is this same the topic /camera/depth_registered/points?
Comment by rosmaker on 2012-07-05:
And does raw depth data send by the kinect on 11bit ? how about changed xyz data?
Comment by Pototo on 2016-06-21:
how do I do the opposite? How do I convert the pixels around point (0.1 meters, 0.52 meters to pixel (x, y) position? I am using the old Kinect (640 x 480 resulution kinect)