Let every edge pixel vote

Every edge pixel on the road ahead votes for every line through it, and peaks in the accumulator are lines. At 1° and a threshold of 60 the lab finds the same 15 lines as cv2.HoughLines, all of them on two painted lane lines.

Try this

Lower the threshold and watch one lane line turn into a fan of near-identical lines, then halve the angle bin and watch the fan double.

Try it: let every edge pixel vote

Where this lab comes from

What Is the Hough Transform? Finding Lines by Voting

The Hough transform finds straight lines by letting every edge pixel vote for every line that could pass through it. On a dashcam highway frame, 1,749 edge pixels cast 314,820 votes and the 15 strongest lines all lie on painted lane markings, but on only two of them. A from-scratch accumulator matches cv2.HoughLines vote for vote.

More in cameras and geometry