Code covered by the BSD License  

Highlights from
Character Recognition Example (III):Training a Simple NN for classification

4.34483

4.3 | 29 ratings Rate this file 379 Downloads (last 30 days) File Size: 121.61 KB File ID: #8676
image thumbnail

Character Recognition Example (III):Training a Simple NN for classification

by Tan Chin Luh

 

07 Oct 2005 (Updated 07 Jul 2008)

This demo shows some examples for image pre-processing before the recognition stage.

| Watch this File

File Information
Description

This demo shows the recognition stage for the character recognition. This example come with a GUI with a trained network for handwritting recognition. The step-by-step explanation can be found at:

http://basic-eng.blogspot.com/

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Character Recognition Example (I&II): Pre-processing of Image
This submission has inspired the following:
Character Recognition Example (IV):Training a Simple NN for classification, Character Recognition Example (V):Training a Simple NN for classification, MATLAB GUI Makeover

Required Products Image Processing Toolbox
Neural Network Toolbox
MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (43)
07 Feb 2006 kailup Tan

It works in MATLAB 7 but some of the readers facing the same problem with you: try to change line 26 --> Ic(:,4) = 1:50; to Ic(:,4) = [1:50]'; in edu_imgpreprocess.m (think ML 7 smart enough to change 1:50 to a column vector but ML 6 still not able to perform it automatically)

13 Feb 2006 Chibila Ulaya

Great help in my research. Built a marking machine using a webcam instead of a scanner for image acquisition.....works fantastically due to the guidance in this code...

07 Mar 2006 Salim Alkathiri

this is the example that will make me understand the concept of handwirtten character recognition. Using nuralnetwor as methode for recognition training. I thank you all for your efforts.

13 Mar 2006 Satyajit Malugu

is the GUI executable on all machines or it needs any modifications?

22 Mar 2006 ari kabisat

great. help my research to detect pipe. thanks very much..muah

01 Jun 2006 Miguel de Juana

Hello, i have a problem, i want to know, which parameters take the program from the image to recognition of the number, is urgent, thanks.

10 Jun 2006 anand dwivedi  
17 Jul 2006 naresh v

i really acknowledge this effort
keep it up

01 Nov 2006 desture restret  
30 Jan 2007 anirudh r  
06 Mar 2007 Amninder Kaur  
01 Apr 2007 jineen mohammed

thanx alot, i have gained alot of useful things from this code
but a want to ask how can we aligment the image in order to know the (x,y)=(0,0)of it
thaaanx again

19 Apr 2007 Vikas Rajput

Dear Sir I have following problem when running charGUI in my matlab6.5
Unable to read MAT file C:\numeral recognition\charGUI.fig
plz help me what can i do
vikas

18 May 2007 vaishali shinde

it is realy excellent & very usefull to all

18 May 2007 nafisa gady  
16 Aug 2007 ihsan ihsan

Thanks for sharing. Have you any code about hyperspectral image analysis?
Regards

20 Sep 2007 nalan soylu

Please type the characters you see in the picture above

29 Sep 2007 vaishali shinde  
12 Oct 2007 Nors Harman

Very good example!

21 Oct 2007 fa ho

ok

06 Nov 2007 anju akalanka  
08 Nov 2007 salman syed

i ran chargui.m, loaded image, did select, pre process, feature extract & recognize, nothing happen in feature extract and recognize,
and this was written,
"
??? Reference to non-existent field 'charvec'.

Error in ==> charGUI>pbRecognize_Callback at 142
charvec = handles.charvec;

Error in ==> gui_mainfcn at 75
        feval(varargin{:});

Error in ==> charGUI at 42
    gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback."

what should i do, i dont know much about matlab.

24 Apr 2008 aradya tp

 Hope information given here will help much to know the concept of CR,,,,, thanks......

24 Apr 2008 z h

i ran chargui.m, loaded image, did select, pre_process, nothing happen in feature extract and recognize, and this was written,
 
