Trying to get the best result with imagemagic and tesseract OCR, image recognition
Posted: 2017-07-04T19:52:59-07:00
Hello I'm trying to use OCR tesseract to recognize some letters in a image.
I did a convert using imagemagick and image seems to be good but its not enough to recognize
The original images:
The command used with imagemagick to convert(with a lot of thanks to @fmw42)
The result images:
The OCR tesseract command:
Output/result:
Text: AUGU -> AUOU
Tesseract Open Source OCR Engine v4.00.00alpha with Leptonica Page 1
Text: VEGU -> VOR-OU
Tesseract Open Source OCR Engine v4.00.00alpha with Leptonica Page 1
Text: EGUV -> E6UV
Tesseract Open Source OCR Engine v4.00.00alpha with Leptonica Page 1
Text: USEA -> USSOEA
May I can use some filter to get better results? what do you think?
I did a convert using imagemagick and image seems to be good but its not enough to recognize
The original images:
The command used with imagemagick to convert(with a lot of thanks to @fmw42)
Code: Select all
convert input.jpg -fuzz 50% -fill black -opaque black -bordercolor white -border 2 -fill black -draw "color 0,0 floodfill" -alpha off -negate -units pixelsperinch -density 72 output.jpg
The OCR tesseract command:
Code: Select all
$ tesseract output.jpg out -psm 7
Text: AUGU -> AUOU
Tesseract Open Source OCR Engine v4.00.00alpha with Leptonica Page 1
Text: VEGU -> VOR-OU
Tesseract Open Source OCR Engine v4.00.00alpha with Leptonica Page 1
Text: EGUV -> E6UV
Tesseract Open Source OCR Engine v4.00.00alpha with Leptonica Page 1
Text: USEA -> USSOEA
May I can use some filter to get better results? what do you think?