ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

what do I use topic to measure kinect distance?

asked 2012-08-16 05:35:07 -0600

ha gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-08-16 06:04:09 -0600

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

edit flag offensive delete link more

Comments

how can I get the 11bit data?? can i use the way too? 16bit > 11bit Is it right?

rosmaker gravatar image rosmaker  ( 2012-08-16 06:22:13 -0600 )edit

What 11 bit data do you mean? The openni_camera wiki page doesn't say that anything coming from the kinect is 11 bit.

Dan Lazewatsky gravatar image Dan Lazewatsky  ( 2012-08-16 06:30:07 -0600 )edit

disparity's range is 0~2047. So I think i need 11bit data. Is it wrong?

rosmaker gravatar image rosmaker  ( 2012-08-16 06:33:43 -0600 )edit
1

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.

Dan Lazewatsky gravatar image Dan Lazewatsky  ( 2012-08-16 06:42:28 -0600 )edit

It has probably already been converted to meters, as well.

joq gravatar image joq  ( 2012-08-16 07:35:12 -0600 )edit

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?

rosmaker gravatar image rosmaker  ( 2012-08-16 12:52:00 -0600 )edit

REP-0118 explains how it works: http://www.ros.org/reps/rep-0118.html

joq gravatar image joq  ( 2012-08-16 13:34:29 -0600 )edit
rosmaker gravatar image rosmaker  ( 2012-08-16 16:47:41 -0600 )edit

Question Tools

Stats

Asked: 2012-08-16 05:35:07 -0600

Seen: 1,272 times

Last updated: Aug 16 '12