Robotics StackExchange | Archived questions

How can I overlay two pictures [solved]

Hi I'm want to overlay one picture with another using ROS. I get both picture from camera topics.

Can somebody tell me, what is the easiest way to that? I'm new in working with images and with ros.

I'm using ROS kinetic and Ubuntu 16.04.

Greetings

Asked by Lennart on 2020-04-20 08:09:45 UTC

Comments

Answers

You'll first want to use the cv_bridge to convert your image messages to opencv images.

Then you can use opencv's image library to get a blend of images: https://www.pyimagesearch.com/2016/03/07/transparent-overlays-with-opencv/

Good luck!

Asked by pring on 2020-04-25 14:48:00 UTC

Comments

I saving my pictures now with the image_view image saver. After that I wrote a short C-program, which is reading the .bmp-file. When the Pixel is Black (0 0 0) I take the Pxel from the other Image, if it's not Black I take the Pixel from this Image. After this I'm saving it again in a .bmp-file.

Additional Information: My Background in the upper Picture is always black.

Asked by Lennart on 2020-04-27 09:05:11 UTC

Comments