| Infrared thermal imager is a non-contact temperature measuring instrument,which is widely used in power equipment,petrochemical industry,environmental protection and epidemic prevention.In the detection of power equipment,most of the faults of power equipment are accompanied by heating phenomenon.Infrared imaging technology can be used for temperature detection and troubleshooting of transformer,lightning arrester,capacitor,insulator string,transformer and other components.Detection of power equipment and other use scenarios require thermal infrared imager to measure the temperature of targets at different distances,requiring it to have the function of zoom and automatic focus.The contrast between background and target in infrared image is not obvious,which makes it more difficult for the traditional evaluation function to distinguish focused image from defocused image.Meanwhile,the evaluation function is susceptible to the influence of noise in infrared image,which also leads to the difficulty of realizing the search algorithm.Aiming at the problem of large fluctuation of evaluation function curve caused by noise,this paper studies the influence of two kinds of gradient operation factors on evaluation function based on representative scenes of high gray scale,medium gray scale and low gray scale,and realizes smooth processing of evaluation function data by sliding window filtering algorithm.The performance parameters of the evaluation function curve before and after filtering are evaluated by using the four parameters of clarity ratio,local extreme value factor,gentle zone fluctuation and sensitivity,and the most suitable evaluation function type for this type of equipment is explored.The variance function has the highest sharpness ratio before and after smoothing,which is8.94 and 7.96 respectively,and the fluctuation of flat region is only 0.23411 after smoothing.Smoothing makes the evaluation function have strict monotone,and the fluctuation in the flat region is reduced to some extent,which has a good smoothing effect on the evaluation function curve.Although the traditional mountain climbing search method has the advantage of speed,it has weak anti-noise ability and is more susceptible to noise interference.Compared with mountain climbing,the global search method has better anti-noise performance,but the focusing time of the global search method is longer due to the longer distance of movement.Based on the above problems of traditional algorithms,this paper proposes a hybrid search algorithm combining mountain climbing search and global search.Under the condition of ensuring accuracy,mountain climbing search method is used as much as possible,and global search method will be used only after mountain climbing search is judged to fail.Combined with the smoothed variance function,the defect that the mountain climbing search cannot be stopped due to the failure of finding the peak point is solved,and the defect that the focusing time of global search algorithm is too long is also avoided.The principle of sliding window filtering algorithm leads to some lag of smoothed curves.The flexible mobilization of data used in mountain climbing by hybrid search algorithm solves the problem of curve lag. |