当前位置:网站首页>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)输出图像


边栏推荐
猜你喜欢
随机推荐
kotlin 插件更新到1.3.21
Several forms of Attribute Changer
Common JVM interview questions and answers
Navicat从本地文件中导入sql文件
Access database query
configure:error no SDL library found
this指向问题
纯shell实现文本替换
What is the difference between NFT and digital collection?
js中的this指向与原型对象
cocos2d-x 实现跨平台的目录遍历
sql 添加 default 约束
[uiautomation] Get WeChat friend list (stored in txt)
朴素贝叶斯文本分类(代码实现)
Understanding of objects and functions in js
[Cloud native] Ribbon is no longer used at the bottom layer of OpenFeign starting from the 2020.0.X version
一个简单的bash转powershell案例
The server time zone value ‘й‘ is unrecognized or represents more than one time zone
[Ubuntu20.04 installs MySQL and MySQL-workbench visualization tool]
Sqlite A列数据复制到B列









