Hi Dejan, Not sure if this will help, but I can point you to some code that computes the 3D point cloud starting from a DisparityImage and an associated CameraInfo. The DisparityImage should have the pixels in the same order as the left monocular image from the stereo pair. The code snippets are below; let me know if it doesn't work for you or if I forgot to include some function. Matei ... raw_points_.clear(); raw_points_.reserve( current_image_.width * current_image_.height); for (unsigned int i=0; i disparity_image.max_disparity) return false; return true; } //! Get the value from an image at given image coordinates as a float inline void getPoint(const sensor_msgs::Image &image, unsigned int h, unsigned int w, float &val) { ROS_ASSERT(h wrote: > Hi, >> On 02/05/2011 11:09 AM, Dejan Pangercic wrote: >>> Hi there, trivial question i guess but does anyone have an example ROS code that projects a set of 2d points from a >>> stereo camera (e.g. Pr2's narrow stereo) to a 3d pointcloud? cheers d. >> >> The question is a bit ill-posed or I just didn't understand it. :) Do you want to obtain the color of a pixel (2D) and >> attach it to a 3D point? What is the "2D point from a stereo camera"? Is the target 3D cloud generated by the same >> sensor, or a different sensor? Is calibration available? > yeah I agree, I wrote it too much in a hurry. > I basically detect a set of features in both left and right camera of > PR2's narrow stereo rig (so yes calibration is available) and would > now like to get a 3D position for every of these features. > > cheers, D. > > >> >> >> Cheers, >> Radu. >> -- >> http://pointclouds.org >> _______________________________________________ >> ros-users mailing list >> ros-users@code.ros.org >> https://code.ros.org/mailman/listinfo/ros-users >> > > > > -- > MSc. Dejan Pangercic > PhD Student/Researcher > Intelligent Autonomous Systems Group > Technische Universität München > Telephone: +49 (89) 289-26908 > E-Mail: dejan.pangercic@cs.tum.edu > WWW: http://ias.cs.tum.edu/people/pangercic > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users > -- Matei Ciocarlie Research Scientist Willow Garage Inc. 650-475-9780