{'fraction_non_alphanumeric': 0.02043906131718395, 'fraction_numerical': 0.000757002271006813, 'mean_word_length': 5.3253588516746415, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Dual autofocusing algorithm for optical lens measurement system

In order to develop an on-line optical lens measurement system, a dual autofocusing algorithm consisting of coarse autofocusing and fine autofocusing is proposed to realize the accurate and automatic image grabbing. In the procedure of coarse autofocusing, variance function on the whole image is selected as sharpness evaluation function (SEF), and mean comparison method is applied to realize the hill-climbing algorithm for focal plane searching. A 3-point method is used to initialize the searching direction. In the procedure of fine autofocusing, a conditional dilation method based on mathematical morphology is used to extract the region of interest (ROI), namely, the target images, and a shape factor is employed to eliminate the disturbance regions. Brenner function within ROI is selected as SEF, and single-point comparison method is used to find the focal plane accurately. Compared to the traditional methods, this dual autofocusing algorithm not only can realize high precision focusing, but also has large autofocusing range. The experiment results show that the dual autofocusing technique can guarantee that the focusing position locates in the depth of field. The proposed algorithm is suitable for the on-line optical lens measurement.