The solution to the image that appears after OpenCV runs in python is too large and cannot be resized

Your program is written like this:

cv2.imshow("BGR", imgname)
cv2.waitKey(0)
cv2.destroyAllWindows()

After running the program, the size cannot be adjusted. The improved program is written like this:

cv2.namedWindow('BGR', 0)
cv2.imshow("BGR", imgname)
cv2.waitKey(0)
cv2.destroyAllWindows()

Set the picture size, the improved program is written like this:

cv2.namedWindow('BGR', 0)
cv2.resizeWindow('BGR', X, Y)
cv2.imshow("BGR", imgname)
cv2.waitKey(0)
cv2.destroyAllWindows()

Guess you like

Origin blog.csdn.net/CHENG15234944691/article/details/123534358