[ros-users] How do I get 2D depth map from 3D point cloud?

Radu Bogdan Rusu rusu at willowgarage.com
Fri May 21 06:19:09 UTC 2010


I am not sure/do not remember if anyone replied to your question yet, but the easiest method that I can think of is to 
create an image where at each pixel you put the corresponding Z value from the point cloud (if Z represents the distance 
to the camera in your data).


On 05/19/2010 01:01 AM, Chriss Lei wrote:
> Hello.
> I just reviewed the stereo_image_proc tutorial and image_pipeline/Camera
> info webpage and there's something I'm unclear with.
> I understand I get 3D point cloud from stereo_image_proc with respect to
> left imager optical frame.
> Now, I'm interested in getting 2D depth map with pixel values set equal
> to depth of the point cloud. (No. I do NOT want disparity map.)
> Only way I can think of doing this is multiply K from left/camera_info
> sensor_msgs with the vector [X/Z, Y/Z, 1] from the point cloud and set
> the pixel value to Z.
> Is there another transform or parameter I need to introduce?
> Or even better, is there a ROS implementation of this functionality already?
> Thank you.
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users

| Radu Bogdan Rusu | http://rbrusu.com/

More information about the ros-users mailing list