Abstract:In order to solve the over-segmentation and incorrect segmentation in tree detection of aerial image under complex terrain background, a watershed segmentation algorithm based on optimal marker was proposed. In this method, firstly, the contrast between the target and the background is improved by nonlinear gray transformation. Secondly, the foreground and background areas are initial marked according to the shape characteristics of the target, then the distance transformation in the traditional watershed algorithm is replaced by the centroid of the foreground area, and the foreground is marked again. Finally, the image is segmented by the watershed algorithm. The experimental results show that the average segmentation accuracy of this algorithm is 92.5%, which is more anti-noise and accurate than the existing image segmentation methods, and also solves the over-segmentation problem of the watershed algorithm.