C
C
citywey2021-11-16 08:28:38
Python
citywey, 2021-11-16 08:28:38

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 61933f4c1852b896854223.png
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

spoiler
619340ad4b315088151379.png
619340b9bab98777207932.png
619340c14441a171725081.png
619340e8eb0e4122165915.png
619340cbc0c1d933447499.png
619340f233be8389790766.png
619340f870385116420071.png
619340fec8313532304468.png
6193410461a90284306413.png
61934109839a7422435093.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vindicar, 2021-11-16
@Vindicar

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.

N
Nikolay Savelyev, 2021-11-16
@AgentSmith

1. segmentation.
2. pattern search among segmented images

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question