View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

4.8 | 12 ratings Rate this file 114 Downloads (last 30 days) File Size: 221 KB File ID: #24624 Version: 1.5




02 Jul 2009 (Updated )


| Watch this File

File Information

The m-files inside this zip file extracts features of single characters of english language based on their geometric properties from the input image. Two approaches are explained for extracting feature vectors. The final feature vector generated for my purpose had more 120 elements. The features are based on the basic geometric shapes that comprises a single character. It calculates how many basic line segments are there in the given character. Basic line segments like horizontal, vertical and diagonal are what looked for. Their length and area normalized to the entire image are used as features. The number of holes in a image is another feature. SImilar properties are used for feature extraction.

The algorithm used for this work is written and uploaded at

A set of sample images I used for feature extraction has been given here


This file inspired Music Note Recogination and Hand Drawn Sample Images Of English Characters.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (28)
30 Dec 2016 mona

mona (view profile)

which is main file an zip folder? which .m file i should run first ?
does this work for all characters capital and small ?
please help

10 Sep 2016 sagar khandare

hi dinesh,your code is very good i was already developed feature extraction based on character geometry with 10*14 vector but what is your vector size

08 Sep 2016 Duc Hoang

09 Aug 2016 SATISH KUMAR

thanks for code..

Comment only
21 Apr 2016 adeel yousaf

hello dinesh this code is working nicely. but how to used these features to train neural network please give me your valuable me on


How to call images into matlab code, I'm not able to to do this, please any one help here...

Comment only
17 Apr 2015 uma bhati

i m uma n i m doing my project on devnagiri ocr system using svm classifier.I don’t know how to extract the features from the character in matlab.plz tell me about atlest five features for devnagiri character recognition to i can get higher accuracy n efficiency.
nd if possible den tell me about character dataset information from where i could get.

Comment only
12 Mar 2015 sapna kamble


27 Nov 2014 Anis Mahmon

i’m Nur Anis study on a research about the classification of satellite image(Landsat 8 Image) using Artificial Neural Network.
I don’t know how to extract the features from the images in matlab to I continue train and classify the image into five classes.
Thank you.

Comment only
14 Sep 2014 Ebenezer Olaniyi

Good day,please im working on a project and i found your explanation from the pdf help but please can you send to my email at the complete code of the character recognition.
Looking forward to hearing from you.
Thank you.

Comment only
25 Jun 2013 Reza

Reza (view profile)

It helped me a lot
Thank you very much...

21 Jan 2013 msp

msp (view profile)

which is main file an zip folder? which .m file i should run first ? please help

Comment only
15 Sep 2012 Binh Physel

31 May 2012 mahsa

mahsa (view profile)

hi, I have a project about pornographic image filtering with decision tree... I don't know how to extract the features from the images, I just have a code which can calculate the skin percent of the skin via its color... could you help me, Contact me on

23 Apr 2012 samar

samar (view profile)

21 Apr 2012 alkesh mungra

Hi dinesh
can u send me that code ?

Comment only
14 Apr 2012 sneha

sneha (view profile)

hi dinesh can u send me the recognition code??plz.....its urgent.........

Comment only
03 Apr 2012 mmm ssss

Hi Dinesh

i sent you an email @gmail i have a B/w images but i dont know if this algorithm is resitricted on the character recognition , it is very helpful work ... i tried your code on my images and i obtained feature vectors ... now is there any code that enable me to test these vectores if they work perfectly and recognized person or not ???

help me pleaseeeeee.

Comment only
28 Mar 2012 Anita Jindal

This code is very helpful...but it does nt run for 4*4 zoning.plz provide me help for running it for different zones

Waining for soon reply

Comment only
28 Feb 2012 Mohammad Yacob

how do i use the ocr created by dinesh

Comment only

hello dinesh this code is working nicely. but how to used these features to train neural network please give me your valuable me on

22 Apr 2011 li ping


Comment only
17 Feb 2011 Abdul Haleem Butt

i need some guidness
i want to extarct feactures for character recognation but finally i need values in the form of integer values for classfi´cation because of the tool requirment which i am going to use.....
if any one have suggesion please guide me......

Comment only
18 Apr 2010 harsh modi

Thanks Dinesh
can you send the code for using this features for reconition of the characters from a form or handwritten document .or can u please provide any help for how to recognize characters. its really urgent coz we hv to submit our project within three weeks
my email id is

Comment only
17 Mar 2010 Kalyani Bhosale

Thanks for useful posts.
but can u tell me, after extracting the features when u train the neural n/w how will u set ur 'P' n 'T' parameters? whether the o/p after training is in tabular form or it displays the recognised character?

Comment only
12 Mar 2010 Ann

Ann (view profile)

07 Dec 2009 charu

charu (view profile)

14 Nov 2009 khader Mohammad

Thanks Dinesh
can you send the recognetion part where you use these features to recognize the character.

does this work for all characters capital and small ?
does it work for numbers ?
what is the procedure of runing the code ?

Comment only
03 Aug 2009 1.1

README file in pdf format has been included

29 Nov 2009 1.2

Added a test run file

25 Dec 2009 1.4

Updated about the set of sample images

20 Feb 2012 1.5

Updated documentation

Contact us