In this work, a novel lane detection method using a single input image is presented. The proposed method adopts a color and shadow invariant preprocessing stage including a feature region detection method called as maximally stable extremal regions. Next, candidate lane regions are examined according to their structural properties such as width-height ratio and orientation. This stage is followed by a template matching-based approach to decide final candidates for lane markings. At the final stage of the proposed method, outliers are eliminated using the random sample consensus approach. The proposed method is computationally lightweight, and thus, it is possible to execute it in real-time on consumer-grade mobile devices. Experimental results show that the proposed method is able to provide shadow, illumination and road defects invariant performance compared to the existing methods.