Python Forum
Python OpenCV window not opening in fullscreen mode
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python OpenCV window not opening in fullscreen mode
I have some basic code to receive a camera stream as a numpy array and display it as a fullscreen window. I'm able to receive and display the camera, but 75% of the time the fullscreening doesn't work and instead of scaling it nicely and centering it on the screen, it displays smaller in the corner. Any clue why?
from numpysocket import NumpySocket
import cv2

host_ip = ''  # change me

npSocket = NumpySocket()
npSocket.startClient(host_ip, 9999)

cv2.namedWindow("window", cv2.WND_PROP_FULLSCREEN)

# Read until video is completed
def watch():
    # Capture frame-by-frame
    frame = npSocket.recieve()
    cv2.imshow("window", frame)
    if cv2.waitKey(25) & 0xFF == ord('q'):
if __name__=="__main__":
    while True:

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python IDE doesn't see opencv-python package on my Jetson Nano sadhaonnisa 1 710 Oct-11-2020, 01:04 AM
Last Post: Larz60+
  pip3 install opencv-python fails on 'skbuild' Pedroski55 2 1,947 Sep-15-2020, 11:33 AM
Last Post: snippsat
  python and openCV installation dejhost 16 3,108 Aug-04-2020, 02:23 AM
Last Post: snippsat
  Python Fullscreen finndude 5 969 May-03-2020, 01:30 PM
Last Post: buran
  How to detect the text above lines using OpenCV in Python pframe 0 955 Apr-14-2020, 09:53 AM
Last Post: pframe
  cv2.imshow Python is not opening the window on top Petko 0 1,002 Feb-21-2020, 11:11 AM
Last Post: Petko
  Python opening a new command window m_lokeshkumar 1 683 Jan-05-2020, 09:01 PM
Last Post: Larz60+
  Developing Python with OpenCV into an Android App AviationFreak 1 3,504 Sep-29-2019, 08:55 AM
Last Post: wavic
  Error -3 when opening matlab file in python python_newbie09 0 947 Aug-02-2019, 11:51 AM
Last Post: python_newbie09
  python script file not opening in IDLE editor srm 2 2,065 Jun-23-2019, 08:45 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020