zhiqingstudy

Be a young person with knowledge and content

Several apis involved in creating windows in Opencv.
  1. NamedWindow(): used to create a window and name it;
  2. Imshow(): display a window, which can be called directly to display a window
  3. DestroyAllWindows(): close all windows;
  4. ResizeWindow: Sets the size of the window.
import cv2 # 导入opencv

cv2.namedWindow('new',cv2.WINDOW_NORMAL) 
# WINDOW_AUTOSIZE 窗口自动大小,不能调整窗口大小
# WINDOW_NORMAL 窗口可以调整大小
cv2.resizeWindow('new',600,400)
# 设置窗口的大小,new是被设置窗口的名称,600是宽度,400是高度
cv2.imshow('new',0)
# 显示窗口,new是被显示的窗口名称,0是输入的数组,没有就填0
cv2.waitKey(0)
# 显示窗口等待时间,单位是毫秒,数值为0就一直显示
comment
head sculpture
Code:
Related

Why you shouldn't stay at a job for more than 2 years?

3 harsh facts long-distance relationships

how to keep your girlfriend interested in a long-distance relationship




Unless otherwise specified, all content on this website is original. If the reprinted content infringes on your rights, please contact the administrator to delete it
Contact Email:2380712278@qq.com

Filing number:皖ICP备19012824号