diff --git a/samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp b/samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp index 52f9e49f4b..97ac8e8047 100644 --- a/samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp +++ b/samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp @@ -73,7 +73,7 @@ double getOrientation(const vector &pts, Mat &img) eigen_vecs[i] = Point2d(pca_analysis.eigenvectors.at(i, 0), pca_analysis.eigenvectors.at(i, 1)); - eigen_val[i] = pca_analysis.eigenvalues.at(0, i); + eigen_val[i] = pca_analysis.eigenvalues.at(i); } //! [pca] @@ -143,4 +143,4 @@ int main(int, char** argv) waitKey(0); return 0; -} \ No newline at end of file +}