Created
February 15, 2014 10:06
-
-
Save masazdream/9017096 to your computer and use it in GitHub Desktop.
Harris Corner取得用の関数 dist用画像のHarris Corner座標に円を描く
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Harris's corners | |
| void HarrisCorners(Mat& src, Mat& dist, vector<Point2f>& corners) { | |
| goodFeaturesToTrack(src, corners, 200, 0.01, 2, Mat(), 2, true); | |
| vector<Point2f>::iterator it_corner = corners.begin(); | |
| for (; it_corner != corners.end(); ++it_corner) { | |
| float px = it_corner->x; | |
| float py = it_corner->y; | |
| circle(dist, Point(px, py), 1, Scalar(0, 0, 255), -1); | |
| circle(dist, Point(px, py), 8, Scalar(0, 0, 255)); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment