Ask Your Question

Revision history [back]

white border while displaying a full image with python and opencv

Hi! I want to display a black image in a full screen mode. It looks a really sample task to do, but when i run the code below i get a little white strip on top and on the left. It doesn't matter if i change the size of the numpy array, i always get it. If you run this code, do you get a fully black screen?? I have tried with different laptop and different version of opencv thanks

img = np.zeros((800, 1280)) #my resolution is 800, 1280
cv2.namedWindow("test", cv2.WND_PROP_FULLSCREEN)
cv2.setWindowProperty("test", cv2.WND_PROP_FULLSCREEN, cv2.cv.CV_WINDOW_FULLSCREEN)
cv2.imshow("test",img)
cv2.waitKey(0)