Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to train SVM in matlab for character recognition?

Tags:

matlab

ocr

svm

Im a final year student working on my major project. My project is basically to extract text from a natural scene, and recognize it and then display them in a notepad etc..

I have already extracted the text form the images and have also obtained 85 features for each character which is extracted.

How ever, for the recognition part, I have no clue as of how to train or use SVM(support vector machines) in matlab so I can get a match.

Please help me out as this is turning out to be painstakingly difficult

like image 715
LoveBomber777 Avatar asked Apr 11 '12 04:04

LoveBomber777


1 Answers

If you're happy with using an existing SVM implementation, then you should either use the bioinformatics toolbox svmtrain, or download the Matlab version of libsvm. If you want to implement an SVM yourself then you should understand SVM theory and you can use quadprog to solve the appropriate optimisation problem.

With your data, you will need to have an N-by-85 feature matrix, where N is a number of characters, and an N-by-1 array of 'true labels' which you provide manually. Depending on which tool you use to train an SVM, the paramaters to svmtrain are slightly different - check the documentation.

If you want to evaluate your SVM to show that it works, you may need to organise your data such that you can estimate the generalization error of classifier - see cross-validation

like image 127
Richante Avatar answered Nov 13 '22 15:11

Richante