Created
February 15, 2014 10:08
-
-
Save masazdream/9017121 to your computer and use it in GitHub Desktop.
Houghsline取得用関数 dist用画像に検出した直線を描く
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
| // Hough's lines | |
| void HoughLines(Mat& src, Mat& hough_image, vector<Vec4i>& lines) { | |
| HoughLinesP(src, lines, 1, CV_PI / 180, 50, 100, 5); | |
| vector<Vec4i>::iterator it = lines.begin(); | |
| for (; it != lines.end(); ++it) { | |
| Vec4i lin = *it; | |
| line(hough_image, Point(lin[0], lin[1]), Point(lin[2], lin[3]), | |
| Scalar(0, 0, 255), 2, 4); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment