Ask Your Question
0

How to interpret the raw depth image data? [closed]

asked 2013-12-16 10:33:39 -0600

Keerthi Raj gravatar image

updated 2013-12-17 21:14:09 -0600

tfoote gravatar image

Hello,

I want to get the distance of an object from the depth sensor(Primesense). I am able to subscribe to all the topics. I am not sure which one to use for my purpose. I tried using "/camera/depth_registered/image_rect_raw" topic.

I have the following information from the topic:

Image Height: 480
Image Width: 640
Encoding: 16UC1
Is Big Endian ?: 0
Step: 1280

The data looks like this:

2  86  2  85  2  85  2  85  2  84  2  84  2  83  2  82  2  82  2  82  2  82  2  82  2  82  2  82  2  82  2  81  2  81  2  81  2  81  2  80  2  80  2  78  2  77  2  75  2  75  2  63  2  63  2  62  2  61  2  60  2  59  2  59  2  58  2  58  2  57  2  57  2  57  2  57  2  56  2  57  2  56  2  57  2  58  2  58  2  58  2  58 ..............

But I don't know what these array of bytes indicate. It would be very helpful if someone can teach me How to get the distance from this data?

Thanks in advance.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Keerthi Raj
close date 2014-07-12 19:01:51.853768

1 Answer

Sort by ยป oldest newest most voted
5

answered 2013-12-16 14:33:49 -0600

Hi there!

It would be easier for you to subscribe to the topic "/camera/depth/points". This topic provides you already with a 3D point cloud extracted from the depth sensor ready to use. The topic's type is PointCloud2 and you can access X, Y and Z values for each point using PCL.

I hope this helps.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-12-16 10:33:39 -0600

Seen: 761 times

Last updated: Dec 16 '13