0
$\begingroup$

Rosanswers logo

i'm running ros diamondback.

Documentation states that is should be uint16 to represent mm. So i'm expecting values two bytes long, but instead all I get is values one byte long, max of 256! I require the depth values so I can know how far an object is, that is all I need, I dont need to work with any other library. I have searched and searched for days and cannot find a proper solution!

So again, all i need is a registered depth value image, I want to be able to get the value and calculate the distance in that pixel.

depth/image_raw (sensor_msgs/Image)
Raw image from device. Contains uint16 depths in mm.

what to do? thanks


Originally posted by Maltenrazer on ROS Answers with karma: 36 on 2012-04-29

Post score: 2


Original comments

Comment by joq on 2012-04-29:
Please list the output from "rostopic echo /depth/image_raw/encoding"

Comment by Maltenrazer on 2012-04-29:
http://img.photobucket.com/albums/v67/maltenrazer/kinect_depth.png .. I used cout << image.get()->encoding << "\n"; to get the encoding output

Comment by Maltenrazer on 2012-04-29:
I have a bizarre problem where the left top and right edges are completely black any ideas? I have tried turning on and off depth registration by using rosparam get /openni_node1/depth_registration to see if it has an effect, but no help.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

In sensor_msgs/Image, the data field is uint8 [0..255], but is interpreted according to the encoding and is_bigendian fields. Unfortunately, the 16-bit encodings did not work correctly in some Diamondback tools. They work better in Electric and Fuerte.

What encoding do your messages report?

UPDATE: 32FC1 is an opencv 32-bit float encoding. Perhaps this answer is helpful.


Originally posted by joq with karma: 25443 on 2012-04-29

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.