Tightly cropped numbers are unreadable by tesseract

60 views
Skip to first unread message

Brandon Martin

unread,
Oct 18, 2022, 2:00:52 PM10/18/22
to tesseract-ocr
I am looking for some help with suggestions on getting tesseract to read some tightly cropped numbers. Numbers range from 50-99. 

I've tried suggestions from the tesseract improve image and various different sizes, backgrounds, borders,  contrast etc. but I am unable to get it to read the numbers consistently. 

I've inverted the colours and tried using white borders to give a background. I tried duplicating the image so it has more to read. 

Really at a loss as to why it does not like reading these numbers when they look very clear and readable.

Does anyone with more experience have any suggestions or tricks I might be able to use to have these numbers be recognized?

ovr_932235240.pngovr_582313083.png

Zdenko Podobny

unread,
Oct 19, 2022, 1:40:42 AM10/19/22
to tesser...@googlegroups.com
> tesseract 84.png - --psm 7
84

> tesseract --version
tesseract 5.2.0-53-g80de
 leptonica-1.83.0 (Oct  8 2022, 14:19:38) [MSC v.1929 LIB Release x64]
  libgif 5.2.1 : libjpeg 6b (libjpeg-turbo 2.0.91) : libpng 1.6.37 : libtiff 4.4.0 : zlib 1.2.12 : libwebp 1.2.2 : libopenjp2 2.5.0
 Found AVX2
 Found AVX
 Found FMA
 Found SSE4.1
 Found OpenMP 2019
 Found libarchive 3.5.1 zlib/1.2.11 liblzma/5.2.4 bz2lib/1.0.6 libzstd/1.4.9
 Found libcurl/7.75.0 zlib/1.2.12 libssh2/1.10.1_DEV

Zdenko


ut 18. 10. 2022 o 20:00 Brandon Martin <brandon...@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/39cf6a54-0afb-45e4-940b-c85ca9a33209n%40googlegroups.com.

Brandon Martin

unread,
Oct 19, 2022, 12:12:49 PM10/19/22
to tesseract-ocr
Thank you for taking the time to reply. This probably seems simple but I am very new and was not familiar with the usage of psm so this led me to do a bit of research and resulted in a working solution.
Thanks!
Reply all
Reply to author
Forward
0 new messages