diff --git a/modules/ml/src/em.cpp b/modules/ml/src/em.cpp index 59c1352e4..c837b0d63 100644 --- a/modules/ml/src/em.cpp +++ b/modules/ml/src/em.cpp @@ -379,7 +379,7 @@ public: } else if(covMatType == COV_MAT_DIAGONAL) { - covsEigenValues[clusterIndex] = svd.w; + covsEigenValues[clusterIndex] = covs[clusterIndex].diag().clone(); //Preserve the original order of eigen values. } else //COV_MAT_GENERIC {