A method of detecting a structural barrier extending along a road, the method performed by a driver assistance system mountable in a host vehicle, wherein the driver assistance system includes a camera operatively connectible to a processor, the method including the steps of: capturing a plurality of image frames in the forward field of view of the camera; and in the image frames, processing motion of images of the structural barrier thereby detecting the structural barrier; wherein the structural barrier includes a plurality of vertical posts, the method including, for each of the posts: determining forward distances from the host vehicle to the posts based on the motion of the images and the forward motion of the host vehicle; computing lateral distances to the posts from the host vehicle from the forward distances and horizontal image coordinates of the posts; hypothesizing road plane lines at said lateral distances, to form a plurality of hypothesized road plane lines as projections of vertical lines corresponding to the posts onto the road surface; projecting said hypothesized road plane lines at said lateral distances onto an image of the structural barrier in an image frame; and selecting the correct road plane line from the hypothesized road plane lines by aligning the correct road plane line with the image of the structural barrier in the image frame. capturing a plurality of image frames in the forward field of view of the camera; and in the image frames, processing motion of images of the structural barrier thereby detecting the structural barrier; wherein the structural barrier includes a plurality of vertical posts, the method including, for each of the posts: determining forward distances from the host vehicle to the posts based on the motion of the images and the forward motion of the host vehicle; computing lateral distances to the posts from the host vehicle from the forward distances and horizontal image coordinates of the posts; hypothesizing road plane lines at said lateral distances, to form a plurality of hypothesized road plane lines as projections of vertical lines corresponding to the posts onto the road surface; projecting said hypothesized road plane lines at said lateral distances onto an image of the structural barrier in an image frame; and selecting the correct road plane line from the hypothesized road plane lines by aligning the correct road plane line with the image of the structural barrier in the image frame. determining forward distances from the host vehicle to the posts based on the motion of the images and the forward motion of the host vehicle; computing lateral distances to the posts from the host vehicle from the forward distances and horizontal image coordinates of the posts; hypothesizing road plane lines at said lateral distances, to form a plurality of hypothesized road plane lines as projections of vertical lines corresponding to the posts onto the road surface; projecting said hypothesized road plane lines at said lateral distances onto an image of the structural barrier in an image frame; and selecting the correct road plane line from the hypothesized road plane lines by aligning the correct road plane line with the image of the structural barrier in the image frame.