当前位置:网站首页>Opencv creates a window - cv.namedWindow()
Opencv creates a window - cv.namedWindow()
2022-08-01 09:26:00 【Width in the journey~】
1, format:
cv.namedWindow(winname[, flags])span>2. Function:
Create a window3. Enter:
winname: window nameflags: window creation mode, including:(1)WINDOW_NORMAL or WINDOW_AUTOSIZEWINDOW_NORMAL: Window size is variableWINDOW_AUTOSIZE: The window size is the image size, immutable(2)WINDOW_KEEPRATIO or WINDOW_FREERATIOWINDOW_KEEPRATIO: keep image aspect ratioWINDOW_FREERATIO: Image aspect ratio is variable(3)WINDOW_GUI_EXPANDED or WINDOW_GUI_NORMALWINDOW_GUI_EXPANDED: Window with toolbar and status barWINDOW_GUI_NORMAL: Window without toolbar and status barThe default flags are:WINDOW_AUTOSIZE | WINDOW_KEEPRATIO | WINDOW_GUI_EXPANDED3. Output:
None4. Example:
# import OpenCVimport cv2 as cv# read imageimage = cv.imread(r'fire.jpeg')# Create windowcv.namedWindow('image', cv.WINDOW_NORMAL)# show imagecv.imshow('image', image)cv.waitKey(0)Our image result is:
边栏推荐
猜你喜欢
随机推荐
The soul asks: How does MySQL solve phantom reads?
leetcode-6132:使数组中所有元素都等于零
灵魂发问:MySQL是如何解决幻读的?
【STM32】入门(二):跑马灯-GPIO端口输出控制
C语言中编译时出现警告C4013(C语言不加函数原型产生的潜在错误)
pytest interface automation testing framework | parametrize source code analysis
Classify GBase 8 s lock
WLAN networking experiment of AC and thin AP
【编程之外】当遮羞布被掀开,当人们开始接受一切
2022杭电中超杯(1)个人题解
《时代》杂志:元宇宙时代将改变世界
三子棋(C语言实现)
正则表达式符号
Analysis of High Availability Solution Based on MySql, Redis, Mq, ES
STM32个人笔记-看门狗
js中如何实现深拷贝?
JVM内存模型之深究模型特征
自定义IP在PCIE中使用
Microsoft Azure & NVIDIA IoT developers season I | Azure IoT & NVIDIA Jetson development foundation
XX市消防救援指挥中心实战指挥平台多链路聚合解决方案实例








