Python OpenCV - remove title bar, toolbar, and status bar

前端 未结 2 940
滥情空心
滥情空心 2021-01-19 11:52

I\'ve found documentation regarding C ++, but not much with python.

The basic code to display in python is:

import numpy as np
import cv2

# Load an          


        
2条回答
  •  我在风中等你
    2021-01-19 12:24

    cap2 = cv2.VideoCapture(0)
    cap2.set(3,320)
    cap2.set(4,200)
    
    ret2, image2 = cap2.read()
    cv2.imshow('frame2',image2)
    
    cv2.namedWindow('frame2',cv2.WND_PROP_FULLSCREEN)
    cv2.setWindowProperty('frame2', cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)

    i have found a trick, just put

    cv2.namedWindow('frame2',cv2.WND_PROP_FULLSCREEN)
    cv2.setWindowProperty('frame2', cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)
    

    below

    cv2.imshow('frame2',image2)
    

    Here, what we are actualy doing is playing full video in smaller size. That's why there is no title bar and borders.

提交回复
热议问题