Ask Your Question

Revision history [back]

How can I detect center of road(as a line) if contours for road are drawn.

I am interested in obtaining a center line of road. I am working on video frames(bgr). Then applying threshold,erosion and canny edge detection.

Further I am applying sobel derivative and then finally drawing contours.

I am thinking of taking small strips along y axis, obtaining x coordinates and the finding the mean of these x coordinates. But so far I have not come across any function which would allow me to do this.

Also if I get these values how should I store them ?