Absrtact: imaging clarity plays an important role in the detection and tracking of long-range targets. The imaging distance of infrared telescope system is long, the depth of field is short, and the defocus causes the image to be blurred. Because of atmospheric refraction, the image of telescope is constantly changing, which results in the low success rate and efficiency of traditional focusing algorithm. In order to improve the success rate and speed of automatic focusing, a mountain climbing method with variable step size is adopted to ensure the accuracy of definition evaluation by using the method of finding the median of image clarity many times. The climbing method of driving and acceleration reduces the instability and the number of steps needed in the coarse focusing process. The experimental results show that the number of focusing steps in the coarse focusing stage is 12.8% less than that in the traditional mountain climbing method, which meets the needs of the infrared telescope system.
Keywords: automatic focus; infrared telescope; evaluation function; momentum; acceleration
Since 1940, infrared technology has been greatly developed. Infrared remote sensing perceives targets by receiving their own radiation or reflected infrared rays. Because some bands of infrared have strong atmospheric penetration ability, it has a wide range of applications in the fields of resource detection, ocean observation, earth remote sensing and so on. With the further development of economy and science and technology, the requirement of infrared detection technology has been improved, the focal length of infrared telescope has been increasing, the caliber has been expanding, the thermal imaging quality and the ability to detect and track the target have been improved. The premise of the successful detection and tracking of the target is to obtain a clear target image.
In the process of tracking the target, the relative position and distance between the target and the detection system may be constantly changing. Without effective focusing operation, the imaging of the target may be blurred, making the tracking system not working properly and even losing the target. In order to obtain the clear infrared image in time, the automatic focusing algorithm is very important. The fast and effective automatic focusing algorithm can judge the defocusing condition of the lens in a short time and issue the focusing instruction quickly.
The commonly used focusing methods are divided into defocus depth method and defocus depth method. According to the obtained image, the defocus depth method judges the direction and degree of lens deviation from the quasi-focus position. The image is evaluated, and the defocusing direction is determined according to the evaluation.For defocus depth method and defocus depth method, defocus depth method is fast, but depends on accurate defocus model and high precision control structure, so it is easy to produce system deviation . Focus depth method has been widely used in visible light imaging systems such as mobile phones and surveillance cameras because of its simple and stable .ErasmusS.J. and other  began to study the automatic focusing technology based on digital image processing, and compared the clarity of different images by analyzing the information of image edges.
Lin Zhaohua and other  subdivide the automatic focusing process and use the improved Kirsch function and the lifting wavelet transform function to evaluate the image respectively. The algorithm of selecting focusing window according to image miss and the search strategy of curve fitting combined with mountain climbing algorithm are proposed to reduce the impact of background on focus.  Wang Hao put forward the defocus estimation method based on single image, which can effectively improve the focusing speed.XiaofanYu and other  proposed to use deep reinforcement learning to focus objects in the microscope. this method integrates the traditional evaluation and search processes into a network to form an end-to-end algorithm.RudiChen and other  proposed an automatic focusing method based on decision tree to improve the accuracy of focusing under low light conditions. Because the image quality obtained by infrared detector is generally worse than that of visible light detector, the imaging noise is large, there are bad points, the field of view of telescope is small, and the image ambiguity caused by atmospheric refraction is unstable.
The Casergreen Reflective Infrared Telescope System, built by the Infrared Telescope System, is shown in Figure 1, 300 mm, main mirror focal point Cal .600 mm, Infrared detector imaging size 640×512, Dimensions 15μm, Response wavelength 3.7~4.8μm, F 2, Has two-dimensional rotation function. Camera integration time is 6μs, in telescope system Almost no motion blur occurs in the motion of the highest 8°/s angular velocity. Figure 2 shows the control block diagram of the infrared telescope system. Infrared radiation first enters the optical system, Then imaging on an infrared detector, The photo-sensitive elements of the detector respond to the image data collected by the acquisition card, Finally transmitted to the PC machine by the upper computer for processing. The auto-focusing part, The stepper motor drives the mirror along the optical axis, Complete automatic focusing task.
The infrared telescope system is very different from the general visible light system, especially in the static condition. The visible light imaging system, such as the smartphone lens, is basically close-range imaging. The influence of uneven air density on light is very limited in short distance, so the imaging quality will not change greatly. The infrared telescope system is long-distance imaging, and the uneven air density has a strong effect on the light over a long distance, which is especially obvious when the temperature is high.
The image changes constantly under atmospheric refraction, which leads to the constant jitter of the evaluation value of the focusing evaluation function, and the evaluation value of the focusing evaluation function on both sides of the peak value is no longer monotonous. The automatic focusing algorithm can not find the peak value of the focusing evaluation function or the local maximum value. An infrared telescope is used on a stationary platform to continuously image a near house window. The comparison of the two images is shown in figure 3. The above image is 4.25% more valuable than the Tenengrad function in the following figure, and the above image is clearer than the following figure.
Figure 1 Actual infrared telescope F ig.1Realinfraredtelescopesystem
Figure 2 Block diagram of automatic focusing system for infrared telescope