Tesseract on single digit detection

102 views
Skip to first unread message

Fernando Benayas de los Santos

unread,
Nov 27, 2023, 3:43:00 AM11/27/23
to tesseract-ocr
Hi guys/gals!
Long story short: I'm trying to use tesseract to extract a single digit from a small image (containing a single digit) but I can't get over ~50% accuracy.

I have attached some examples of images. It should be pretty easy to extract the digit.

So far, the best approach consists in using --psm 13 and zoom a bit to get the frame out. Tried to change the image to black/white, but it didn't solve much :(

Any ideas? (I'm playing around with obscure -c options but they don't seem to have any effect)
pic4_cropped.png
pic1_cropped.png
pic6_cropped.png
pic5_cropped.png
pic2_cropped.png
pic11_cropped.png
pic3_cropped.png
pic8_cropped.png
pic10_cropped.png
pic9_cropped.png
pic7_cropped.png

Zdenko Podobny

unread,
Nov 27, 2023, 2:05:39 PM11/27/23
to tesser...@googlegroups.com
Crop images properly (without borders) and follow suggestions in docs:

>tesseract pic2_cropped_postprocessed.png - --psm 10
5
>tesseract pic4_cropped_postprocessed.png - --psm 10
7


Zdenko


po 27. 11. 2023 o 9:42 Fernando Benayas de los Santos <ferben...@gmail.com> napísal(a):
--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/5784d031-b282-4a99-b5e0-3b313a121488n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages