Answers for "Display an image over another image at a particular co-ordinates in openCV"

0

Display an image over another image at a particular co-ordinates in openCV

import cv2
import numpy as np

img1 = cv2.imread('Desert.jpg')
img2 = cv2.imread('Penguins.jpg')

img3 = img1.copy()
# replace values at coordinates (100, 100) to (399, 399) of img3 with region of img2
img3[100:400,100:400,:] = img2[100:400,100:400,:]
cv2.imshow('Result1', img3)
Posted by: Guest on April-09-2021

Code answers related to "Display an image over another image at a particular co-ordinates in openCV"

Browse Popular Code Answers by Language