Abstract:
To address the challenges of limited weld defect samples of oil and gas pipelines and frequent missed detection of small defects in low-contrast X-ray weld inspections, a X-ray weld defect detection method based on OTSU(maximum between-class variance method) adaptive threshold segmentation was proposed. Dynamic gamma adjustment rules was developed to enhance the weak signals in X-ray images, the global offset compensation
C and otsu global threshold
TOTSUwere introduced to calculate the adaptive threshold of the sliding window and realize image segmentation based on OTSU adaptive threshold. Defect detection, classification, parameter extraction and positioning were realized by using the mask operation,inversion operation, opening operation for denoising, and external defect contour extraction. The experimental results demonstrate that the method only takes about 1.59 s to process images with a pixel size of 449 ×594, and the minimum detectable defect area is 0.237 mm
2. It can detect tiny weld defects in real time and efficiently, complete defect parameter extraction and positioning, and does not depend on the number of defect samples, making it easier to apply and popularize in safety monitoring of petroleum pipelines.