The Hough transform for lines finds the best linear equations. You will need to do additional processing to find only line segments. If the thickness of the characters is several pixels, then you can reduce the thickness to one pixel to find lines effectively. There are methods for this, but also various algorithmic traps.
Once you have the line segments, you still have to write an algorithm to identify the characters based on the relative position and angle of the line segments. This is harder than it sounds.
Normalized cross-correlation (pattern matching) can work if you are sure that the image will always have a certain rotation, the characters will always be the same size, etc. But even for scanning, you will see some rotation and some differences in contrast.
Anything aside, probably in the long run, is likely to use a commercial OCR package or a fairly good open source project. OCR is difficult to implement if you are not familiar with image processing.
source share