0
$\begingroup$

Rosanswers logo

I try to know distance.

Documentation states that

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

But I get is values one byte long, max of 255

What do I use topic to measure kinect distance?

How can I find depth?


Originally posted by ha on ROS Answers with karma: 1 on 2012-08-16

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You need to deserialize the message first (using cv_bridge). This will give you a cv::Mat containing uint16 values.


Originally posted by Dan Lazewatsky with karma: 9115 on 2012-08-16

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by rosmaker on 2012-08-16:
how can I get the 11bit data?? can i use the way too? 16bit > 11bit Is it right?

Comment by Dan Lazewatsky on 2012-08-16:
What 11 bit data do you mean? The openni_camera wiki page doesn't say that anything coming from the kinect is 11 bit.

Comment by rosmaker on 2012-08-16:
disparity's range is 0~2047. So I think i need 11bit data. Is it wrong?

Comment by Dan Lazewatsky on 2012-08-16:
Just took a look at a disparity image coming from a kinect - the image claims its data is 32FC1 (single channel 32 bit float), so I guess it's just using a wider type than it needs. cv_bridge shouldn't have any trouble deserializing it.

Comment by joq on 2012-08-16:
It has probably already been converted to meters, as well.

Comment by rosmaker on 2012-08-16:
It has already been convert. What mean? "It" has been converted to meters. It is disparity or using cv_bridge? how cv_bridge make 8bit->16bit ? what principle?

Comment by joq on 2012-08-16:
REP-0118 explains how it works: http://www.ros.org/reps/rep-0118.html

Comment by rosmaker on 2012-08-16:
can you help me? I don't solve the problem. http://answers.ros.org/question/41252/i-find-kinect-depth-fomula-is-it-right-modified-question/

$\endgroup$

Your Answer

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