## 1 Introduction  
Night vision goggles (NVG) equipment can be used as nighttime visual aids by helicopter pilots in low-light environments. In particular, the NVG availability situation will directly affect the safety of nighttime aerial reconnaissance missions. Therefore, highly equipment availability should be maintained through regularly maintaining inspections and verifications. At present day, the aviator's NVG model AN/AVS-6 (V) 1 and AN/AVS-6 (V) 2 still rely on lots of manpower to perform their calibration. While processing, NVGs need to be placed on a test bench in order to commence manual focus adjustment operations by observing the image through the eyepiece. After the focus adjustment operation is completed, to make sure that the equipment is in line with calibration standards is confirmed only by human eyes. Since automatic image detection technology is sophisticated and widely applied, the researcher aims to reduce the staff's education time and to achieve the goal of proper equipment used by means of automatic image detection [1]. After gaining an insight into the performance and limitations of NVG, the autofocus operating process can be more accurately developed. Referring to the document of basic structure [2], the image quality of NVG relies on the electromagnetic spectrum signals detected by the enlarged image intensifier. The electro-optic system of the image intensifier is an important component. This component significantly affects resolution and light amplification. However, this component is subject to damage under strong light or high-humidity environments, and the general architectural diagram of the image intensifier is as shown in Figure 1[2]. As the image intensifier will affect aviator's safety, image intensifier detection has become a standardized process. The current aviator's nighttime NVG test bench (TS-3895A/UV) [3] can provide the nighttime low-light environment required for NVG calibration. However, the test bench itself is unable to automatically adjust the NVG focal length. In addition to the drawback of needing to observe NVG eyepiece images by human eye before manually adjusting nighttime NVG focal length, human factors may lead to inaccurate test results. Therefore, this project intends to use a direct current (DC) servo driver to promote the focal knob of NVG to achieve the purpose of adjusting focus and acquiring quantitative value of rotation angle. For the configuration and design, refer to the document [1]. At present the autofocusing methods can be divided into active autofocusing and passive autofocusing [4]. Active autofocusing involves installing external infrared or other tools to measure distance between camera lens and target. Passive autofocusing, on the other hand, involves calculating sharpness information of a single image obtained from the camera. After calculating the sharpness of multiple images, the sharpness curve is acquired. The peak value of the sharpness curve is the best focal distance. Since this case proposes to adjust focus via image information of NVG, the passive autofocusing method was adopted. The key to the application of this method lies in whether effective sharpness points can be calculated through image information. Light luminance is the key affecting the passive autofocusing system. In previous studies, many types of sharpness computing methods were compared [5] to determine merits and drawbacks, which were applied in NVG's autofocusing [1]. In passive autofocusing, regardless of sharpness computing method, the subsequent image intensifier display on the screen undergoes defect testing, all of which are independent processes. [PERSON] and [PERSON] proposed autofocusing process for NVGs [1], which uses gradient-based variable step search and variation of normalized gray-level as the main method for accomplishing autofocus. [PERSON] et al. [6] suggested the application of a robust principal component analysis method in multifocus image fusion.