An autofocus algorithm for fusing global and local information in ferrographic images
To address the issues of large error and slow speed of manual focusing in ferrographic image ac-quisition,we propose an autofocus method for fusing global and local information in ferrographic images.This method includes two stages.In the first stage,the global autofocus stage,the feature vectors of the whole image is extracted by Convolutional Neural Networks(CNN),and the features extracted in the focus process is fused by the Gate Recurrent Unit(GRU)to predict global defocusing distance,which serves as coarse focusing.In the local autofocus stage,the feature vector of the wear particle is extracted and the cur-rent features is fused with those extracted in the previous focusing process by GRU.The current defocusing distance is predicted by the resulting fused data based on the information of the thickest particle,which facil-itates fine focusing.Moreover,we propose a determination method for autofocus direction using Laplacian gradient function to improve autofocus accuracy.Experimental results indicate an autofocus error of 2.51 μm on the test set and a focusing accuracy of 80.1%with a microscope depth of field of 2.0 μm.The average autofocus time is 0.771 s.The automatic ferrographic image acquisition system exhibits excellent perform-ance and offers a practical approach for its implementation.
autofocusferrographic imagesglobal informationlocal informationdeep learninggate recur-rent unit