An imaging system is researched for the shaft size measurement, thus to replace the on-line manual measuring method, which is used to measuring diametric sizes and axial sizes of the shaft. Through the research of the characteristics of illumination, a kind of backlight was designed, which could improve the quality of image. For one CCD camera to the large size of the shaft is not easy to achieve, to continue research two CCD cameras imaging, the use of two cameras shoot the shaft two ends, to reduce the field of view to improve accuracy. At the same time, using the drive device to the relative position of the two cameras to achieve measure a variety of specifications of the shaft, improve compatibility. Because of the shaft parts for curved surface, need to extract the characteristics are not in the same plane, the telecentric lens of large depth of field was selected, to ensure the accuracy of image information. The image processing based on HALCON. From the measurement results, the shaft size measurement system measuring accuracy is high.