Image processing Python图像读取

Image processing Python图像读取,image-processing,python-3.x,ocr,Image Processing,Python 3.x,Ocr,可以用python读取gif上的文本吗?我不认为是,但如果是的话,如果你能告诉我怎么做,那就太好了。这就是我一直想做的 def getContents(url): x = urllib.request.urlopen(url).read()# would add decode, but it gives errors return x 执行“getContents(gif)”返回奇怪的字符,看起来像字节“\x00”等。不确定它们在python中是否有任何东西可以读取。如果我

可以用python读取gif上的文本吗?我不认为是,但如果是的话,如果你能告诉我怎么做,那就太好了。这就是我一直想做的

def getContents(url):
    x = urllib.request.urlopen(url).read()# would add decode, but it gives errors 
    return x 

执行“getContents(gif)”返回奇怪的字符,看起来像字节“\x00”等。不确定它们在python中是否有任何东西可以读取。如果我的描述过于模糊,我深表歉意,但这是我所能描述的最好的问题。问题是打开gif然后读取它,或者打开jpg并读取它,将得到返回的读取文本。

这称为OCR。有许多这样的库,请尝试一下tesseract: