
This question is related with this one: how to display a full screen images with python2.7 and opencv2.4
I want to display a black image full screen, i have created even a black image with the same resolution of the screen. But i get a little white stripe on top and on the left of the screen. I don't know if it is a problem of my screen that is not aligned or its my code. I have tried in 2 displays and the white stripe is displayed.
So if you run this code below, do you get a full black image?
import numpy as np
import cv2
if __name__ == "__main__":
img = cv2.imread('nero.jpg')
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)
cv2.destroyAllWindows()
EDIT : This method is not working for me. do you know anther way or libraries to display a full screen image?
EDIT 2: still unsolved, i am starting to think that it is an openCv bug
Answer1:
Yes I do.
img = np.zeros((900, 1600)) #my aspect ratio is 16x9
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)
gives me a fully black screen. Are you sure you are using the right aspect ratio?