Lines Matching refs:covs
103 covs.clear();
237 const std::vector<Mat>* covs, const Mat* weights)
271 CV_Assert(!covs ||
272 (!covs->empty() &&
273 static_cast<int>(covs->size()) == nclusters));
274 if(covs)
277 for(size_t i = 0; i < covs->size(); i++)
279 const Mat& m = (*covs)[i];
353 // set covs
356 covs.resize(nclusters);
358 (*covs0)[i].convertTo(covs[i], CV_64FC1);
364 CV_Assert(!covs.empty());
371 CV_Assert(!covs[clusterIndex].empty());
373 SVD svd(covs[clusterIndex], SVD::MODIFY_A + SVD::FULL_UV);
429 // Compute weights and covs
431 covs.resize(nclusters);
445 calcCovarMatrix(clusterSamples, covs[clusterIndex], means.row(clusterIndex),
481 if(covs.empty())
488 if(!covs.empty() && covsEigenValues.empty() )
527 // postprocess covs
528 covs.resize(nclusters);
533 covs[clusterIndex].create(dim, dim, CV_64FC1);
534 setIdentity(covs[clusterIndex], Scalar(covsEigenValues[clusterIndex].at<double>(0)));
538 covs[clusterIndex] = Mat::diag(covsEigenValues[clusterIndex]);
682 covs.resize(nclusters);
698 covs[clusterIndex].create(dim, dim, CV_64FC1);
701 covsEigenValues[clusterIndex] : covs[clusterIndex];
731 SVD svd(covs[clusterIndex], SVD::MODIFY_A + SVD::FULL_UV);
748 covs[minWeightClusterIndex].copyTo(covs[clusterIndex]);
778 size_t i, n = covs.size();
780 fs << "covs" << "[";
782 fs << covs[i];
805 FileNode cfn = fn["covs"];
808 covs.resize(n);
811 (*cfn_it) >> covs[i];
821 _covs.resize(covs.size());
822 std::copy(covs.begin(), covs.end(), _covs.begin());
833 std::vector<Mat> covs;