Abstract:A thresholding segmentation algorithm for complex background is introduced. The method is based on edge detecting of infrared image. Firstly , the image edge is detected , and then segmentation thresh- old is computed by weighting and averaging value of pixels gray. The method is simple and practical , and it can segment the targets in the air and on the sea exactly. And it has been used in tracking system , the experimental result indicates that the algorithm is correct and real-time , and the system is reliable.