Anyone knows how to get d(disparity) from the DisparityImage.msg?<br><br><div class="gmail_quote">On Wed, Feb 2, 2011 at 5:33 PM, Homer Manalo <span dir="ltr"><<a href="mailto:homer.manalo@roboteknik.com">homer.manalo@roboteknik.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">According to the documentation of DisparityImage.msg:<br><br><a href="http://www.ros.org/doc/api/stereo_msgs/html/msg/DisparityImage.html" target="_blank">http://www.ros.org/doc/api/stereo_msgs/html/msg/DisparityImage.html</a><br>
<br>depth can be calculated by Z=fT/d, so far I can get the minimum distance:<br>
<br>        <span style="font-family: courier new,monospace;">distance = data.f*data.T/data.max_disparity</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    print "Minimum distance:", distance, "meters"</span><br>

<br>        <span style="font-family: courier new,monospace;">Minimum distance: 0.430558934726 meters</span><br><br>How do you get d(disparity) here?<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Wed, Feb 2, 2011 at 11:37 AM, Homer Manalo <span dir="ltr"><<a href="mailto:homer.manalo@roboteknik.com" target="_blank">homer.manalo@roboteknik.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Ok, so I need to manually extract this? Or is there a command to show this up? Which one is it contained:<br>

<br><span style="font-family: courier new,monospace;">[sensor_msgs/PointCloud2]:</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Header header</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  uint32 seq</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">  time stamp</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  string frame_id</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">uint32 height</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">uint32 width</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">sensor_msgs/PointField[] fields</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  uint8 INT8=1</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">  uint8 UINT8=2</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  uint8 INT16=3</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">  uint8 UINT16=4</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  uint8 INT32=5</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">  uint8 UINT32=6</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  uint8 FLOAT32=7</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">  uint8 FLOAT64=8</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  string name</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">  uint32 offset</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  uint8 datatype</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">  uint32 count</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">bool is_bigendian</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">uint32 point_step</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">uint32 row_step</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">uint8[] data</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">bool is_dense</span><br><br><span style="font-family: courier new,monospace;">[stereo_msgs/DisparityImage]:</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">Header header</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  uint32 seq</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">  time stamp</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  string frame_id</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">sensor_msgs/Image image</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  Header header</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">    uint32 seq</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    time stamp</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">    string frame_id</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  uint32 height</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">  uint32 width</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  string encoding</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">  uint8 is_bigendian</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  uint32 step</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">  uint8[] data</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">float32 f</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">float32 T</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">sensor_msgs/RegionOfInterest valid_window</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">  uint32 x_offset</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  uint32 y_offset</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">  uint32 height</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  uint32 width</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">float32 min_disparity</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">float32 max_disparity</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">float32 delta_d</span><br><br><br>Thanks,<br><font color="#888888">Homer</font><div><div></div><div><br><br><div class="gmail_quote">On Wed, Feb 2, 2011 at 11:17 AM, Daniel Maturana <span dir="ltr"><<a href="mailto:dimatura@gmail.com" target="_blank">dimatura@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Both the the disparity and the points2 messages have the information<br>
you need. Note that your camera should be calibrated.<br>
best,<br>
<div><div></div><div>Daniel<br>
<br>
On Tue, Feb 1, 2011 at 8:13 PM, Homer Manalo<br>
<<a href="mailto:homer.manalo@roboteknik.com" target="_blank">homer.manalo@roboteknik.com</a>> wrote:<br>
> I've actually used it for viewing disparity and rectifying images. What<br>
> topic exactly are you referring to?<br>
><br>
> Homer<br>
><br>
> On Tue, Feb 1, 2011 at 11:43 PM, Daniel Maturana <<a href="mailto:dimatura@gmail.com" target="_blank">dimatura@gmail.com</a>> wrote:<br>
>><br>
>> Try <a href="http://www.ros.org/wiki/stereo_image_proc" target="_blank">http://www.ros.org/wiki/stereo_image_proc</a>.<br>
>> Daniel<br>
>><br>
>> On Tue, Feb 1, 2011 at 4:13 AM, Homer Manalo<br>
>> <<a href="mailto:homer.manalo@roboteknik.com" target="_blank">homer.manalo@roboteknik.com</a>> wrote:<br>
>> > Are there packages that convert stereo data into real world measurements<br>
>> > -<br>
>> > how far an object is from camera?<br>
>> ><br>
>> > Thanks,<br>
>> > Homer<br>
>> ><br>
>> > _______________________________________________<br>
>> > ros-users mailing list<br>
>> > <a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
>> > <a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
>> ><br>
>> ><br>
>> _______________________________________________<br>
>> ros-users mailing list<br>
>> <a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
>> <a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
><br>
><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>