How to resize the window obtained from cv2.imshow()?
问题 I started learning OpenCV today and I wrote a short code to upload (I don't know, if it's the right term) a random image: 1 It works fine, and I can open the image, but what I get is a big window and I can't see the full image unless I scroll it: 2 So, I'd like to know a way that I could see the whole image pretty and fine in a shorter window. 回答1: You can resize the image keeping the aspect ratio same and display it. #Display image def display(img, frameName="OpenCV Image"): h, w = img.shape