Opencv boost update gives unhandled exception

asked 2014-06-24 12:50:17 -0500

tulip gravatar image

I am using CvBoost from OpenCV and as long as I leave out the update parameter, everything is fine and the classifier gets trained properly. However, once I try to add more weak learners to the classifier by providing new data and also setting update to true, I get an unhandled exception. Could you please help? Below is part of my code:

CvBoostParams params = CvBoostParams(CvBoost::DISCRETE, 1, 0.9, 1, false, NULL);

CvMat* data_f = cvCreateMat(nRows, nCols, CV_32FC1);

CvMat* resp_f = cvCreateMat(nRows, 1, CV_32FC1);

readFeatureFile(fileName, data_f, resp_f);

CvBoost boost = CvBoost();

boost.train(data_f, CV_ROW_SAMPLE, resp_f, NULL, NULL, NULL, NULL, params);

params.weak_count += 1;

boost.train(data_f, CV_ROW_SAMPLE, resp_f, NULL, NULL, NULL, NULL, params, true);

The exception is in the last line. I am using CvMat as I get compilation errors giving training data as cv::Mat.

edit retag flag offensive close merge delete


could you add the exception to your question ?

berak gravatar imageberak ( 2014-06-24 12:57:57 -0500 )edit

Hi, I have run into the exact same problem. Is there anyone who has successfully set update=true? Perhaps we should open a bug report

jcheney44 gravatar imagejcheney44 ( 2015-01-09 13:49:09 -0500 )edit

I have the same issue, and have never successfully run with update = true. Bug report is a good idea. Perhaps this problem is solved in 3.0??? Anybody know?

Geronimo gravatar imageGeronimo ( 2015-09-01 09:16:31 -0500 )edit