ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Get RGB pixel coordinate in depth cloud

asked 2011-10-10 21:09:20 -0600

PiccoloBuddha gravatar image

updated 2016-10-24 09:02:59 -0600

ngrennan gravatar image

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.

edit retag flag offensive close merge delete


Hello, now i have the same problem. Would you help me to get the coordinate? Thank you :)

Karz gravatar image Karz  ( 2015-09-10 08:34:49 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2011-10-10 23:08:18 -0600

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

edit flag offensive delete link more


Running rosrun dynamic_reconfigure reconfigure_gui "depth_registration" parameter is ticked, is that what you mean?
PiccoloBuddha gravatar image PiccoloBuddha  ( 2011-10-10 23:40:50 -0600 )edit
Javier gravatar image Javier  ( 2011-10-10 23:58:03 -0600 )edit
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?
PiccoloBuddha gravatar image PiccoloBuddha  ( 2011-10-11 00:08:14 -0600 )edit
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.
LiMuBei gravatar image LiMuBei  ( 2011-10-17 08:56:07 -0600 )edit

Question Tools

1 follower


Asked: 2011-10-10 21:09:20 -0600

Seen: 2,822 times

Last updated: Oct 17 '11