Rosanswers logo

Hi there! I'm using pcl point cloud to show depth information obtained with kinect. I'd like to identify rbg points (pixels) on the depth map (for example eye balls). How can i obtain real world coordinate (x,y,z) from the RGB pixel (u,v)? I've found this istructions:


where cloud is defined as:

pcl::PointCloud<pcl::PointXYZ> cloud

But the result is not correct, i mean rgb points are not fitted on the depth map.

Originally posted by PiccoloBuddha on ROS Answers with karma: 11 on 2011-10-10

Post score: 1

Original comments

Comment by Karz on 2015-09-10:
Hello, now i have the same problem. Would you help me to get the coordinate? Thank you :)


1 Answer 1


Rosanswers logo

If the pointcloud fromt he kinect is registered, then using the same index of the pixel in the images to access the pointcloud would give you the 3D position of that pixel.

You can check if the kinect driver is registered by running dynamic reconfigure: rosrun dynamic_reconfigure reconfigure_gui

Originally posted by Javier with karma: 408 on 2011-10-10

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by LiMuBei on 2011-10-17:
I think what he means is that if your pixel has the index i in your image, then cloud[i] will give you the corresponding 3d point.

Comment by PiccoloBuddha on 2011-10-11:
So using instructions i wrote on the first post should be ok? Is what you mean saying using the same index of the pixel image?

Comment by Javier on 2011-10-10:

Comment by PiccoloBuddha on 2011-10-10:
Running rosrun dynamic_reconfigure reconfigure_gui "depth_registration" parameter is ticked, is that what you mean?


Your Answer

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