发现了imageio文档中有代替scipy.misc的说明
原文:https://imageio.readthedocs.io/en/latest/scipy.html?highlight=imread
imageio.imread可以代替scipy.misc.imread
用pilmode代替mode
用as_gray代替flatten
pilmode類(lèi)型:
‘L’ (8-bit pixels, grayscale)
‘P’ (8-bit pixels, mapped to any other mode using a color palette)
‘RGB’ (3x8-bit pixels, true color)
‘RGBA’ (4x8-bit pixels, true color with transparency mask)
‘CMYK’ (4x8-bit pixels, color separation)
‘YCbCr’ (3x8-bit pixels, color video format)
‘I’ (32-bit signed integer pixels)
‘F’ (32-bit floating point pixels)
as_gray:
如果as_gray=True,則用‘F‘模式讀取圖片;
如果已經(jīng)設(shè)置了pilmode且as_gray=True,圖片首先根據(jù)pilmode設(shè)置的值讀取,再用’F’模式壓平(flatten)
總結(jié)
以上是生活随笔為你收集整理的发现了imageio文档中有代替scipy.misc的说明的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: maya批量操作mel_MAYA对多个模
- 下一篇: oracle sum详解,oracle