
第一步,開啟Python語言的shell介面,也就是idle。

第二步,載入要使用的工具包,程式碼如下:
import skimage.io as io from skimage import data_dir

Python影片教學》
第三步,設定圖片所在的路徑,文中的路徑是採用了庫中檔案的目錄,程式碼如下:str=data_dir + '/*.png'

coll = io.ImageCollection(str)

print(len(coll))

io.imshow(coll[10]) io.show()

#
以上是python如何批次讀取圖片的詳細內容。更多資訊請關注PHP中文網其他相關文章!