Answer the question
In order to leave comments, you need to log in
How to write captcha recognition in python?
I would like to make captcha recognition preferably in python (if there are other ways, write).
Captcha example
I tried to do it on pytesseract and pyautoguim, it didn't work, maybe there are other ways, or you can do it on those,
there are also trimmed numbers from the captcha. Thanks in advance
Answer the question
In order to leave comments, you need to log in
1. Cut out each number separately (containing a rectangle).
2. Normalize - convert to grayscale (it's easier to compare), bring to some fixed size.
3. Compare each digit with reference images of digits that have undergone the same normalization. As a metric, take at least the distance L1 - i.e. you subtract the values pixel by pixel, take the modulus of the differences (they can be less than 0), and sum them up.
4. The standard that gave the smallest value of the metric is the most similar.
For a primitive captcha, which does not contain extraneous elements and distortions, it should work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question