This paper proposes an auto-focus Instruction function. The function is derived from Ostu segmentation. It uses class variance of segmentation result to instruct auto-focus process. Compare with the exist functions, class variance function need a small calculation mount. It is immunity to jam coming from camera and other inspection. It responses in a wide object distance range. And the value changes in a large range. All this features make this function is most flexible for microscope real-time auto-focus process. This paper analyzes the function and compares it to some traditional function. All the data are based practical instrument. DOI : http://dx.doi.org/10.11591/telkomnika.v12i4.4784