["python","opencv","image-processing","alphablending","alpha-transparency"]
Using openCV to overlay/blend transparent image onto another image

How can I overlay a transparent PNG onto another image without losing it's transparency using openCV in python? import cv2 background = cv2.imread('field.jpg') overlay = cv2.imread('dice.png') # Help please cv2.imwrite('combined.png', background) Desired output: Sources: Background Image Overlay
import cv2 background = cv2.imread('field.jpg') overlay = cv2.imread('dice.png') added_image = cv2.addWeighted(background,0.4,overlay,0.1,0) cv2.imwrite('combined.png', added_image)