ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

CvBridge: depth registration for depth and rgb opencv images and convert to ros image msg

asked 2018-01-17 18:21:38 -0500

Oh233 gravatar image

What I want to do basically is publishing depth_registred image on topic. I already have opencv depth and rgb images and the transformation between them. I wonder should I finish depth registration first and then use CvBridge to convert it to ros image msg or convert depth and rgb images to two ros image msgs and finish depth registration? I have tried the first way but I am stuck at the step of converting to ros image msg since I can't find specific encoding for RGBD image. Thanks in advance for any suggestion.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-01-18 03:08:49 -0500

All the RGB-D cameras I've worked with in ROS publish their RGB and depth (registered) on different image topics. There is no RGB-D type as far as I know, it would be messy anyway because the depth channel is usually a positive floating point channel (in meters) and the RGB channels are 8 bit intensities. You could maybe get away with a 4 channel float image but it would not be the most bandwidth efficient.

edit flag offensive delete link more


But when launching Kinect2 on ROS by freenect_camera package, it does publish depth_registered image on topic. Hence I wonder how does it get depth_registered image.

Oh233 gravatar image Oh233  ( 2018-01-18 08:20:58 -0500 )edit

Sorry, it is my bad. I misunderstood the meaning of depth_registered image. I thought it is RGBD image. Thanks for your help.

Oh233 gravatar image Oh233  ( 2018-01-18 13:41:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-01-17 18:21:38 -0500

Seen: 718 times

Last updated: Jan 18 '18