How do I get the computer screen resolution on OpenCV? I need to show two images side by side using the whole screen width, OpenCV requires the exact window size I wanna create.
Using opencv instead of OS functions:
cv.namedWindow("dst", cv.WND_PROP_FULLSCREEN)
cv.setWindowProperty("dst",cv.WND_PROP_FULLSCREEN,cv.WINDOW_FULLSCREEN)
(a,b,screenWidth,screenHeight) = cv.getWindowImageRect('dst')
So I create a window in full-screen mode and ask for its width and height
It should work for any OS, but it worked only for Windows. Under Linux, the window wasn't full-screen.