Aiming at the problem that the traditional feature-based and Model-based lane line detection methods have poor robustness in complex environment, and the cost of machine learning method is large, this paper proposes an improved sliding window search algorithm and an improved Soobel algorithm, a lane line detection method based on machine vision specifically for complex environment. In view of the fact that the traditional Hough transform linear detection algorithm cannot deal with the scene where the lighting conditions change dramatically and the curves are too large, this paper introduces a lane line detection technology with better universality and robustness, which is used to deal with the scenes where the light changes dramatically, the shadow of the roadside obstacles and the curves are common in the autonomous driving. A large number of experiments have proved that this algorithm can obtain more accurate and more robust lane information.