Ask Your Question
-1

Overlaying masked image over another?

asked 2017-06-29 15:04:27 -0600

Melkarid gravatar image

I'm trying to overlay an image with a mask applied to it onto another image. The masked image displays black where I would like it to be transparent when copied onto the background image.

Is there any way to do this?

Thank you

edit retag flag offensive close merge delete

Comments

Do you have the mask in a separate Mat object that you can apply, or just the image with the mask applied to it?

KjMag gravatar imageKjMag ( 2017-06-29 17:34:37 -0600 )edit

There are plenty of perfectly good reasons to do this berak. No reason to be rude.

Tetragramm gravatar imageTetragramm ( 2017-06-29 19:59:13 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-06-29 19:56:11 -0600

Tetragramm gravatar image

The copyTo function takes a mask as a parameter.

transparent.copyTo(background, mask);
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-06-29 15:04:27 -0600

Seen: 1,787 times

Last updated: Jun 29 '17