Overlay image onto video with transparent background [closed]

asked 2016-11-29 04:16:39 -0500

I need to overlay an image on a video. The image should not be transparent, but the background of the image should be completely transparent.

I realize I could loop through every pixel in the image, and set the the individual pixels in the video where the color is not equal to the background color. I hope there is an easier way to do this.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-11-09 08:14:02.653816

Comments

1

there is no such thing as transparency in video, you'll have to come up with your own blending formula here.

(you could e.g. make a mask from color==bg, and use that with copyTo())

berak gravatar imageberak ( 2016-11-29 04:54:27 -0500 )edit