Optical Character Recognition 2.0 (OCR 2.0)

We are engineering students at the school of Telecom Saint-Etienne in France, we are specialized in information technologies. For a school project we chose to work on computer vision and especially on the OCR.
Please find enclosed our script files much comment in English.
The main improvement we have made is machine learning characters.
For the segmentation of characters we stop the method of labeling to select the same method used for segmentation lines.
Finally we tried a method of recognizing spaces, but the results are not very conclusive. However, I strongly feel that we are not far from successful.
We would be very happy to receive your feedback on our changes and even your help to find a method of recognition of functional spaces.
Best regards

PS:
First run create_templates_perso2.m and brows the picture Trebuchet_MS.png

After that you can run OCR_perso2.m and try to OCR a picture written with the same police as the templates (Trebuchet MS)