Answer the question
In order to leave comments, you need to log in
What is the fastest way to recognize numbers in a picture?
There are green numbers on a white background:
The numbers do not change the angle of inclination, do not change color, etc.
Recognition speed is very important. Perhaps tell me the libraries, or even the code in pure python.
Answer the question
In order to leave comments, you need to log in
If the font does not change the slope, color and font itself, then you can simply cut the picture into n-parts and calculate the hash of each part and compare with your library. Right on the picture you can see that not only is the font simple, but also the numbers have the same width. So cut the picture into equal parts, the width of which is equal to the width of one digit.
import os
os.chdir('D:/python27/lib/site-packages/pytesser')
try:
import Image
except ImportError:
from PIL import Image
from pytesser import *
im = Image.open('q.gif')
im = im.convert('L')
text = image_to_string(im)
print text
the fastest of course is not to do character recognition, but to match a pattern of several pixels of a digit. especially since the numbers are always in the same position.
I think it will be enough to compare 8-16 characteristic points for each digit.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question