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

How to interpret depth data from sensor_msgs/Image

asked 2015-12-30 10:31:29 -0500

Naman gravatar image

Hi,

I am using iai_kinect2 to get a depth cloud in the form sensor_msgs/Image on the topic /kinect2/sd/image_depth_rect. The topic contains :

header: 
  seq: 0
  stamp: 
    secs: 1451490491
    nsecs: 411043474
  frame_id: kinect2_ir_optical_frame
height: 424
width: 512
encoding: 16UC1
is_bigendian: 0
step: 1024
data: [176, 11, 0, 0, 176, 11,0, 52, 11, 29, 11, 52, 11, 29, 11, 122, 11, 170, 11, 221, 11, 174, 11, 191, 11, 166, 11, 187, 11, 0, 0, 0, 0, 131, 11, 0, 0, 0, 0, 180, 11, 0, 0, 0, 0, 0, 0, 0, 0, 114, 11, 86, 11, 131, 11, 0, 0, 131, 11, 0, 0, 0, 0, 50, 11, 43, 11, 138, 11, 251, 11, 152, 11, 85, 11, 47, 11, 68, 11, 122, 11, 124, 11, 123, 11, 109, 11, 0, 0, 199, 10, 0, 0, 117, 11, 140, 11, 0, 0, 64, 11, 91, 11, 0, 0, 0, 0, 241, 10, 0, 0, 223, 10, 19, 11, 115, 11, 121, 11, 102, 11, 136, 11, 173, 11, 169, 11, 93, 11, 73, 11, 123, 11, 151, 11, 124, 11, 96, 11, 49............]

As you see, data contains numbers between 0 and 255. How can I make sense of it? I want to use depthimage_to_laserscan to convert this depth image to laser scan but before that I need to perform some operations on the depth image (or depth_cloud) like removing points on the ground and noise and therefore, I need to know how to interpret this depth data. Can someone tell how to interpret this data?

Thanks in advance.
Naman Kumar

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-02-09 10:11:36 -0500

est_CEAR gravatar image

Hi,

Here is a link to the documentation of the sensor_msgs/Image. About 16UC1 coding, 16U means that the colour is coded in 16 unsigned bits per channel, and C1 that there is one channel. Then, convert your colors in hexadecimal and see the table with some 16U colors at this link.

edit flag offensive delete link more
-2

answered 2015-12-30 11:08:36 -0500

denim_patel gravatar image

updated 2015-12-30 11:11:38 -0500

in very basic , "it's a lidar data". Your node converted the 3d into 2d for slam. Read more on robopeak lidar data for better understanding.

edit flag offensive delete link more

Comments

What do you mean by "Its a lidar data" ? This data is the direct output of iai_kinect2 before running depthimage_to_laserscan. It is a depth cloud data from Kinect 2 of the form sensor_msgs/Image.

Naman gravatar image Naman  ( 2015-12-30 11:13:56 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2015-12-30 10:31:29 -0500

Seen: 1,308 times

Last updated: Feb 09 '16