According to the requirements of focusing accuracy and the imaging characteristics of the CCD camera, an automatic focusing system of aerial camera which is based on image processing technology was proposed. It was based on the self-made resolution target, the image sharpness function and the optimized mountain climbing algorithm. The calibration of the aerial camera's defocusing amount caused by temperature and atmospheric pressure were realized by using the self collimation and the defocusing compensation method. Through the introduction of aircraft altitude data to calculate the defocusing amount and the correction were achieved by using the self collimation focusing technology. The automatic focusing test experiment was carried out and the results show that, the system can satisfy the requirements of fast and high precision focusing of the aerial camera, the calibration error is less than 1/2 depth of the camera.