日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程语言 > python >内容正文

python

python opencv imread(filename, flags=None) 读取图像 flags cv::ImreadModes 参数上哪看去?

發(fā)布時(shí)間:2025/3/19 python 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python opencv imread(filename, flags=None) 读取图像 flags cv::ImreadModes 参数上哪看去? 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

在調(diào)用opencv的imread(filename, flags=None)函數(shù)時(shí),后面有個(gè)flags=None參數(shù),但打開(kāi)文檔輕描淡寫,不知該參數(shù)上哪找去,用全局搜索也搜不到,莫非要到官網(wǎng)查?(擦汗’’)

打開(kāi)官網(wǎng),有個(gè)Online documentation,點(diǎn)它:
然后找到自己opencv版本點(diǎn)進(jìn)去,我的是這個(gè)(如果不知道自己opencv版本可以在控制臺(tái)執(zhí)行pip list查看):


點(diǎn)進(jìn)去后右上角搜索就ok了:


IMREAD_UNCHANGED Python: cv.IMREAD_UNCHANGED If set, return the loaded image as is (with alpha channel, otherwise it gets cropped).IMREAD_GRAYSCALE Python: cv.IMREAD_GRAYSCALE If set, always convert image to the single channel grayscale image (codec internal conversion).IMREAD_COLOR Python: cv.IMREAD_COLOR If set, always convert image to the 3 channel BGR color image.IMREAD_ANYDEPTH Python: cv.IMREAD_ANYDEPTH If set, return 16-bit/32-bit image when the input has the corresponding depth, otherwise convert it to 8-bit.IMREAD_ANYCOLOR Python: cv.IMREAD_ANYCOLOR If set, the image is read in any possible color format.IMREAD_LOAD_GDAL Python: cv.IMREAD_LOAD_GDAL If set, use the gdal driver for loading the image.IMREAD_REDUCED_GRAYSCALE_2 Python: cv.IMREAD_REDUCED_GRAYSCALE_2 If set, always convert image to the single channel grayscale image and the image size reduced 1/2.IMREAD_REDUCED_COLOR_2 Python: cv.IMREAD_REDUCED_COLOR_2 If set, always convert image to the 3 channel BGR color image and the image size reduced 1/2.IMREAD_REDUCED_GRAYSCALE_4 Python: cv.IMREAD_REDUCED_GRAYSCALE_4 If set, always convert image to the single channel grayscale image and the image size reduced 1/4.IMREAD_REDUCED_COLOR_4 Python: cv.IMREAD_REDUCED_COLOR_4 If set, always convert image to the 3 channel BGR color image and the image size reduced 1/4.IMREAD_REDUCED_GRAYSCALE_8 Python: cv.IMREAD_REDUCED_GRAYSCALE_8 If set, always convert image to the single channel grayscale image and the image size reduced 1/8.IMREAD_REDUCED_COLOR_8 Python: cv.IMREAD_REDUCED_COLOR_8 If set, always convert image to the 3 channel BGR color image and the image size reduced 1/8.IMREAD_IGNORE_ORIENTATION Python: cv.IMREAD_IGNORE_ORIENTATION If set, do not rotate the image according to EXIF's orientation flag.

參考文章:python opencv imread()函數(shù) (從文件加載圖像)

總結(jié)

以上是生活随笔為你收集整理的python opencv imread(filename, flags=None) 读取图像 flags cv::ImreadModes 参数上哪看去?的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。