File Exchange

image thumbnail

OPTICAL CHARACTER RECOGNITION(lower case and space included)

version (52 KB) by Ankit Saroch
OCR to recognize upper/lowercase letters, numerals and spaces from a digital image.


Updated 05 May 2011

View License

this project aims at recognizing

characters from a text image.

Both the uppercase and lowercase letter with numerals are recognized.

And spaces are also recognized within different words.

The process of OCR involves several steps including segmentation, feature extraction, and classification.
OCR.m is the principal file

Cite As

Ankit Saroch (2021). OPTICAL CHARACTER RECOGNITION(lower case and space included) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (23)

Manish Kumar

can ypu please give your mail id if you feel it ok

divya a

if recognise some other images using this code?please help me

Sachin Sinkar

Babatunde Lawal

Thank you, a great work indeed.

abdelrahman yosry

Duc Hoang

amruth annegowda

Kevin Adamek

What font does this work for?

Ankit Saroch

@Venkat, Sai and Paul, I'm not in touch with MATLAB for a while now, as far as i remember I've created the fonts in MS Paint. Just make sure the resulting image is not pixelated.

please tell me how bmp files for different fonts are created

How to make .bmp files for different styles of fonts. Can any one help me on this.
my mail id is:
i tried a lot with photoshop and paint but its not working.

Paul Chambers

Nice work. Could you tell me what you used to create the letters for lower case? I'm interested in expanding this to include Russian text.


sir your idea is very good,but please will you help me to get the code for detecting space in text.and will it be possible to detect the type of statement extracted plz help me out .i am beginner in MATLAB




it is showing an eroor at line 70
letter = read_letter(img_r,num_letras);
??? Undefined function or method 'read_letter' for input arguments of type 'double'.

Error in ==> OCR at 70
letter = read_letter(img_r,num_letras);
do correct it please

harshwardhan deshmukh

very well done!
its really helpfull for me as a beginner.



Firstly this program is very very useful and good effort !!
I have a question :) what if we would recognize arabic letters instead of english ? like أ و ب ت ف ع ن م ك ة

Ankit Saroch

Nopes, I haven't referred to any IEEE paper for this...

Sam Terry

Really useful.. could you please tell me if you have referred to any IEEE paper or so?

Chandra Shekhar

Great work.

kasturi basu


MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: Optical Character Recognition (OCR)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!