It is in the image itself, that is the disparity at position x,y is at image(x,y). You could also use the Z value of the points in the point cloud. Daniel On Wed, Feb 2, 2011 at 8:28 PM, Homer Manalo wrote: > Anyone knows how to get d(disparity) from the DisparityImage.msg? > > On Wed, Feb 2, 2011 at 5:33 PM, Homer Manalo > wrote: >> >> According to the documentation of DisparityImage.msg: >> >> http://www.ros.org/doc/api/stereo_msgs/html/msg/DisparityImage.html >> >> depth can be calculated by Z=fT/d, so far I can get the minimum distance: >> >>         distance = data.f*data.T/data.max_disparity >>     print "Minimum distance:", distance, "meters" >> >>         Minimum distance: 0.430558934726 meters >> >> How do you get d(disparity) here? >> >> On Wed, Feb 2, 2011 at 11:37 AM, Homer Manalo >> wrote: >>> >>> Ok, so I need to manually extract this? Or is there a command to show >>> this up? Which one is it contained: >>> >>> [sensor_msgs/PointCloud2]: >>> Header header >>>   uint32 seq >>>   time stamp >>>   string frame_id >>> uint32 height >>> uint32 width >>> sensor_msgs/PointField[] fields >>>   uint8 INT8=1 >>>   uint8 UINT8=2 >>>   uint8 INT16=3 >>>   uint8 UINT16=4 >>>   uint8 INT32=5 >>>   uint8 UINT32=6 >>>   uint8 FLOAT32=7 >>>   uint8 FLOAT64=8 >>>   string name >>>   uint32 offset >>>   uint8 datatype >>>   uint32 count >>> bool is_bigendian >>> uint32 point_step >>> uint32 row_step >>> uint8[] data >>> bool is_dense >>> >>> [stereo_msgs/DisparityImage]: >>> Header header >>>   uint32 seq >>>   time stamp >>>   string frame_id >>> sensor_msgs/Image image >>>   Header header >>>     uint32 seq >>>     time stamp >>>     string frame_id >>>   uint32 height >>>   uint32 width >>>   string encoding >>>   uint8 is_bigendian >>>   uint32 step >>>   uint8[] data >>> float32 f >>> float32 T >>> sensor_msgs/RegionOfInterest valid_window >>>   uint32 x_offset >>>   uint32 y_offset >>>   uint32 height >>>   uint32 width >>> float32 min_disparity >>> float32 max_disparity >>> float32 delta_d >>> >>> >>> Thanks, >>> Homer >>> >>> On Wed, Feb 2, 2011 at 11:17 AM, Daniel Maturana >>> wrote: >>>> >>>> Both the the disparity and the points2 messages have the information >>>> you need. Note that your camera should be calibrated. >>>> best, >>>> Daniel >>>> >>>> On Tue, Feb 1, 2011 at 8:13 PM, Homer Manalo >>>> wrote: >>>> > I've actually used it for viewing disparity and rectifying images. >>>> > What >>>> > topic exactly are you referring to? >>>> > >>>> > Homer >>>> > >>>> > On Tue, Feb 1, 2011 at 11:43 PM, Daniel Maturana >>>> > wrote: >>>> >> >>>> >> Try http://www.ros.org/wiki/stereo_image_proc. >>>> >> Daniel >>>> >> >>>> >> On Tue, Feb 1, 2011 at 4:13 AM, Homer Manalo >>>> >> wrote: >>>> >> > Are there packages that convert stereo data into real world >>>> >> > measurements >>>> >> > - >>>> >> > how far an object is from camera? >>>> >> > >>>> >> > Thanks, >>>> >> > Homer >>>> >> > >>>> >> > _______________________________________________ >>>> >> > ros-users mailing list >>>> >> > ros-users@code.ros.org >>>> >> > https://code.ros.org/mailman/listinfo/ros-users >>>> >> > >>>> >> > >>>> >> _______________________________________________ >>>> >> ros-users mailing list >>>> >> ros-users@code.ros.org >>>> >> https://code.ros.org/mailman/listinfo/ros-users >>>> > >>>> > >>> >> > > > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users > >