Abstract:In order to improve the extraction accuracy of welds and other defects in complex background ray images,a defect detection method based on visual attention mechanism was proposed.According to the different nature of the defect,the ray image was divided into several sub-regions by regions or line segments.By modeling the visual attention mechanism,the central-periphery difference operator was used to segment the suspicious region.The threshold was set to exclude interference from other parts of the image,which greatly reduced the algorithm processing capacity,and then the threshold method could be used to accurately extract all kinds of defects.Experimental results show that the method can be used to extract the defects accurately and efficiently in the ray image with complex background,the accuracy is up to 94.6%,and the adaptability is stronger and the versatility is better.