There is a problem of captcha recognition from a certain resource.
Captcha, I think, is simple in terms of recognition, because there are only one numbers in it, which are not distorted, but can be slightly rotated at an angle.
Original grayscale image.
The problem is that it is not clear how to pre-process the image before recognition.
For example, how to bring an image to a binary form (black background, white characters or vice versa)?
I use OpenCV

