Image Processing using Python Library OpenCV

Objectives :

pip install opencv-python
import cv2
cn = numpy.zeros((600, 600, 3))
cv2.imshow("Anyname", cn)
cv2.WaitKey()
cv2.destroyAllWindows()
import cv2
image1 = cv2.imread("path_of_the_image")
image2 = cv2.imread("path_of_the_image")
girl_face = girl[1:145, 40:180]
width = int(girl_face.shape[1] * 215/140) # here dividing the column of boy's face shape by the column of girl's face to make
height = int(girl_face.shape[0] * 310/144) # same shape of boy inorder to swap it
dim = (width, height)
girl_resized = cv2.resize(girl_face, dim, interpolation=cv2.INTER_AREA)
import numpy as np
import cv2
girl_face = girl[1:145, 40:180]
width = int(girl_face.shape[1] * 215/140) # here dividing the column of boy's face shape by the column of girl's face to make
height = int(girl_face.shape[0] * 310/144) # same shape of boy inorder to swap it
dim = (width, height)
girl_resized = cv2.resize(girl_face, dim, interpolation=cv2.INTER_AREA)

Python Enthusiast