ABSTRACT In view of the problem that the traditional power line inspection cannot accurately obtain the height of the tree barriers under the power line, this study takes a forest area in Guilin City and a power line corridor in Yinchuan City as the research object, and combines watershed segmentation algorithm and local maximum algorithm to study the height of the tree barriers under power line. The results show that the watershed segmentation algorithm and the local maximum algorithm can accurately extract the height of tree barriers in power lines. In the Guilin experiment, there is a good correlation between the extracted height of different trees and the measured height, The correlation coefficients (R2) for osmanthus, eucalyptus, and pine trees are 0.9368, 0.8923, and 0.8227, respectively. In the experiment in Yinchuan, the tree height extracted by unmanned aerial vehicles (UAV) and LiDAR also has a good correlation with the measured height, with correlation coefficients (R2) of 0.926 and 0.952, respectively. These two experiments have verified the feasibility of watershed segmentation algorithm and local maximum algorithm in extracting the height of tree barriers under power lines, which is of great significance for monitoring and warning of tree barriers under power lines.