小编Sri*_*nth的帖子

“不支持的图像对象”,使用 Tesseract

我正在使用 Tesseract 和 Python 从图像构建字符标识符。

\n\n

这是我的代码:

\n\n
from PIL import Image\nimport pytesseract as pyt\n    \xc2\xa0\nimage_file = \'location\'\nim = Image.open(image_file)\ntext = pyt.image_to_string(image_file)\nprint (text)\n
Run Code Online (Sandbox Code Playgroud)\n\n

我在执行该程序时收到以下错误:

\n\n
\n

类型错误:不支持的图像对象

\n
\n\n

有人能解决这个问题吗?

\n

python python-imaging-library python-3.x python-tesseract

5
推荐指数
1
解决办法
2万
查看次数