Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Wrong value of getVarCount in SVM

I am using opencv 3.1 on Win 8.1 with Visual Studio 2015 this code Ptr<ml::svm> svm = ml::SVM::create(); svm->load<ml::svm>("svm_filename"); int varcnt=svm->getVarCount();

Value of varcnt is -842150451 But in file "svm_filename" var_count: 510 Because of this i have error opencv error: assertion failed (samples.cols==var_count

click to hide/show revision 2
No.2 Revision

updated 2016-04-08 00:31:23 -0600

berak gravatar image

Wrong value of getVarCount in SVM

I am using opencv 3.1 on Win 8.1 with Visual Studio 2015 this code Ptr<ml::svm> code

Ptr<ml::SVM> svm = ml::SVM::create();
svm->load<ml::svm>("svm_filename");
svm->load<ml::SVM>("svm_filename");
int varcnt=svm->getVarCount();

varcnt=svm->getVarCount();

Value of varcnt is -842150451 -842150451

But in file "svm_filename" var_count: 510 510

Because of this i have error opencv error: assertion failed (samples.cols==var_count