1
import Image
imageFile = "C:\Users\Abhi\Desktop\cbir-p\images.jpg"
im1 = Image.open(imageFile)
Error:
File "C:\Users\Abhi\Desktop\cbir-p\im1.py", line 5, in <module>
im1 = Image.open(imageFile)
File "C:\Python27\lib\site-packages\PIL\Image.py", line 2025, in open
raise IOError("cannot identify image file")
IOError: cannot identify image file
帮帮我吧,我已经安装了所有必需的包PIL,枕头,opencv的等不能在Python中打开图像文件
http://stackoverflow.com/questions/16387069/open-images-python 也确保ImagePath的是正确 – xhallix
您也可以尝试使用原始图像路径,在这里解释:http://stackoverflow.com/a/21060179/1349663 – user1349663
你可以尝试从PIL导入图像,而不是图像,让我们知道如果发生任何变化 – duck