??? There is no 'Colormap' property in the 'uipanel' class.
Error in ==> imshow at 115
    set(figHandle, 'Colormap', map);
Error in ==> charGUI>pbPreprocess_Callback at 117
imshow(bw);
Error in ==> gui_mainfcn at 75
        feval(varargin{:});
Error in ==> charGUI at 42
    gui_mainfcn(gui_State, varargin{:});
??? Error while evaluating uicontrol Callback.
 
when i did feature extract & recognize,the wrong is following:
 
??? Reference to non-existent field 'bw2'.
Error in ==> charGUI>pbExtract_Callback at 130
bw2 = handles.bw2;
Error in ==> gui_mainfcn at 75
        feval(varargin{:});
Error in ==> charGUI at 42
    gui_mainfcn(gui_State, varargin{:});
??? Error while evaluating uicontrol Callback.
 
 
 what should i do

24 Apr 2008 z h

my email is zhaohuihuang278@sohu.com

16 Nov 2008 kobe

how can I access the training data so I can change it for my own data?
cyber_kobe@hotmail.com if you know, cheers

04 Jan 2009 Kaso

i'd like to know where can i get the image processing toolbox which required for this program.my email address :yesterday322130@163.com
3ks a lot

13 Jan 2009 art

I have the same question as kobe above. How can i change the training data?

19 Jan 2009 erruva erruva

Greate work! Works fine for 1-9. But why is 0 recognized as 10? I can not understand the training data.

28 Jan 2009 Eugene

Hi
When I ran chargui, I could load the image and select region. But nothing happens when I press crop. Also when I press preprocess the following error occur
??? There is no 'Colormap' property in the 'uipanel' class.

Error in ==> <a href="error:C:\MATLAB7\toolbox\images\images\imshow.m,115,1">imshow at 115</a>
    set(figHandle, 'Colormap', map);

Error in ==> <a href="error:C:\MATLAB7\work\charGUI.m,117,1">charGUI>pbPreprocess_Callback at 117</a>
imshow(bw);

Error in ==> <a href="error:C:\MATLAB7\toolbox\matlab\uitools\gui_mainfcn.m,75,1">gui_mainfcn at 75</a>
        feval(varargin{:});

Error in ==> <a href="error:C:\MATLAB7\work\charGUI.m,42,1">charGUI at 42</a>
    gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback.

When I did feature extraction the following error occur
??? Reference to non-existent field 'bw2'.

Error in ==> <a href="error:C:\MATLAB7\work\charGUI.m,130,1">charGUI>pbExtract_Callback at 130</a>
bw2 = handles.bw2;

Error in ==> <a href="error:C:\MATLAB7\toolbox\matlab\uitools\gui_mainfcn.m,75,1">gui_mainfcn at 75</a>
        feval(varargin{:});

Error in ==> <a href="error:C:\MATLAB7\work\charGUI.m,42,1">charGUI at 42</a>
    gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback.

When I press recognize the following error occur
??? Reference to non-existent field 'charvec'.

Error in ==> <a href="error:C:\MATLAB7\work\charGUI.m,142,1">charGUI>pbRecognize_Callback at 142</a>
charvec = handles.charvec;

Error in ==> <a href="error:C:\MATLAB7\toolbox\matlab\uitools\gui_mainfcn.m,75,1">gui_mainfcn at 75</a>
        feval(varargin{:});

Error in ==> <a href="error:C:\MATLAB7\work\charGUI.m,42,1">charGUI at 42</a>
    gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback.

What should I do??

my email is angelflames84@hotmail.com

06 May 2009 salam fadi

please i don't know how i get these files and dowload it please tell me my email is zoufa1@hotmail.com

23 May 2009 humza

i ran chargui.m, loaded image, did select, pre process, feature extract & recognize, nothing happen in feature extract and recognize,
and this was written,
"
??? Reference to non-existent field 'charvec'.
 
Error in ==> charGUI>pbRecognize_Callback at 142
charvec = handles.charvec;
 
