At the National Institute of Metrology, China, the national level standard was established for calibrating the level measuring instruments widely used in the field of surveying, construction and engineering. As a key technology in the development, an auto collimation system was set up to compare the level under test with the water level. In the auto collimation system, a charge-coupled device (CCD) camera was set up to acquired the image of a light spot reflected from the water surface and the plane mirror, a composite image processing and analyzing algorithm was designed to find the exact position of the light spot in the image. This target localization algorithm consists of sub-algorithm of background de-noising, dimension transforming, and curve fitting. The experiments prove that this algorithm get resolution of 0.002″, and repeatability of 0.01″.