Point Cloud to depth information

asked 2017-07-12 09:26:06 -0600

BotLover gravatar image

Hi, I want to retrieve depth of various objects from the point cloud. I am getting point cloud from a stereo camera. All I know is that the z coordinate in point cloud does not corresponds to depth/ distance from stereo camera to object. Thanks in advance.

edit retag flag offensive close merge delete

Comments

Please post your tf tree.

Akif gravatar image Akif  ( 2017-07-12 09:28:19 -0600 )edit

link text this is the tf tree generated after executing rosrun tf view_frames

BotLover gravatar image BotLover  ( 2017-07-12 09:44:54 -0600 )edit

If you are gathering point cloud in one of _optical frames, z coordinate should point forward from the camera. If not, the driver you use may be written disregarding REP-103.

Akif gravatar image Akif  ( 2017-07-12 09:57:24 -0600 )edit

so you mean that z-coordinate would itself give me depth? what would be the units then?

BotLover gravatar image BotLover  ( 2017-07-12 10:11:44 -0600 )edit

No I don't. To be able to "mean" anything, you need to supply more details (like sensor model, driver you use, topic you listen and message samples etc.). Drivers should follow REP-103 for units but they do not have to.

Akif gravatar image Akif  ( 2017-07-13 01:40:12 -0600 )edit

Are you wanting radial distance, like if you had a ruler from the center of your camera to the object - distance = sqrt(x^2 + y^2 + z^2)?

lucasw gravatar image lucasw  ( 2017-07-13 11:26:28 -0600 )edit

Yes it is what I need!!!! @lucasw

BotLover gravatar image BotLover  ( 2017-07-13 19:44:36 -0600 )edit

I don't think there is an existing node to do that for you- is implementing that equation in your own node unclear or is just having the equation a sufficient answer to this question?

lucasw gravatar image lucasw  ( 2017-07-15 09:44:17 -0600 )edit