I am currently working on some kind of optical character recognition (OCR) system. I already wrote a script to extract each character from the text and clear (most) of the irregularities from it. I also know the font. Images that I have now, for example:
M ( http://i.imgur.com/oRfSOsJ.png (font) and http://i.imgur.com/UDEJZyV.png (scanned))
K ( http://i.imgur.com/PluXtDz.png (font) and http://i.imgur.com/TRuDXSx.png (scanned))
C ( http://i.imgur.com/wggsX6M.png (font) and http://i.imgur.com/GF9vClh.png (scanned))
For all these images, I already have a kind of binary matrix (1 for black, 0 for white). Now I wondered if there was any mathematical projection formula to see the similarities between these matrices. I do not want to rely on the library because it was not my task.
I know this question may seem a bit vague and there are similar questions, but I'm looking for a method, not for a package, and so far I have not been able to find any comments regarding the method. The reason this question is vague is because I really have nothing to start. What I want to do is actually described here on Wikipedia:
Matrix matching involves comparing an image with a stored glyph on a pixel basis; it is also known as pattern matching or pattern recognition. [9] This depends on the correct selection of the input glyph from the rest of the image and the preservation of the saved glyph in a similar font and at the same scale. This method works best with typewritten text and does not work well when new fonts are found. This is a method based on early use of optical recognition based on photocells, not directly. ( http://en.wikipedia.org/wiki/Optical_character_recognition#Character_recognition )
If anyone could help me with this, I would really appreciate it.
source share