Merge pull request #9081 from catree:fix_tutorial_pca_intro

Fix wrong mat access in introduction_to_pca.cpp
pull/9048/head
Alexander Alekhin 8 years ago committed by GitHub
commit 639e7367a7
  1. 4
      samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp

@ -73,7 +73,7 @@ double getOrientation(const vector<Point> &pts, Mat &img)
eigen_vecs[i] = Point2d(pca_analysis.eigenvectors.at<double>(i, 0),
pca_analysis.eigenvectors.at<double>(i, 1));
eigen_val[i] = pca_analysis.eigenvalues.at<double>(0, i);
eigen_val[i] = pca_analysis.eigenvalues.at<double>(i);
}
//! [pca]
@ -143,4 +143,4 @@ int main(int, char** argv)
waitKey(0);
return 0;
}
}

Loading…
Cancel
Save