Professional Documents
Culture Documents
import cv2
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
In [2]:
img1 = cv2.imread('D:/1234.jpg')
img1 = cv2.cvtColor(img1,cv2.COLOR_BGR2RGB)
plt.imshow(img1)
Out[2]:
<matplotlib.image.AxesImage at 0x298ff4147b8>
In [3]:
img2 = cv2.imread('D:/tt.png')
img2 = cv2.cvtColor(img2,cv2.COLOR_BGR2RGB)
plt.imshow(img2)
Out[3]:
<matplotlib.image.AxesImage at 0x298ff7f99b0>
In [4]:
img1 = cv2.resize(img1,(1200,1600))
img2 = cv2.resize(img2,(1200,1600))
In [5]:
blended = cv2.addWeighted(src1=img1,alpha=0.6,src2=img2,beta=0.2,gamma=0.3)
plt.imshow(blended)
Out[5]:
<matplotlib.image.AxesImage at 0x298ff85c470>
In [ ]:
In [ ]: