This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import cv2 | |
img = cv2.imread('background.jpg') | |
overlay_t = cv2.imread('foreground_transparent.png',-1) # -1 loads with transparency | |
def overlay_transparent(background_img, img_to_overlay_t, x, y, overlay_size=None): | |
""" | |
@brief Overlays a transparant PNG onto another image using CV2 | |