V
V
Vit2014-07-10 19:39:02
PHP
Vit, 2014-07-10 19:39:02

Where can I find a library for recognizing numbers in an image?

Colleagues, does anyone know a ready-made lib for recognizing numbers in an image? Images are two-color (background in one color, numbers in another). jpg and png format. The numbers are not distorted, the same size.
Interested in php under Linux, i.e. either an implementation in php, or a module for php. In principle, implementations in other languages ​​are also suitable, if they can be kicked from a php script with an exec.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vit, 2014-09-29
@fornit1917

It didn't work out how to properly train phpOCR. I found a more powerful analogue - the tesseract-ocr utility. Debian has it in standard turnips.

P
Push Pull, 2014-07-10
@deadbyelpy

phpOCR

V
Vitaly Zheltyakov, 2014-07-10
@VitaZheltyakov

If the numbers are not distorted, then it is possible without a library. Simple procedure:
- Making a "threshold" or high contrast;
- Select individual characters (according to empty rows and columns of pixels);
- We divide the resulting symbols into 9 parts, as in "tic-tac-toe";
- We count the number of black pixels in each part.
- Well, then we just compare all the parts with each other - the ratio for each number will be different.
As easy as pie...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question