To improve measurement accuracy of safety belt pin, the size-sorting system which mainly includes a machine vision subsystem and a driving subsystem, is researched. The machine vision subsystem includes a industry camera, a double telecentric lens and a backlight. Image process steps that have sub-pixel accuracy are presented. The driving subsystem is designed with Atmega128L MCU. The state machine is designed for safety pin control logic. The two sub systems communicate with RS232 serial port. The test shows that the system has a maximum accuracy error of 0.05mm, repeatability error of 0.013mm.