0
$\begingroup$

Rosanswers logo

I am using ubuntu 11.10 and openni.

My question is how to convert the raw depth data to XYZ point?

(x,y,d) coordinate of (pixel, pixel, mm)

I want to know how to convert it to (mm, mm, mm)


Originally posted by rosmaker on ROS Answers with karma: 51 on 2012-07-04

Post score: 1


Original comments

Comment by Eric Perko on 2012-07-04:
Are you using the openni_camera stack? What launch file are you using to start the Kinect (e.g. openni_launch openni.launch)?

Comment by rosmaker on 2012-07-04:
I am using openni_launch openni.launch to start the kinect.

Comment by rosmaker on 2012-07-04:
Can you also teach me the changing fomula??

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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)

$\endgroup$

Your Answer

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