Abstract:The elbow is a crucial component of a pipeline and can be subject to fluid scour erosion and other defects that threaten its safe operation. A highly effective method for detecting pipeline defects is magnetic flux leakage (MFL) detection, and accurately quantifying these defects is of significant importance. In order to enhance comprehension of defect patterns in small-diameter pipe elbows and improve the measurement accuracy of defects, this paper proposed a novel image quantification method for MFL defects in small-diameter pipe elbows using an improved Canny operator. The image features of metal loss defects at different locations of the elbow were analyzed by establishing a simulation model for MFL detection in small-diameter pipe elbows. The defect image quantization model was constructed by using morphological filtering and OTSU optimized Canny operator, combined with image processing methods. This model corrected the depth quantification of defects from various positions on the elbow. The experimental results clearly showed that there are differences in the images of defects at different positions on the elbow. The accuracy of the quantification model in measuring defect length and width is precise, with an error rate of less than 2 mm. However, quantifying the depth of defects revealed a more significant error rate, with a precision of 86.34% post-correction. Nonetheless, this level of accuracy satisfies the necessary standard for detecting metal loss defects. The suggested approach allows for batch processing of defect images and therefore holds considerable importance in detecting MFL defects in pipelines.