This paper presents a general algorithm to track the line on the ground based on computer vision, which
utilizes Raspberry Pi 2 to complete the image processing. The algorithm accomplishes image processing firstly, then
recognizes the line by edge detection and scanning model. The proposed algorithm can be used in a variety of platforms
including intelligent car system, robot platform, UAV platform and other mobile platforms. In this paper, the algorithm is
verified by quadrotor platform and achieves great line-tracking effect by tuning parameters. Series of experiments show
that the algorithm has great validity, robustness, and generality.