I want to compare two images. On both images you can see a digit. For example: (img1: "5" img2: "5") img1 is a pure black digit. But img2 could be in various colors. The background is white. It doesn't matter what color is on img2, if there is a "5", it has to be matched.
How do I compare these images? It has to be a fast method.
Any clues?