I'm trying to extract letters from a game board for a project. Currently, I can detect the game board, segment it into the individual squares and extract images of every square.
The input I'm getting is like this (these are individual letters):
At first, I was counting the number of black pixels per image and using that as a way of identifying the different letters, which worked somewhat well for controlled input images. The problem I have, though, is that I can't make this work for images that differ slightly from these.
I have around 5 samples of each letter to work with for training, which should be good enough.
Does anybody know what would be a good algorithm to use for this?
My ideas were (after normalizing the image):
- Counting the difference between an image and every letter image to see which one produces the least amount of error. This won't work for large datasets, though.
- Detecting corners and comparing relative locations.
- ???
Any help would be appreciated!