Probably fixed EM tests failure on x86 platforms (thanks to Maria D.)

This commit is contained in:
Andrey Kamaev 2012-04-17 15:28:10 +00:00
parent 44098b2fbb
commit 72f4386fb9

View File

@ -502,10 +502,9 @@ Vec2d EM::computeProbabilities(const Mat& sample, Mat* probs) const
Lval += w * val * val;
}
CV_DbgAssert(!logWeightDivDet.empty());
Lval = logWeightDivDet.at<double>(clusterIndex) - 0.5 * Lval;
L.at<double>(clusterIndex) = Lval;
L.at<double>(clusterIndex) = logWeightDivDet.at<double>(clusterIndex) - 0.5 * Lval;
if(Lval > L.at<double>(label))
if(L.at<double>(clusterIndex) > L.at<double>(label))
label = clusterIndex;
}