Aiming at the problem that the real-time obstacle avoidance of power line by power line patrol UAV is difficult to achieve, this paper takes the image of power line captured by dynamic camera as the object, proposes an algorithm based on EDLines to identify the power line and realize the distance estimation with the power line according to the change of feature points. Firstly, the ED algorithm detects the edge of the image, and then a model is built according to the characteristics of the transmission line. The identified lines are screened and detected to reduce the interference of the complex background. At the same time, the linear growth method connects the discontinuous transmission lines. Finally, the feature points on the transmission line are extracted, the matching relationship between frames in the image sequence is used to track the feature points, and combined the position of UAV obtains the distance relationship, and the corresponding control strategy is proposed. Ordinary background and complex background images verifies the accuracy of the proposed algorithm, and the actual distance obtained is compared with the estimated distance. Experiments show that the matching accuracy and recognition speed of this algorithm are improved compared with Hough transform algorithm in the process of detecting transmission lines.