The reason you can see the entire image now is because of the cv2.WINDOW_NORMAL
flag you passed into the cv2.namedWindow()
function.
This displays the image, cropped if it is too big to fit into the screen:
import cv2
img = cv2.imread("image.png")
cv2.imshow("Image", img)
cv2.waitKey(0)
This displays the image, scaled down to a convenient size (and the window can be resized):
import cv2
img = cv2.imread("image.png")
cv2.namedWindow("Image", cv2.WINDOW_NORMAL)
cv2.imshow("Image", img)
cv2.waitKey(0)
This displays the image, scaled down to the specified size... if the specified size can be fit into your screen; else, it will scale the image to be the size of your screen (and the window can be resized):
import cv2
img = cv2.imread("image.png")
h, w, _ = img.shape
cv2.namedWindow("Image", cv2.WINDOW_NORMAL)
cv2.imshow("Image", img)
cv2.resizeWindow("Image", w, h)
cv2.waitKey(0)
So basically,
it is impossible for the window to be bigger than your screen, but the cv2.WINDOW_NORMAL
flag made it so that instead of having the image cropped to fit the screen, it got scaled to fit the screen.