Skip to content

Commit 639e736

Browse files
authored
Merge pull request opencv#9081 from catree:fix_tutorial_pca_intro
Fix wrong mat access in introduction_to_pca.cpp
2 parents 2863c9f + 8b7cb8a commit 639e736

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ double getOrientation(const vector<Point> &pts, Mat &img)
7373
eigen_vecs[i] = Point2d(pca_analysis.eigenvectors.at<double>(i, 0),
7474
pca_analysis.eigenvectors.at<double>(i, 1));
7575

76-
eigen_val[i] = pca_analysis.eigenvalues.at<double>(0, i);
76+
eigen_val[i] = pca_analysis.eigenvalues.at<double>(i);
7777
}
7878

7979
//! [pca]
@@ -143,4 +143,4 @@ int main(int, char** argv)
143143

144144
waitKey(0);
145145
return 0;
146-
}
146+
}

0 commit comments

Comments
 (0)