Segmentation of ship target under complex background has important research significance in long-range ship tracking and identification, and an adaptive segmentation algorithm is proposed according to background images with different complexity. Local complexity of image is first calculated in this algorithm, and then the original image is preprocessed with different de noising methods according to local complexity, finally the image is binarized based on local complexity and the target is segmented. The experiment results indicate that the algorithm is adaptive and can meet the requirements of real-time processing, which lays a foundation for ship target detection under complex background.