Abstract:According to the characteristics of micro parts microscopic detection image, including the image texture is similar, the edge information is too little and the gray distribution range is limited, the traditional sharpness evaluation function is analyzed based on the basic principles of algorithm. Aiming at the defect that the traditional sharpness evaluation function can not have own high sensitivity and noise immunity, an algorithm based on local variance information entropy is proposed. The method uses the local variance to weight the self-information of each gray level,on the one hand, it makes up for the lack of spatial information of information entropy and avoids misjudgement of sharpness; on the other hand, it can increase the weight of clear region pixels when they participate in the calculation of information, while reduces the weight of background and noise region pixels, thereby improves the function sensitivity. The experimental results show that compared with the traditional sharpness evaluation function, the local variance information entropy function not only has high sensitivity, but also has better noise immunity and is suitable for actual auto-focusing systems.