An improved "three steps" mountain-climb searching (MCS) algorithm is proposed which is applied to auto-focusing for microscopic imaging accurately and efficiently. By analyzing the performance of several evaluation functions, the variance function a