Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If you have the road lines correctly detected and just want the middle line, then you can do like the famous stroke width transform (SWT). Basically from each point on the line walk in the direction of the gradient until you hit the gradient from the other line (which points (roughly) in the opposite direction). When you have have found the end point of your line, then you can just take the midpoint of it. Do this for each point and you got the line in between of the other two lines.

If you have the road lines correctly detected and just want the middle line, then you can do like the famous stroke width transform (SWT). Basically from each point on the line walk in the direction of the gradient until you hit the gradient from the other line (which points (roughly) in the opposite direction). When you have have found the end point of your line, then you can just take the midpoint of it. Do this for each point and you got the line in between of the other two lines.

image description