In order to detect the defects of the seal, a seal ring defects inspection algorithm based on clustering analysis was proposed. Firstly, template matching was used to update inspection coordinate system of the collected image and extract the seal ring. Secondly, the image was processed with methods such as median filter and automatic thresholding operation and the edge points were found by edge detection, stray points were removed by mathematical morphology. Thirdly, an advanced circle fitting method based on Least Square Principle (CBL) was proposed to get a fitting circle of the seal ring and inspect the defects with clustering analysis while the fitting circle was set as one class like all the edge points set as one. After defects inspection samples include 500 seal rings, the algorithm proposed with an inspection accuracy rate of 95.2% which proved that an effective defects inspection algorithm to the seal was found.
展开▼