Abstract:Due to the different shapes of inner holes of many precision instrument parts, a fast template matching method based on the improved regular edges is proposed, aiming at the quality inspection for inner holes of regular edge parts. By performing mathematical morphology and least squares edge fitting on the acquired part image, the region of interest (ROI) containing only inner holes of parts is extracted, and finally the matching detection of modeling on inner holes of parts is completed. By verifying the accuracy and speed of the proposed algorithm, experiment shows that this algorithm can meet the industrial inspection requirements of parts, the accuracy is 8.9% higher than that of the traditional template detection algorithm, and the detection time is 0.72S faster than the traditional template detection algorithm.