Clasify varios types of letters

Hello. Does Anyone know how to solve this computer vision problem about clasify various parts that have a letter? (there are more parts with other letters) The software that i use is MATLAB/Python (opencv)

this sounds like an OCR task.


and I think I saw that picture before, on Stack Overflow.

please follow Stack Overflow guidelines ([how-to-ask]): what did you research, what did the research yield? what approaches did you consider? what did you try? how did you try that? prefer to show source code instead of describing it.