A method for detecting defects in a magnetic flux leakage image of a steel wire rope under distortion noise
By performing detrending processing and spline interpolation on the magnetic flux leakage signal of steel wire rope, combined with the Prewitt operator and adaptive binarization thresholding method, the defect localization problem in the magnetic flux leakage image detection of steel wire rope under distortion noise is solved, achieving higher detection accuracy and noise resistance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 青岛明思为科技有限公司
- Filing Date
- 2022-10-26
- Publication Date
- 2026-07-10
AI Technical Summary
Existing magnetic flux leakage image detection methods for wire ropes struggle to accurately locate defects when faced with distortion and noise. In particular, the residual noise caused by noise distortion results in poor defect location performance of existing methods.
After acquiring the magnetic flux leakage signal, it is converted into an image through detrending processing and spline interpolation. The Prewitt operator is used to construct a template response image block, and power-law transformation and envelope processing are performed. The defect is located by combining the adaptive binarization thresholding method.
It can accurately detect wire rope defects under distorted noise, improve the accuracy of defect location and noise resistance, and reduce the occurrence of missed detections.
Smart Images

Figure CN115575487B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of non-destructive testing technology for steel wire ropes, and more specifically, relates to a method for detecting magnetic leakage image defects in steel wire ropes under distortion and noise. Background Technology
[0002] In most large-scale industrial applications, steel wire ropes are often used as key load-bearing components, responsible for fixing, lifting, and pulling heavy objects, and are widely used in critical transportation equipment such as elevators, cranes, and cableways.
[0003] In practical applications, the surface of wire ropes inevitably suffers from impacts and scratches during contact with other equipment, resulting in various defects such as wear, broken wires, and skipped wires. These surface defects often worsen, increasing the probability of rope breakage during use and potentially leading to serious transportation safety accidents, posing a significant threat to personal safety and property. Therefore, regular early detection and repair of surface defects in wire ropes and timely replacement are of great practical importance in industrial applications.
[0004] Magnetic flux leakage signal detection of wire rope defects is less affected by external factors such as the wire rope itself and environmental conditions, making it the most widely used method for wire rope inspection besides manual inspection. With the development of computer vision technology, converting magnetic flux leakage signals into images and locating and detecting defects through image processing has gradually become a research hotspot. Magnetic flux leakage images of wire ropes are typically generated by converting the acquired magnetic flux leakage signals into images through interpolation and other dimensionality-up methods. Compared to directly acquired magnetic flux leakage signals, magnetic flux leakage images can more intuitively display the characteristics of different wire rope defects.
[0005] Existing methods for detecting magnetic flux leakage in wire ropes mostly rely on noise features for denoising. These methods typically assume that the noise pattern is stable and possesses a single characteristic. However, in actual inspection images, noise often becomes distorted due to unstable operating conditions and data acquisition conditions. Furthermore, defect localization methods for denoised images usually assume a very high signal-to-noise ratio and the absence of significant residual noise. However, when distorted noise is present, the denoised image inevitably contains some residual noise patterns. Therefore, existing defect localization methods are not suitable for locating defects in denoised images containing residual noise. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method for detecting magnetic leakage image defects in wire ropes under distortion noise. Under distortion noise, the magnetic leakage signal is converted into an image, and the defect location is located by image processing, thus having better noise resistance.
[0007] To achieve the above-mentioned objective, the present invention provides a method for detecting magnetic flux leakage image defects in steel wire ropes under distorted noise, characterized by comprising the following steps:
[0008] (1) Acquire leakage magnetic signal;
[0009] The leakage magnetic field signal of the saturated magnetized steel wire rope is collected using M Hall sensors. N sets of original leakage magnetic field signals are obtained by sampling at equal time. The leakage magnetic field signal collected at the t-th sampling time is denoted as x[m,t], where m=1,2,…,M,t=1,2,…,T;
[0010] (2) Preprocessing of leakage magnetic signal;
[0011] (2.1) Perform detrending processing on each leakage magnetic signal;
[0012] The leakage magnetic signal x[m,t] is filtered from each path using a moving average filter to obtain the baseline b[m,t]. The original signal is then subtracted from the baseline signal to obtain the detrended leakage magnetic signal, i.e., y[m,t] = x[m,t] - b[m,t].
[0013] (2.2) Use spline interpolation to convert all detrended magnetic flux leakage signals y[m,t] into H×N magnetic flux leakage images;
[0014] The M signals at each sampling time are interpolated using spline interpolation to form H leakage magnetic signals. The sampling time of each leakage magnetic signal is interpolated for N times. Then, the interpolated leakage magnetic signals are converted into a leakage magnetic image F[h,p] with a resolution of H×N, where h=1,2,3,…,H,p=1,2,3,…,N;
[0015] (2.3) Segment the magnetic flux leakage image F[h,p];
[0016] The magnetic flux leakage image F[h,p] is divided vertically into multiple image blocks of equal width, where the i-th image block is denoted as f. i [h,p],f i The size of [h,p] is H×P, where P is the length of each image patch.
[0017] (3) Constructing image blocks f using the Prewitt operator i Template response image block c of [h,p] i [h,p];
[0018]
[0019] Where w[s,r] is the element value at coordinates [s,r] in the given template, 2a+1 and 2b+1 are the width and height of the given template respectively, and a and b are coefficients;
[0020] (4) Classification of block images;
[0021] Set a threshold T1; iterate through each template response image block c. i [h,p], if c i If any element in [h,p] has a value greater than the threshold T1, then the image block f is determined to be... i If [h,p] is a defective image, proceed to step (5); otherwise, determine the image block f. i [h,p] represents a defect-free image, and then the process continues to traverse the next template response image block;
[0022] (5) For template response image block c i Perform a power-law transformation on [h,p];
[0023] g i [h,p]=c i [h,p] γ
[0024] Where γ is the power-law transform coefficient, g i [h,p] represents the image after the power-law transformation;
[0025] (6) For image g i [h,p] represents the envelope;
[0026] (6.1) Traversing image g i For each element in [h,p], take the maximum value of each element in the same row and use it as the target point of the envelope;
[0027] (6.2) Envelope Extraction: Connect the envelope target points in each row using spline interpolation to obtain the envelope image z. i [h,p];
[0028] (7) Defect location;
[0029] (7.1) Binarize the envelope image using different binarization thresholds;
[0030] First, normalize the envelope image to the 0-1 range, and then use a step size of 0.005 to gradually increase to 1 as the binarization threshold to binarize the envelope image, resulting in multiple binarized images.
[0031] (7.2) Record the number of connected regions in each binarized image;
[0032] Each binarized image is traversed using a two-pass scanning method, and the number of connected regions in each binarized image is recorded.
[0033] (7.3) Construct a lookup table for the number of connected regions;
[0034] Using the binarization threshold as the first column of data and the number of connected regions in the corresponding binarized image as the second column of data, a lookup table of the number of connected regions is constructed.
[0035] (7.4) Calculate the adaptive binarization threshold;
[0036] In the connected component count lookup table, the number of connected components is used as the number of defects;
[0037] Assuming the maximum number of defects is ε, the threshold intervals corresponding to ε, ε-1, ..., 1 are sequentially searched in the connected component number lookup table. If the corresponding threshold interval is continuous and its length is greater than the number ρ, then the corresponding interval is set as a candidate interval.
[0038] Find a candidate interval that corresponds to the maximum number of defects in the candidate interval, use it as the binarization threshold interval, and then use the median value of the binarization threshold interval as the adaptive binarization threshold μ.
[0039] (7.5) Apply the adaptive binarization threshold μ to the envelope image z again. i Binarize [h,p], and then denote the positions with a pixel value of 1 as the envelope image z. i The defect location is [h,p].
[0040] (7.6) By traversing each envelope image, the defect location of the magnetic flux leakage image is obtained.
[0041] The objective of this invention is achieved as follows:
[0042] This invention discloses a method for detecting defects in magnetic flux leakage images of steel wire ropes under distortion and noise. First, magnetic flux leakage signals are acquired. Then, preprocessing is performed using detrending and spline interpolation methods, and the preprocessed image is divided into blocks. Next, each image block is classified, and a template response image block is constructed for each image block using the Prewitt operator. After performing a power-law transform on the template response image blocks, the envelope is extracted to obtain the envelope image. Finally, defect localization is achieved on the envelope image using a binarization thresholding method.
[0043] Meanwhile, the present invention provides a method for detecting magnetic flux leakage images of steel wire ropes under distorted noise, which also has the following advantages:
[0044] Beneficial effects:
[0045] (1) This invention makes full use of the characteristics of multi-channel magnetic flux leakage data, and converts multiple sets of one-dimensional data into two-dimensional images for processing through interpolation. It also makes use of the connection between data in different channels, thereby making the defect location more accurate.
[0046] (2) In the binarization process, the present invention adopts an adaptive binarization threshold method, which avoids manually setting the threshold, improves the intelligence of the algorithm, and can detect weak defect signals under the influence of noise, thus better avoiding the occurrence of missed detection. Attached Figure Description
[0047] Figure 1 This is a flowchart of a method for detecting magnetic flux leakage images of steel wire ropes under distorted noise, according to the present invention.
[0048] Figure 2 This is a schematic diagram of leakage magnetic signal interpolation;
[0049] Figure 3 This is a schematic diagram of the Prewitt operator template;
[0050] Figure 4 This is a template matching effect diagram;
[0051] Figure 5 This is a diagram illustrating the power-law transformation effect;
[0052] Figure 6 This is an image showing the effect of capturing the envelope;
[0053] Figure 7 This is a diagram showing the effect of defect location. Detailed Implementation
[0054] The specific embodiments of the present invention will now be described with reference to the accompanying drawings to enable those skilled in the art to better understand the invention. It should be particularly noted that in the following description, detailed descriptions of known functions and designs that might obscure the main content of the invention will be omitted here.
[0055] Example
[0056] Figure 1 This is a flowchart of a method for detecting magnetic leakage image defects in steel wire ropes under distortion noise, according to the present invention.
[0057] In this embodiment, as Figure 1 As shown, the present invention provides a method for detecting magnetic flux leakage image defects in steel wire ropes under distorted noise, comprising the following steps:
[0058] S1. Acquire leakage magnetic signal;
[0059] The leakage magnetic field signal of the saturated magnetized steel wire rope is collected using M Hall sensors. T sets of original leakage magnetic field signals are obtained by sampling at equal time. The leakage magnetic field signal collected at the t-th sampling time is denoted as x[m,t], where m=1,2,…,M, t=1,2,…,T. In this embodiment, M=16 and T=9000 are taken.
[0060] S2, Preprocessing of leakage magnetic signal;
[0061] S2.1 Perform detrending processing on each leakage magnetic signal;
[0062] In this embodiment, a moving average filter with a length of 5 is used to filter the leakage magnetic signal x[m,t] on each path to obtain the baseline b[m,t]. Then, the original signal is subtracted from the baseline signal to obtain the de-trended leakage magnetic signal, i.e., y[m,t] = x[m,t] - b[m,t].
[0063] S2.2. Use spline interpolation to convert all detrended magnetic flux leakage signals y[m,t] into H×T magnetic flux leakage images;
[0064] The M signals at each sampling time are interpolated using spline interpolation to form H leakage magnetic signals, and the sampling time of each leakage magnetic signal is recorded as p. Then, the interpolated leakage magnetic signals are converted into a leakage magnetic image F[h,p] with a resolution of H×N, where h=1,2,3,…,H,p=1,2,3,…,N. In this embodiment, H=200, N=T=9000;
[0065] In this embodiment, as Figure 2 As shown, after interpolation, the data volume increases, allowing the segmented signal to be read into the form of segmented images, where... Figure 2 The diagram on the left shows how the 16 signals at each moment are interpolated to form 200 leakage magnetic signals. The diagram on the right shows the interpolation process at each moment indicated by asterisks. It can be seen that the interpolated signal passes through every point of the original 16 signals.
[0066] S2.3. Segment the magnetic flux leakage image F[h,p];
[0067] The magnetic flux leakage image F[h,p] is divided vertically into multiple image blocks of equal width, where the i-th image block is denoted as f. i [h,p],f i The size of [h,p] is H×P, where P is the length of each image patch. In this embodiment, P = 200;
[0068] S3. Construct image patch f using the Prewitt operator. i Template response image block c of [h,p] i[h,p];
[0069]
[0070] Where w[s,r] is the element value at coordinates [s,r] in the given template, 2a+1 and 2b+1 are the width and height of the given template respectively, and a and b are coefficients. In this embodiment, a = b = 4.
[0071] In this embodiment, Figure 3 (a) is a typical image of a defect. Figure 3 (b) is the grayscale distribution of the defect image. An extended version of the Prewitt operator in edge detection is used as the filter template, which is a 9*9 symmetrical filter template, as shown below. Figure 3 As shown in (c), then Figure 3 The filter template shown in (c) is represented by a 3D diagram as follows: Figure 3 As shown in (d), it can be seen that the amplitude distribution of the filter template designed in this invention is quite consistent with that of the defect image, thus enabling better extraction of the template response value;
[0072] To obtain a filtered result of the same size as the original image, the image is expanded before filtering. First, the image is expanded 4 pixels to the left and right, and its values are replaced with the nearest neighbor pixel values from the original image. The same operation is then performed on the top and bottom sides of the image to obtain the expanded image. The expanded image is then convolved using a template. The absolute value of the convolved image is then taken to eliminate the influence of the defect direction on the response value. This method transforms the defect region into an image region with a higher response value. The effect of template matching is shown below. Figure 4 As shown, where, Figure 4 (a) The left side of the image shows the unprocessed image patch after segmentation. Figure 4 (a) The right-hand diagram is a three-dimensional representation of the left-hand diagram; Figure 4 (b) The left side of the image shows the image patch after the filter template has been processed. Figure 4 (b) The right-hand diagram is a three-dimensional representation of the left-hand diagram;
[0073] S4. Classification of block images;
[0074] For a segmented image without defects, the entire image will not have a large response value after template matching. Therefore, we can use this feature to filter out segmented template response images with large response values by setting a threshold, and then treat them as defective images for further processing.
[0075] In this embodiment, the threshold T1 is set to 1500; each template response image block c is traversed. i [h,p], if c iIf any element in [h,p] has a value greater than the threshold T1, then the image block f is determined to be... i [h,p] represents a defective image, then proceed to step S5; otherwise, determine image block f. i [h,p] represents a defect-free image, and then the process continues to traverse the next template response image block;
[0076] S5, Responding to template image block c i Perform a power-law transformation on [h,p];
[0077] g i [h,p]=c i [h,p] γ
[0078] Where γ is the power-law transform coefficient, g i [h,p] represents the image after the power-law transformation;
[0079] In this embodiment, γ is set to 2. Therefore, the result of the power-law transform of a template response image block is as follows: Figure 5 As shown, where, Figure 5 The left image shows the result of power-law transformation of the template response image block, and the right image is a 3D representation of the left image; compared to Figure 4 (b) shows that under the influence of power-law transformation Figure 5 The noise around the defect was significantly reduced, thus achieving a good noise reduction effect.
[0080] S6, for image g i [h,p] represents the envelope;
[0081] S6.1 Traversing the image g i For each element in [h,p], take the maximum value of each element in the same row and use it as the target point of the envelope;
[0082] S6.2. Envelope Extraction: Connect the envelope target points in each row using spline interpolation to obtain the envelope image z. i [h,p];
[0083] In this embodiment, the effect of image envelope extraction is as follows: Figure 6 As shown, Figure 6 The left image shows the result of taking the envelope of the image after power-law transformation, and the right image is a 3D representation of the left image; compared to Figure 5 , Figure 6 As you can see, the defect pattern that was originally composed of three vertical white lines has become a single white spot.
[0084] S7. Defect location;
[0085] S7.1. Binarize the envelope image using different binarization thresholds;
[0086] First, normalize the envelope image to the 0-1 range, and then use a step size of 0.005 to gradually increase to 1 as the binarization threshold to binarize the envelope image, resulting in multiple binarized images.
[0087] S7.2 Record the number of connected regions in each binarized image;
[0088] Each binarized image is traversed using a two-pass scanning method, and the number of connected regions in each binarized image is recorded.
[0089] S7.3 Construct a lookup table for the number of connected components;
[0090] Using the binarization threshold as the first column of data and the number of connected regions in the corresponding binarized image as the second column of data, a lookup table of the number of connected regions is constructed.
[0091] S7.4 Calculate the adaptive binarization threshold;
[0092] In the connected component count lookup table, the number of connected components is used as the number of defects;
[0093] Assuming the maximum number of defects is ε (generally no more than 3), the threshold intervals corresponding to ε, ε-1, ..., 1 are sequentially searched in the connected component lookup table. If the corresponding threshold interval is continuous and its length is greater than the number ρ = 20, then the corresponding interval is set as the candidate interval.
[0094] Find a candidate interval that corresponds to the maximum number of defects in the candidate interval, use it as the binarization threshold interval, and then use the median value of the binarization threshold interval as the adaptive binarization threshold μ.
[0095] For example, let's define the maximum possible number of defects in an image patch as 3. We then search for the corresponding binarization threshold intervals from 1 to 3. Assume the search results are as follows: 0 defects correspond to a threshold of 0.005 (one threshold number); one defect corresponds to a threshold of 0.01-0.03 (5 threshold numbers = 1 + 0.02 / 0.005); two defects correspond to a threshold of 0.035-0.140 (22 threshold numbers = 1 + 0.105 / 0.005); and three defects correspond to a threshold of 0.145-0.165 (5 threshold numbers). This yields three candidate threshold intervals. Starting with the maximum possible number of defects, we determine if the interval satisfies the condition of being continuous and having a length greater than 20. For example, 3 defects only correspond to 5 threshold numbers, so this condition is not met and we skip it. Moving down, 2 defects correspond to 22 threshold numbers, satisfying the condition. Therefore, this candidate interval is used as the final binarization threshold interval, and the median of this interval is taken as the adaptive threshold.
[0096] S7.5, Apply the adaptive binarization threshold μ to the envelope image z again. i Binarize [h,p], and then denote the positions with a pixel value of 1 as the envelope image z. i The defect location is [h,p].
[0097] S7.6. After traversing each envelope image, repeating steps S3-S7 completes the processing of the entire magnetic flux leakage image, thereby obtaining the defect locations in the magnetic flux leakage image, such as... Figure 7 As shown, Figure 7 The left image shows the effect after defect localization, and the right image is a 3D representation of the left image; compared to Figure 6 As you can see, Figure 7 The defects in the image, after binarization, are represented as single white connected regions, and... Figure 6 Noise in the image is removed by an adaptive binarization method.
[0098] Although the illustrative specific embodiments of the present invention have been described above to enable those skilled in the art to understand the invention, it should be understood that the invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the invention as defined and determined by the appended claims, and all inventions utilizing the concept of the present invention are protected.
Claims
1. A method for detecting magnetic flux leakage image defects in steel wire ropes under distortion and noise, characterized in that, Includes the following steps: (1) Acquire leakage magnetic field signal; use The Hall effect sensor collects the leakage magnetic signal of a saturated magnetized steel wire rope and obtains it through equal-time sampling. The group of original leakage magnetic signals, of which, the first The sampling time was used to collect the first... The leakage magnetic signal is denoted as , ; (2) Preprocessing of leakage magnetic field signal; (2.1) Perform detrending processing on each leakage magnetic signal; Using a moving average filter to analyze the leakage magnetic signal from each path Filtering is performed to obtain the baseline. Then, subtract the baseline signal from the original signal to obtain the detrended leakage magnetic field signal, i.e. ; (2.2) Use spline interpolation to analyze all detrended leakage magnetic signals. Transform into Magnetic leakage image; The M-channel signals at each sampling time are interpolated using spline interpolation to form H-channel leakage magnetic signals, and the sampling time of each leakage magnetic signal is interpolated. At each moment, the interpolated magnetic leakage signal is then converted to a resolution of [resolution value missing]. magnetic flux leakage image , , ; (2.3) For magnetic flux leakage images Perform segmentation; magnetic flux leakage image The image is divided vertically into multiple blocks of equal width, where the first... The image blocks are denoted as , The size is P is the length of each image patch. ; (3) Constructing image patches using the Prewitt operator Template response image blocks ; ; in, Coordinates in a given template The element value at position 2 +1 and 2 +1 represents the width and height of the given template, respectively. , For coefficients; (4) Classification of block images; Set a threshold T1; iterate through each template response image patch. ,like If any element in the image has a value greater than the threshold T1, then the image patch is determined. If the image is defective, proceed to step (5); otherwise, determine the image block. The image is defect-free, and then the process continues to traverse the next template response image block; (5) Response image blocks to template Perform a power-law transformation; ; in, For the power-law transform coefficients, The image after power-law transformation; (6) For the image Take the envelope; (6.1) Traversing the image For each element in a row, take the maximum value of each element in the row and use it as the target point of the envelope; (6.2) Envelope Extraction: Connect the envelope target points in each row using spline interpolation to obtain the envelope image. ; (7) Defect location; (7.1) Binarize the envelope image using different binarization thresholds; First, normalize the envelope image to the 0-1 range, and then use a step size of 0.005 to gradually increase to 1 as the binarization threshold to binarize the envelope image, resulting in multiple binarized images. (7.2) Record the number of connected regions in each binarized image; Each binarized image is traversed using a two-pass scanning method, and the number of connected regions in each binarized image is recorded. (7.3) Construct a lookup table for the number of connected components; Using the binarization threshold as the first column of data and the number of connected regions in the corresponding binarized image as the second column of data, a lookup table of the number of connected regions is constructed. (7.4) Calculate the adaptive binarization threshold; In the connected component count lookup table, the number of connected components is used as the number of defects; Assume the maximum number of defects is Then search sequentially in the connected component lookup table. The corresponding threshold interval, if the corresponding threshold interval is continuous and its length is greater than the number of intervals. If so, the corresponding interval will be set as the candidate interval; Find a candidate interval that corresponds to the maximum number of defects among the candidate intervals, and use it as the binarization threshold interval. Then, use the median value of the binarization threshold interval as the adaptive binarization threshold. ; (7.5) Using adaptive binarization threshold For the envelope image again Binarize the image, and then record the positions with a pixel value of 1 as the envelope image. The location of the defect; (7.6) By traversing each envelope image, the defect location of the magnetic flux leakage image is obtained.