Help recognizing text from image

202 views
Skip to first unread message

Will Fetherolf

unread,
Feb 23, 2024, 12:49:21 AM2/23/24
to tesseract-ocr
All,

I need some help extracting the text from this image.  I'm using the command line version of Tesseract from UBMannheim.  I think it's 5.2 installed.  I've tried every PSM, and nothing seems to pull it out.  If I crop off the minus sign, it works perfectly.

Any tips at all would be appreciated.

TIA!
Will
image.20240220221312.75.bmp

René JM Clais

unread,
Feb 23, 2024, 6:04:27 AM2/23/24
to tesser...@googlegroups.com
I transform your image as a real Black and white image and it works well.
 -l eng    --psm 6 '

--
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/58b76c0b-2d6f-4574-a9e8-24d1a7dcc3d9n%40googlegroups.com.
image.20240220221312.75.jpg_ORI_BW_Sp_In_.jpg

Will Fetherolf

unread,
Feb 23, 2024, 4:56:38 PM2/23/24
to tesseract-ocr
Do you know what threshold was used to convert the color to black on white?
I'm doing these operations through a home-grown automated test system, and I can convert the image to black and white on the fly.

René JM Clais

unread,
Feb 24, 2024, 1:00:35 PM2/24/24
to tesser...@googlegroups.com
I use 3 filtering :   convert to gray scales - inverted image and last one   cv2.threshold(self.img1,127,255, cv2.THRESH_BINARY)
Does it help ? I can send you the python cv2 code

Will Fetherolf

unread,
Feb 26, 2024, 11:56:13 AM2/26/24
to tesseract-ocr
That helps a lot.  Sure, please send me the code.

René JM Clais

unread,
Feb 27, 2024, 2:04:46 PM2/27/24
to tesser...@googlegroups.com
The code ! I hope it will help.

img2bw.py
Reply all
Reply to author
Forward
0 new messages