Need help on OCR binarization and segmentation of character

I am trying to 'train' my OCR software to recognize numbers in the Bengali language. I have the code set up to binarize and segment loaded samples of numbers. But when I try to use it to train the software, I get this error message:
Too many outputs requested. Most likely cause is missing [] around
left hand side that has a comma separated list expansion.
Error in ==> train at 229
[I.label,num] = bwlabel(I.bw);
??? Error while evaluating uicontrol Callback
I am using Matlab 2008a

Réponses (3)

Is "I" a structure array? If so, then I.label would expand to a list of names, as if you had written
[I(1).label, I(2).label, I(3).label, ...,I(end).label, num] = bwlabel(I(1).bw, I(2).bw, I(3).bw, ..., I(end).bw)
Rim
Rim le 4 Avr 2011

0 votes

Thanks for your reply.Could u please go through the code and figure out wht is the problem.I can't fix it.
the code is given in this link.
http://www.mediafire.com/?ck5culxpka2d1g6
Rim
Rim le 19 Avr 2011

0 votes

ok i have added the code in pastie.org here is the link for train file: http://www.pastie.org/1811553 find_means: http://www.pastie.org/1811566
training image is uploaded on the given link: http://img831.imageshack.us/i/oneline.png/

1 commentaire

Sorry, I do not have the toolbox that would be needed to test that code myself.
At the command line, give the command
dbstop if error
Then run your program. When the error occurs you will be put in to the debugger. Examine the classes and sizes of the variables involved -- e.g., determine whether I is a structure array at that point. If so then we will have identified the most immediate cause, but it might take some work to track that back to particular input conditions.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange

Question posée :

Rim
le 15 Mar 2011

Community Treasure Hunt

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

Start Hunting!

Translated by