Ask Your Question

Tri Truong's profile - activity

2013-09-11 10:49:44 -0500 received badge  Editor (source)
2013-09-11 10:47:21 -0500 asked a question Can I increase number of SVM training label?

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