Digit recognition error in Tesseract - android

I was hoping someone would tell me exactly why my Tesseract has problems recognizing some images with numbers, and if there is anything I can do about it. Everything works according to the test, and since these are just the numbers that I need, I thought I could handle the English pattern until I had to start with a 7-segment display.

Although I have a lot of problems with the added images, I would like to know if I should start working on my own recognition algorithms, or if I could make my own datasets for Tesseract, and then it works, does anyone know where the limitation is lies with Tesseract?

everyone tried: tried to install psm on one_line, one_word, one_char (and cut the picture). With one_line and one_word, no significant changes have occurred. with one_char, he recognized a little better, but sometimes because of the long distance, he attached an additional number to it, which then screwed it if you look at the attached image zero.jpg and then it turned out 04. I also tried to do binarization myself, this led to weaker recognition and was very resource intensive. I tried to invert the images, it does not matter for tesseract.

I attached the photographs that I need, in particular, for processing.

Image Explanation:

decodethisimage_seven - This is an image that tesseract does not cause difficulties, although it was done in words for the convenience of creating an application around the working image.

decodethisimage_eight is the image of real life corresponding to the image_seven. But he cannot recognize it.

decodethisimage_four2 - this is another image that I would like to recognize it, and yes, I know that it cannot be hidden, and I made unskrew (I think that the scraper is the term here = "edit") when it is being tested.

+8
android ocr tesseract
source share
3 answers

I know some options that may help you:

  • Add extra space between the border of the image and the text. Tesseract will work terribly if the text in the image is located on the edge.
  • Duplicate your image. For example, if you do OCR on the word "foobar", clone the image and send "foobar foobar foobar foobar foobar" to tesseract, the results will be better.
  • Google for font training and image binarization for tesseract.

Keep in mind that the built-in camera on mobile devices mainly produces low quality images (blurry, noisy, distorted, etc.). OCR itself is a process of compiling resources, and if you add decent image preprocessing to this, low-end and mid-sized mobile devices (which will probably have android) may run into unexpectedly poor performance or even lack of resources. This is fine for free / training projects, but if you are planning a commercial application, consider using the best SDK.

Have a look at this question for details: OCR for android

+2
source share

Tesseract does not perform segmentation for you. Tesseract will create an image threshold before the actual tesseract algo. After the threshold, there may be some edges, artifacts that remain on the image.

Try manually changing the images to black and white and see what tesseract returns as a result.

Try to set (automatically) your images and see what tesseract returns as output. The output of the threshold value may be too bad, resulting in tesseract giving a bad output.

Your 4th image is likely to fail due to the threshold (you have 3 colors: black background, grayish background and white letters), and the threshold may be between (black background, grayish background).

Typically, Tesseract wants to get black and white images. To improve the results, preliminary processing of your images may be required.

For your first image (with the result "04"), try to see the result of the window (char + coordinates of the field containing the recognized char). "0" may be a small artifact - like 4 by 4 pixels pixels.

+2
source share

You can give javaocr a try ( http://sourceforge.net/projects/javaocr/ , yes, I'm a developer)

Therre is not an official release, although you have to look for sources (good news: there is a working android, including a probe, a standalone application for trainers and recognizers)

If you have only one font, you can get good results (I got to recognition level 99.96 on the numbers of the same font)

PS: it is pure java and uses invariant moments to perform the comparison (therefore, there are no problems with scaling and rotation). There is also quite effective binarization.

See in action:

https://play.google.com/store/apps/details?id=de.pribluda.android.ocrcall&feature=search_result#?t=W251bGwsMSwxLDEsImRlLnByaWJsdWRhLmFuZHJvaWQub2NyY2FsbCJdJ

+1
source share

All Articles