【问题标题】:Don't understand the result I have with pytesseract不明白我用 pytesseract 得到的结果
【发布时间】:2017-05-20 19:32:10
【问题描述】:

我正在尝试阅读以下图片:

try:
    import Image
except ImportError:
    from PIL import Image
import pytesseract as tes

results = tes.image_to_string(Image.open('./test.png'),boxes=True)
print(results)

这是我得到的结果:

_ 239 780 263 787 0
. 239 758 263 767 0
L 235 737 263 761 0
1 220 763 229 783 0
1 220 741 229 761 0
‘ 129 763 137 784 0
1 129 741 136 761 0
1 220 650 229 670 0
‘ 220 628 229 648 0
F 235 537 263 561 0
. 239 531 263 540 0
A 239 511 268 534 0
_ 199 554 223 561 0
I 260 401 268 421 0
r 235 424 263 448 0
. 239 418 263 427 0
_ 239 398 263 404 0
{ 220 424 229 444 0
I 220 401 229 421 0
“ 220 288 229 331 0

这是什么意思?我如何解释这个结果?

非常感谢!

【问题讨论】:

    标签: python ocr tesseract


    【解决方案1】:

    当您在tes.image_to_string() 中设置boxes=True 时,输出为框文件格式,其中行中的第一个字母是识别的字符,然后是图像中该字符出现的边界框坐标。如果boxes=Falsetesseract 只会输出识别的字符。

    您尝试OCR 的图像是 7 段数字,您可能需要经过训练的 7 段数字(语言)数据才能获得良好的结果。

    【讨论】:

      猜你喜欢
      • 2018-04-08
      • 1970-01-01
      • 2015-05-17
      • 2013-09-10
      • 2022-01-15
      • 1970-01-01
      • 1970-01-01
      • 2011-05-15
      • 1970-01-01
      相关资源
      最近更新 更多