I have a folder of 75 black and white images that all contain a number either 1-75. What I'm looking to do is when one of those numbers shows up on my screen, I want to print what number it is within a fraction of a second. I thought that each number may have a different amount of black pixels in the image so I tried linking the number to the specific amout of pixels it has, however for some reason the amount of black pixels changes slightly every time the number shows up on the screen again. If this worked it would be perfect but I just don't know why its changing each time. Do you know of any other way I could identify the number on the screen in less than half a second? Thank you!
Thankfully I think I figured it out. When I origionally tried using OCR it wouldn't find the text within the image. I tried making the white space around the image larger so the text isn't too close to the edges (too zoomed in). When I made the background of the text larger by taking a larger screenshot of the screen, it was able to find the number in the text in the image in about 0.3 seconds every time. I think this could be perfect for my project. Always good to bounce ideas off of people to push me in the right direction. Thanks Tim Roberts for suggesting OCR again!
Python Find Number On Screen Instantly