Error in ==> gui_mainfcn at 75
        feval(varargin{:});
 
Error in ==> charGUI at 42
    gui_mainfcn(gui_State, varargin{:});
 
??? Error while evaluating uicontrol Callback."
 
what should i do,

18 Mar 2010 Thabit

Hi, I think this the best guide to OCR I have seen so far, but I wonder if you would be able to give me a simple explanation on what to change if I needed to expand this to include A-Z?

t.1.hassan@herts.ac.uk

Thanks

21 May 2010 Examples Learn By

Thanks a lot
http://learnbyexamples.org/category/matlab

24 Jul 2010 Haider Raza

How to run CHARGUI....its a figure file..!!

31 Aug 2010 ALOK JHA

was of great help for my project...
pls tell me how do i include alphabets and special character in recognition.
aloknandujha@gmail.com

19 Oct 2010 Yawar Rehman

gr8

12 Apr 2011 stephanie borg  
30 Apr 2011 prathiba

great

11 Jul 2011 Waqas Soomro

hi. when i m loading image in chargui its ginen following errors. plz guide me in this problem.

Error in ==> gui_mainfcn at 96
        feval(varargin{:});

Error in ==> charGUI at 42
    gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback

19 Sep 2011 Mr Smart  
13 Nov 2011 Mert  
15 Jan 2012 shubhi

Error in ==> gui_mainfcn at 75
        feval(varargin{:});

Error in ==> charGUI at 42
    gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback.

??? Error using ==> fopen
Invalid filename.

Error in ==> imread at 226
    fid = fopen(filename, 'r');

Error in ==> charGUI>pbLoad_Callback at 83
S = imread([pathname,filename]);

Error in ==> gui_mainfcn at 75
        feval(varargin{:});

Error in ==> charGUI at 42
    gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback.

??? Attempt to reference field of non-structure array.

Error in ==> charGUI>pbSelect_Callback at 96
S = handles.S;

Error in ==> gui_mainfcn at 75
        feval(varargin{:});

Error in ==> charGUI at 42
    gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback.

??? Input argument "bw2" is undefined.

Error in ==> edu_imgresize at 5
bw_7050=imresize(bw2,[70,50]);

??? Error using ==> fopen
Invalid filename.

Error in ==> imread at 226
    fid = fopen(filename, 'r');

Please login to add a comment or rating.
Updates
07 Jul 2008

Due to the some changes in imcrop, it does not work in new version of MATLAB under GUI. The 2 new files, charGUI2.m and .fig update the by splitting the button to "Select" and " Crop using imrect to select, and imcrop to crop.

Tag Activity for this File
Tag Applied By Date/Time
application Tan Chin Luh 22 Oct 2008 08:02:19
neural netwrok Tan Chin Luh 22 Oct 2008 08:02:19
image processing Tan Chin Luh 22 Oct 2008 08:02:19
character recognition Tan Chin Luh 22 Oct 2008 08:02:19
image processing marwa saad 06 Nov 2008 14:03:37
neural netwrok bipin aswal 25 Apr 2009 16:06:16
application francisco 16 Jun 2009 11:34:18
neural netwrok Furtwangen Hochschule Guajardo 06 Nov 2009 08:17:43
neural netwrok Abdelfattah Ahmed 10 Jan 2010 09:18:56
character recognition herman 17 Mar 2010 03:56:26
application ashfaq nadim 11 Apr 2010 20:35:16
character recognition ashfaq nadim 11 Apr 2010 20:47:52
image processing viraj dhananjaya 18 Jun 2010 14:55:28
character recognition Todd Brintlinger 02 Nov 2010 13:58:40
neural netwrok Luu Trieu Phat 25 Nov 2010 11:16:18
application Vishal 26 Jul 2011 13:28:58
character recognition Mert 12 Dec 2011 10:33:18
application Markus Zimmermann 18 Jan 2012 11:24:03

Contact us at files@mathworks.com