mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 21:20:18 +08:00
fixed #2160
This commit is contained in:
parent
ed0a158cc1
commit
75e0eeab17
@ -386,7 +386,8 @@ void EM::computeLogWeightDivDet()
|
||||
for(int clusterIndex = 0; clusterIndex < nclusters; clusterIndex++)
|
||||
{
|
||||
double logDetCov = 0.;
|
||||
for(int di = 0; di < covsEigenValues[clusterIndex].cols; di++)
|
||||
const int evalCount = covsEigenValues[clusterIndex].total();
|
||||
for(int di = 0; di < evalCount; di++)
|
||||
logDetCov += std::log(covsEigenValues[clusterIndex].at<double>(covMatType != EM::COV_MAT_SPHERICAL ? di : 0));
|
||||
|
||||
logWeightDivDet.at<double>(clusterIndex) = logWeights.at<double>(clusterIndex) - 0.5 * logDetCov;
|
||||
|
Loading…
Reference in New Issue
Block a user