Skip to content

Instantly share code, notes, and snippets.

@masazdream
Created February 15, 2014 10:06
Show Gist options
  • Select an option

  • Save masazdream/9017096 to your computer and use it in GitHub Desktop.

Select an option

Save masazdream/9017096 to your computer and use it in GitHub Desktop.
Harris Corner取得用の関数 dist用画像のHarris Corner座標に円を描く
// 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