当前位置:网站首页>cv2.imread()
cv2.imread()
2022-07-31 05:15:00 【Cassiel_cx】
函数解析
cv2.imread(filename, flags = None)
filename:读取图片的路径
flags:(1) 1,默认值,表示加载彩色图片;(2) 0,表示加载灰度图片;(3) -1,表示加载包括alpha通道的图片。
使用示例
import cv2
img_color = cv2.imread('C:/Users/15989/Desktop/11.jpeg')
img_gray = cv2.imread('C:/Users/15989/Desktop/11.jpeg', 0)
cv2.imshow('color', img_color)
cv2.waitKey()
cv2.imshow('gray', img_gray)
cv2.waitKey(1)输出图像


边栏推荐
- 微信小程序启动优化
- 著名网站msdn.itellyou.cn原理分析
- MySQL高级SQL语句(二)
- The feign call fails, JSON parse error Illegal character ((CTRL-CHAR, code 31)) only regular white space (r
- VS2017连接MYSQL
- 理解js运算符
- qt:cannot open C:\Users\XX\AppData\Local\Temp\main.obj.15576.16.jom for write
- For penetration testing methods where the output point is a timestamp (take Oracle database as an example)
- Gradle sync failed: Uninitialized object exists on backward branch 142
- mysql common commands
猜你喜欢

VS connects to MYSQL through ODBC (1)

MySQL高级语句(一)

Common JVM interview questions and answers

The latest MySql installation teaching, very detailed

腾讯云GPU桌面服务器驱动安装

Hyper-V新建虚拟机注意事项

Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'

Tencent Cloud GPU Desktop Server Driver Installation

VS通过ODBC连接MYSQL(一)

Global scope and function scope in js
随机推荐
unicloud 云开发记录
Understanding of js arrays
[swagger close] The production environment closes the swagger method
C语言 | 获取字符串里逗号间隔的内容
[uiautomation] Get WeChat friend list (stored in txt)
Tencent Cloud GPU Desktop Server Driver Installation
flutter arr dependencies
this points to the problem
cocos2d-x-3.2图片灰化效果
Several solutions for mysql startup error The server quit without updating PID file
ERROR Error: No module factory availabl at Object.PROJECT_CONFIG_JSON_NOT_VALID_OR_NOT_EXIST ‘Error
360 hardening file path not exists.
TransactionTemplate transaction programmatic way
Android software security and reverse analysis reading notes
5 methods of MySQL paging query
Getting to know regular expressions
Notes on creating a new virtual machine in Hyper-V
break and continue exit in js
this指向问题
Understanding of objects and functions in js