1. A method for lane departure warning, applicable to an electronic device, the method comprising: segmenting an original image into a plurality of regional images; analyzing a plurality of characteristics of each of the regional images, and accordingly removing at least one non-lane line region from the regional images, so as to obtain a plurality of lane line candidates; determining a plurality of lane lines from the lane line candidates according to a location of each of the lane line candidates in the original image; distinguishing the lane lines into at least one left lane line and at least one right lane line; and analyzing a variation of an angle between each of the at least one left lane line and the at least one right lane line and a horizontal line, so as to judge whether the electronic device departs from a lane and send a lane departure warning.