我有 10 张图像要处理。我如何一张一张地调用所有这些图像?(图1叫-process-complete)(图2叫-process-complete)等等。如何在 OpenCv python 中做到这一点?谢谢
我相信您的问题是在特定文件夹中查找文件以供以后处理,如果是这种情况,那么这可能会有所帮助。
import glob
from PIL import Image
files = glob.glob("/home/User/Pictures/*.png") #Get all files from a directory /home/username/Pictures that have an extension png
for pic in files: #process each picture as per your api
jpgfile = Image.open(pic)
print jpgfile.bits, jpgfile.size, jpgfile.format
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句