Getting distance with camera/depth/image_raw

asked 2017-10-30 08:26:57 -0600

tsw gravatar image

updated 2017-11-06 02:44:28 -0600

I want to get the distance of Kinect on the topic camera/depth/image_raw. Can anyone show me the program to do that on python. I used cv_bridge to convert the topic and only obtained the depth image. Please show me how to get the distance. My depth image is in single channel 32 bit. I wanted to calculate the distance based on the formula found on mathnathan.com as such 34800/(1091.5-d)(cm) where d is the depth array in 11 bit. The formula is based on what is experimented by the person. Should I change my image to 11 bit or is there other formula to obtain the distance. I do not consider using the points topic as it is slow through ros.

edit retag flag offensive close merge delete

Comments

1

Please show me how to get the distance.

Please show / tell us what you've already tried.

We're here to help, not to do your work for you.

If you tried something and it didn't work or something is unclear, we can help.

gvdhoorn gravatar image gvdhoorn  ( 2017-10-30 08:52:06 -0600 )edit

Sorry for not being specific. I have updated my question.

tsw gravatar image tsw  ( 2017-11-06 02:38:10 -0600 )edit