For the use of Machine Vision in shaft size detection, this paper propose a method which completes the image distortion correction and system calibration by using commonly used industry standard parts. This method effectively improves the detection accuracy, simplifies the tedious process of calibration of conventional systems. By analyzing the main causes of error in image detection, the formal equation from error equation is established. Image distortion is corrected and calibrated at the same time. The coefficient of normal-type is calculated. This method is not only simple, but also effective to improve the accuracy of the image detection. The experiment proves that detection accuracy can reach 4μm at the resolution of 3450DPI, completely applicable to high-precision detection of shaft.