简体   繁体   English

Tesseract OCR 无法识别数字 7

[英]Tesseract OCR fails to recognize number 7

I'm trying to analyze a png image containing two digits.我正在尝试分析包含两位数字的 png 图像。 Tesseract seems to have an issue detecting the number 7 (seven) in this image. Tesseract 似乎在检测此图像中的数字 7(七)时遇到问题。 It recognizes it as a 1 (one).它将其识别为 1(一)。

my config is:我的配置是:

config='--oem 1 --psm 7 tessedit_char_whitelist=0123456789'

tesseract --version returns the following tesseract --version 返回以下内容

tesseract 4.0.0
leptonica-1.76.0
libgif 5.1.4 : libjpeg 6b (libjpeg-turbo 1.5.2) : libpng 1.6.36 : libtiff 4.1.0 : zlib 1.2.11 : libwebp 0.6.1 : libopenjp2 2.3.0

I've played with the oem and psm values with no change in result.我已经使用了 oem 和 psm 值,结果没有变化。 Any help would be much appreciated.任何帮助将非常感激。

tesseract 无法识别数字 7(七)位

The characters in the image are too big, I guess tesseract was not trained for that.图像中的字符太大了,我猜 tesseract 没有为此受过训练。

Resizing the image works fine调整图像大小工作正常

tesseract cnLRQ.png stdout --oem 1 --psm 7 --dpi 70 digits
18
convert -resize 10% cnLRQ.png cnLRQ-small.png
tesseract cnLRQ-small.png stdout --oem 1 --psm 7 --dpi 70 digits
78

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM