How to use tesseract ocr php redirect

Dewarp and filter an image for OCR - Android, OCR, Tesserakt

I've done a lot of research and haven't found a suitable solution for it. I'm programming an Android OCR app. I have already successfully loaded Tesseract and Leptonica and I successfully completed images and also process them to text using OCR. However, the recognition accuracy is not that good.

After a lot of fine-tuning, we found that it wasn't us filtering, cleaning, and / or de-warping the image to aid Tesseract with OCR processing. So I searched the internet for a library or code that worked for me and used it on Android to no avail.

Does anyone know of a library or can provide some code to help me with this? All I want is to take a bitmap, convert it to black and white, de-skew and / or do some filtering and give it to Tesseract to convert it to text using OCR.

Reply:

1 for the answer № 1

ImageMagick can do that. Command line:

: helps to process colored input.
: Play with the percentage - but basically only black + white is converted.
: Lean angles

However, I'm not sure how easy or difficult it is to build ImageMagick for the Android platform. It's available for Linux, Mac OS X, Windows, Solaris, HP-UX, ... so: it's multi-platform by design anyway.


1 for the answer № 2

I used the following approach to convert my image to black and white and this has helped me improve my accuracy a lot.

I hope it helps.