Bad quality in output (Windows fonts fail)

68 views
Skip to first unread message

Adrian Pop

unread,
Oct 25, 2017, 4:37:47 AM10/25/17
to tesseract-ocr

I've tried using the ocr to get the texts from these kind of images (even tried rescaling and the results were not better). I uploaded two examples.
The code I ran is:
tesseract FILE_NAME OUTPUT -l hrv --oem 3 --psm 6
The language is Croatian (so hrv)


For test6.png the result is:
KELEMINDVIĆ STJEPAN
Keleminovići 2
10363 Adamovec
The 'O' was made into a 'D'

For test8.png the result is:
012 MALKS, BISTRO. VL. BEDNARŠEK KREŠIMIR
Antuna Nemčića 3
10430 E:;amubnr
'Samobor' was turned into 'E:;amubnr'

For test10.png it's a mess:
ou. PIZZERIANL. BLECIC mmm

Any ideas how to tweak these more, or why it failed this bad?

test6.png
test8.png
test10.png

Dan9er

unread,
Oct 29, 2017, 10:48:42 AM10/29/17
to tesseract-ocr
  1. What version are you using?? (tesseract -v) Tess 3 and Tess 4 are VASTLY different. ALWAYS include this information!
  2. The text is too small, only a few pixels. Tess was trained for photos of printed text. It also looks like you upscaled the images, which confuses Tess even more.
  3. The text is antialiased. Before Tess processes an image, it uses Leptonica to binarize (convert to black and white with no shades of gray) the image so it can handle it. That means those "in-between" pixels in the image are going to turn to either black or white. Try running tesseract test.png out -l hrv --oem 3 --psm 6 -c tessedit_write_images=1 then attach the file named "tessinput.tif".
Reply all
Reply to author
Forward
0 new messages