Ask Your Question
0

Can I increase number of SVM training label?

asked 2013-09-11 10:47:21 -0600

Tri Truong gravatar image

updated 2013-09-11 15:57:12 -0600

Moster gravatar image

I'm building OCR application with Visual Studio 2010, C++, SVM in OpenCV. It's ok when I train SVM with under 181 different labels but fails when over 181 labels. Below is IDE and OpenCV error message and my code. Please help me, thank you so much!

IDE error message

First-chance exception at 0x771e4b32 in OCR.exe: Microsoft C++ exception: cv::Exception at memory location 0x0081da74.. The thread 'Win32 Thread' (0xdac) has exited with code -1073741510 (0xc000013a). The program '[2512] OCR.exe: Native' has exited with code -1073741510 (0xc000013a).

OpenCV error message

......\src\opencv\modules\core\src\datastructs.cpp:332: error: (-211) requested size is negative or too big

SVM's configuration

CvSVMParams params; 
params.svm_type = CvSVM::C_SVC; 
params.kernel_type = CvSVM::LINEAR; 
params.term_crit  = cvTermCriteria(CV_TERMCRIT_ITER, 100, 1e-6);

SVM.train( training_vectors, training_labels, cv::Mat(), cv::Mat(), params );
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-09-11 15:55:10 -0600

The SVM kernel type have to change from linear to RBF.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-09-11 10:47:21 -0600

Seen: 716 times

Last updated: Sep 11 '13