diff --git a/modules/core/src/matmul.cpp b/modules/core/src/matmul.cpp index af8c575819..9b3868505a 100644 --- a/modules/core/src/matmul.cpp +++ b/modules/core/src/matmul.cpp @@ -2813,7 +2813,7 @@ PCA::PCA(InputArray data, InputArray _mean, int flags, int maxComponents) PCA::PCA(InputArray data, InputArray _mean, int flags, double retainedVariance) { - operator()(data, _mean, flags, retainedVariance); + computeVar(data, _mean, flags, retainedVariance); } PCA& PCA::operator()(InputArray _data, InputArray __mean, int flags, int maxComponents) @@ -3077,7 +3077,7 @@ void cv::PCAComputeVar(InputArray data, InputOutputArray mean, OutputArray eigenvectors, double retainedVariance) { PCA pca; - pca(data, mean, 0, retainedVariance); + pca.computeVar(data, mean, 0, retainedVariance); pca.mean.copyTo(mean); pca.eigenvectors.copyTo(eigenvectors); } diff --git a/modules/core/test/test_mat.cpp b/modules/core/test/test_mat.cpp index 8c72789b06..514b587d75 100644 --- a/modules/core/test/test_mat.cpp +++ b/modules/core/test/test_mat.cpp @@ -426,7 +426,7 @@ protected: } // 3. check C++ PCA w/retainedVariance - cPCA( rPoints.t(), Mat(), CV_PCA_DATA_AS_COL, retainedVariance ); + cPCA.computeVar( rPoints.t(), Mat(), CV_PCA_DATA_AS_COL, retainedVariance ); diffPrjEps = 1, diffBackPrjEps = 1; Mat rvPrjTestPoints = cPCA.project(rTestPoints.t());