Home | Tutorials | Wiki | Issues
Ask Your Question
0

depth value of openni_camera

asked 2017-08-01 06:57:55 -0600

Akitoshi gravatar image

Hello. I am doing simulation using openni_camera(https://github.com/ros-drivers/openni_camera) on Gazebo. I'd like to get the depth value of real type, but uint8[] will return as shown by document(http://docs.ros.org/api/sensor_msgs/html/msg/Image.html). Since 4 data was stored for one point, I converted it to float32 using union, but we could not get the correct value. What do these four data represent? Also, how can we obtain the depth value? Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-01 10:17:12 -0600

iche033 gravatar image

there are a few related questions and answers in ROS answers, e.g. http://answers.ros.org/question/16061...

I'm not sure what you mean by 4 data stored per point, maybe RGBD? The depth image topic will give you D. After converting to float32, you get depth values so there'll be a total of width*height values.

edit flag offensive delete link more

Comments

Thank @iche033! Thanks to the URL you sent, I was able to solve it! Perhaps one depth value was converted to four data, but I did not know how to reprocess the original data. However, I were able to obtain depth values by using openCV!

Akitoshi gravatar imageAkitoshi ( 2017-08-02 05:37:44 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-08-01 06:57:55 -0600

Seen: 157 times

Last updated: Aug 01