Code covered by the BSD License  

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

4.32353

4.3 | 34 ratings Rate this file 289 Downloads (last 30 days) File Size: 122 KB File ID: #8676
image thumbnail

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

by

 

07 Oct 2005 (Updated )

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

Character Recognition Example (I&Ii): Pre Processing Of Image inspired this file.

This file inspired Character Recognition Example (V):Training A Simple Nn For Classification, Character Recognition Example (Iv):Training A Simple Nn For Classification, and Matlab Gui Makeover.

Required Products Image Processing Toolbox
Neural Network Toolbox
MATLAB release MATLAB 7.5 (R2007b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (55)
26 Jun 2014 Dabira

How can I open GUI

25 Apr 2014 Amit Kumar

thanks for matlab code...........:)

15 Apr 2014 Amit Kumar

??? Error using ==> charGUI2>pbRecognize_Callback at
189
'model' parameter must be a string.

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

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

??? Error while evaluating uicontrol Callback

??? Error using ==> charGUI2>pbRecognize_Callback at
189
'model' parameter must be a string.

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

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

??? Error while evaluating uicontrol Callback

??? Error using ==> charGUI2>pbRecognize_Callback at
189
'model' parameter must be a string.

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

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

??? Error while evaluating uicontrol Callback

??? Error using ==> charGUI2>pbRecognize_Callback at
189
'model' parameter must be a string.

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

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

??? Error while evaluating uicontrol Callback

??? Error using ==> charGUI2>pbRecognize_Callback at
189
'model' parameter must be a string.

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

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

??? Error while evaluating uicontrol Callback

??? Error using ==> charGUI2>pbRecognize_Callback at
189
'model' parameter must be a string.

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

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

??? Error while evaluating uicontrol Callback

??? Invalid or deleted object.

Error in ==> charGUI2>pbSelect_Callback at 101
handles.api.delete();

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

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

??? Error while evaluating uicontrol Callback
..

hey guy's plz help me out i am geting following when i try to run this code.......it urgent.....thank you

15 Apr 2014 Mohan K  
16 Sep 2013 Omar

Tks a lot, fully helped me.

11 Mar 2013 Sandeep

What is the use og data.mat file in this program, why that file is required from where are you getting the recognized value on the axis, how can i do it for english alphabet please help me as i am doing my final year project, send me the example code to my id sandeepec035@gmail.com

<a href=http://soundfrost.org/ >convert to mp3</a>

14 Feb 2013 Mark Anthony Muya

Thanks a lot for this example. It truly helps.

16 Jun 2012 sarika sen

For English and number recognition [(A to E) and (1 to 5)]

charvec = handles.charvec;
selected_net = get(handles.editNN,'string');
selected_net = evalin('base',selected_net);
result = sim(selected_net,charvec);
[val, num] = max(result);

if num>5
num = num -5;
charvec = ['A','B','C','D','E'];
% In this case, output is character, defined as a number from num
else
charvec = [1, 2, 3, 4, 5];
% Else, output is number, defined from num
end

oknum = charvec(1,num);
set(handles.editResult, 'string',oknum);

copywrite to me...

02 Mar 2012 sarika sen

this application works for numeric figures only, what about english or japanese alphabets?

29 Feb 2012 Ashok Kumar Pant  
28 Feb 2012 Abhyank Srinet

Hi could you please tell me the logic behind how the image cropping takes place....

14 Feb 2012 varsha

please explain the coding & calculations given in edu_imgpreprocess and edu_imgresize...

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');

13 Nov 2011 Mert  
19 Sep 2011 Mr Smart  
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

30 Apr 2011 prathiba

great

12 Apr 2011 stephanie borg  
19 Oct 2010 Yawar Rehman

gr8

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

24 Jul 2010 Haider Raza

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

21 May 2010 Examples Learn By

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

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

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,

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

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

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.

13 Jan 2009 art

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

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

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

24 Apr 2008 z h

my email is zhaohuihuang278@sohu.com

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 aradya tp

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

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.

06 Nov 2007 anju akalanka  
21 Oct 2007 fa ho

ok

12 Oct 2007 Nors Harman

Very good example!

29 Sep 2007 vaishali shinde  
20 Sep 2007 nalan soylu

Please type the characters you see in the picture above

16 Aug 2007 ihsan ihsan

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

18 May 2007 nafisa gady  
18 May 2007 vaishali shinde

it is realy excellent & very usefull to all

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

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

06 Mar 2007 Amninder Kaur  
30 Jan 2007 anirudh r  
01 Nov 2006 desture restret  
17 Jul 2006 naresh v

i really acknowledge this effort
keep it up

10 Jun 2006 anand dwivedi  
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.

22 Mar 2006 ari kabisat

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

13 Mar 2006 Satyajit Malugu

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

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 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 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)

Contact us