Abstract:Aiming at the problem that the normal segmentation algorithms is difficult to detect the defects from the surface of magnetic ring with complex texture, this paper proposes a novel edge detection algorithm based on wavelet. Based on the weakness to magnetic ring texture using wavelet, Canny edge detection algorithm is adapted to segment the defect edge for the low frequency part after wavelet decomposition and reconstruction. By the find contours algorithm based on threshold segmentation, the magnetic inner-outer contour is extracted and processed. Through morphological processing and logical operation of the defective edge contours, all defects of magnetic ring are abstracted. After sorting the defects and abstracting the main contours of defects, we can judge the contour closure and fill the contour to get the main defect area. Experimental results show that the algorithm has a positive detection rate of 94.7%.