Hello,
i'm having troubles changing the source code for em algorithm. The em algorithm in opencv gives loglikelihood values for every data point. I would like to get the sum of the loglikelihood values for every iteration of the em algorithm. I have tried to modify "opencv\sources\modules\ml\src\em.cpp" by adding :
Mat loglike;
void setloglike(double f) {
if (loglike.empty())
loglike = Mat(1, 1, CV_64F);
loglike.push_back(f);
}
Mat getloglike() const {
return loglike;
}
After rebuilding i couldnt use this function, it was not "there", so i added to "opencv\sources\modules\ml\include\opencv2\ml.hpp" my lines :
CV_WRAP virtual Mat getloglike() const = 0;
CV_WRAP virtual void setloglike(double f) = 0;
but the result is crashing when i sue that function. thank you for your help.