In order to make the operation of stereo microscope more convenient and acquisition high quality images, we develop a novel motorized stereo microscpe and propose new auto-focusing (AF) algorithm. X, Y and Z (focus) axis positions of the microscopic stage are visual feedback controlled to focus. The focus evaluation function based on the morphological wavelet decomposition pyramid is introduced. By calculating the ratio of energy of high frequency wavelet coefficients and low frequency wavelet coefficients in the second Median-Erosion morphological wavelet domain, the proposed method performs well in the noise environment.