How to Adding and Blending image in OpenCV.
import cv2 import numpy as np img = cv2.imread('Mehjabin.png') img2 = cv2.imread('ImageCV.jpg') resize_img = cv2.resize(img2, (img.shape[1], img.shape[0])) add_img = cv2.add(img, resize_img) Blending_img = cv2.addWeighted(img, 0.6, resize_img, 0.4, 0) while True: cv2.imshow('window', img) cv2.imshow('window2', img2) cv2.imshow('window3', Blending_img) if cv2.waitKey(1) == 27: breakcv2.destroyAllWindows()
Comments
Post a Comment