Character Recognition — Part 1

Manikanta Nallagatla
1 min readAug 17, 2018

--

This is a basic algorithm to recognise hand written text from a given image.

Algorithm 1:

Matlab OCR

Matlab provides ocr(image) api which takes image as input and returns text as a string.

  • Major disadvantage of the ocr api is it fails fatally to recognise hand written text. I works fine with images that contain printed text in it.

So there is a need to create an algorithm for handwritten text recognition.

Algorithm 2:

Template based matching

Creating Dataset:

We can create a dataset of english capital characters with respective labels. Here I have chosen capital letters as each letter of capital letter is fully connected. Once we have a dataset of each character we should resize each character image into 50x50 image and convert into binary image using adaptive threshold algorithm.

Testing on a random image:

When we have a random image with handwritten text, first step we can do is extracting each character sub image using connected component algorithm. Then we can resize each character image into 50x50 image. Using correlation between this character image with the dataset that we have already created we can recognise each character as the most correlated character.

--

--