I require a function that will be written in (or convertible to) C. The function needs to be able to segment all the letters in images similar to the ones attached. These letters will most likely be touching. You can use OpenCV or MATLAB/Simulink to perform this segmentation (or anything else that is portable to C).