MATLAB character segmentation