Skip to content

Instantly share code, notes, and snippets.

@hkhojasteh
Last active January 30, 2019 05:39
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save hkhojasteh/a0f4e97a4d8c8d78eb936d87b78f8d17 to your computer and use it in GitHub Desktop.
Mat img_hlines = img_crop.clone();
//Standard Hough Line Transform
vector<Vec4i> lines; //will hold the results of the detection
HoughLinesP(detected_edges, lines, 1, CV_PI / 180, 50, 30, 10); //runs the actual detection
//Draw the lines
for (size_t i = 0; i < lines.size(); i++){
Vec4i l = lines[i];
line(img_hlines, Point(l[0], l[1]), Point(l[2], l[3]), Scalar(0, 255, 255), 2, CV_AA);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment