Ask Your Question

How can I overlay two pictures [solved]

asked 2020-04-20 08:09:45 -0600

Lennart gravatar image

updated 2020-06-29 04:55:51 -0600

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.


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2020-04-27 09:05:11 -0600

Lennart gravatar image

updated 2020-06-29 04:57:27 -0600

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.

edit flag offensive delete link more

answered 2020-04-25 14:48:00 -0600

pring gravatar image

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:

Good luck!

edit flag offensive delete link more

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: 2020-04-20 08:09:45 -0600

Seen: 187 times

Last updated: Jun 29 '20