With the recent development of modern mechanical industry, automatic inspections have been playing more and more important roles. Optoelectric inspection is a major one among them. This article is to discuss a system which can inspect contour sizes of mechanical components in real time by using the method of optoelectric image. This system adopts the methods of optical projection of the `tolerance zone' of components as well as image preprocessing and analysis. According to the different positions of the reflector group, a variety of parameters of a component, such as outer diameter, length, width, height, taper, and thread can be measured. In this article, we first discuss the structure of the system and then analyze its principle and applications in inspecting outer diameter, taper, and thread. In this inspection system, we use image processing and analysis in the process of automatic inspection. We control the complete system and the processing of information with the help of a computer so that the high speed and high precision are obvious. Meanwhile, due to the optoelectric method in getting optical information, the system is of noncontact inspection. And also it can inspect several parameters of a component at the same time since it adopts projection of the tolerance zone of components. For the same reason, the inspection efficiency is high and the system can be made compact.