One ,cv2.resize() 
import cv2 img = cv2.imread("image1.png") print(img.shape) dst =
cv2.resize(img,(img.shape[1]//2,img.shape[0]//2),interpolation=cv2.INTER_CUBIC)
print(dst.shape) cv2.imshow("dst",dst) cv2.imshow("original",img) cv2.waitKey(0)

 

Two ,imutil.resize()
import cv2 import imutils img = cv2.imread("image1.png") print(img.shape) dst
= imutils.resize(img,width=img.shape[1]//2,height=img.shape[0]//2)
print(dst.shape) cv2.imshow("dst",dst) cv2.imshow("original",img) cv2.waitKey(0)
The effect is the same as above .

Technology
©2019-2020 Toolsou All rights reserved,
Python Garbage collection and memory leak hive Summary of processing methods for a large number of small files The difference between memory overflow and memory leak , Causes and Solutions Create data mysql Library process You don't know ——HarmonyOS stay Vue Use in Web WorkerSparkSQL Achieve partition overlay write msf Generate Trojan horse attack android mobile phone Linux Page replacement algorithm C Language implementation Django Personal blog building tutorial --- Time classified archiving