Strategy for Sparse Text

113 views
Skip to first unread message

CK

unread,
Apr 16, 2018, 3:33:12 AM4/16/18
to tesseract-ocr
Hello,

Using tesseract I am trying to output hexadecimal numbers (10 characters long) located on video screenshots.  My results have very low positives.  

The screenshots (1280x720 pixels) may or may not have text other than the hexadecimal number.  Really, it doesn't matter if that text is output or not.  The hexadecimal number can be located anywhere in the image.

Targeted text is always:

Hexadecimal characters (0-9, uppercase A-F)
10 characters long
Same font (open sans bold)
Same size (x height 11 pixels - but always uppercase)

This is what I've tried:

tesseract list.txt out -c tessedit_char_whitelist=0123456789ABCDEF


I have also tried disabling the dictionaries.

Is there anyway training could help me locate that text more reliably?  Basically force tesseract to only look for one size and one font?  

Thanks





CK

unread,
Apr 18, 2018, 1:56:37 PM4/18/18
to tesseract-ocr
I trained a single font using http://ocr7.com/trainFont.  I provided the ttf file.  The accuracy is about 10% better but the speed is considerably faster. I believe the speed difference is due to the fact that the .traineddata file (called by -l) is only a fraction of the eng.traineddata file.

PS I used the ocr7 out of desperation.  To me, the training information pages are hard to follow especially considering I was only trying to train for 16 characters for one font.  Even once I had the ocr7 site outputted .traineddata file I felt like I found a needle in a haystack when I noticed all you do is rename the file xxx.traineddata and call that file by -l xxx.  
Reply all
Reply to author
Forward
0 new messages