How can I overlay a transparent PNG onto another image without loosing 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)
2.1m questions
2.1m answers
60 comments
57.0k users