Presenting video in full screen with Python excludes the bottom bar

asked 2018-07-17 07:44:29 -0600

I'm trying to use opencv in order to present a video in full screen. The problem is that that bottom bar is cut . As you can see in the image , I don't see the bottom windows bar:

image description

I used the following code :

import numpy as np
import cv2

cap = cv2.VideoCapture(0)
cv2.namedWindow("image", cv2.WINDOW_FULLSCREEN)  
cv2.moveWindow('image',0,0)        
cv2.setWindowProperty("image", cv2.WND_PROP_FULLSCREEN,cv2.WINDOW_FULLSCREEN)
cap.set(3, 1920)
cap.set(4, 1080)
while(True):
    ret, frame = cap.read()
    cv2.imshow('frame',frame)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

Tried to change this :

 cv2.namedWindow("image", cv2.WINDOW_FULLSCREEN)

To this:

 cv2.namedWindow("image", cv2.WINDOW_FREERATIO)

And also, i tried to reduce the Windows height from 1080 to less. It did't change anything.

Any suggestions ?

edit retag flag offensive close merge delete