In recent years machine vision technology obtained the application in many fields, such as the industry, medical systems and national defence. Researches on the machine vision of the on-line and real-time detecting system. By the aid of optical engineering software ZEMAX, a telecentric optical system is designed, which uses a 1 inch CCD image sensor with 5.5μm pixel size. It can measure the target size and non-contact, with the maximum measurement range of 300mm and the resolution of 0.2mm, magnification is -0.053, the distortion is less than 0.1 percent. The MTF of this system is more than 0.5 in 70lp/mm, and all sorts of the aberrations are corrected well, and the image quality is uniform in all the fields. As the limits of magnification and pixel size of the CCD, the technology of CCD pixel subdivision can be used, and the accuracy can be increased to dozens of times, the accuracy of on-line non-contact measurement System can reach the micron-size. The telecentric degree of the double telecentric lens is very small when the object moves along the optical axis.