Problem with OpenCV 3 - Image output too large

asked 2015-10-27 08:18:45 -0600

arp1561 gravatar image

updated 2015-10-27 08:33:40 -0600

LorenaGdL gravatar image

I try a very simple program which reads the image and outputs it. The problem I am having is that the resultant image outputted by the cv2.imshow() is very very large in size. I have tried ccv2.resizeWindow() with the parameters but it does not seem to work. I really hope you guys can help me! Thanks in advance! :)

import cv2
import numpy as np
img = cv2.imread('messi.jpg')
cv2.imshow('img',img)

cv2.waitKey(0)
cv2.destroyAllWindows()
edit retag flag offensive close merge delete

Comments

3

you need a cv2.namedWindow('img', cv2.WINDOW_NORMAL) , else the resize does not work

berak gravatar imageberak ( 2015-10-27 08:35:52 -0600 )edit