CN111882518B - Self-adaptive pseudo-colorization method for magnetic flux leakage data - Google Patents

Self-adaptive pseudo-colorization method for magnetic flux leakage data Download PDF

Info

Publication number
CN111882518B
CN111882518B CN202010517387.3A CN202010517387A CN111882518B CN 111882518 B CN111882518 B CN 111882518B CN 202010517387 A CN202010517387 A CN 202010517387A CN 111882518 B CN111882518 B CN 111882518B
Authority
CN
China
Prior art keywords
value
gray
magnetic flux
flux leakage
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010517387.3A
Other languages
Chinese (zh)
Other versions
CN111882518A (en
Inventor
王建丰
唐建华
林晓
赵可天
王增国
薛申才
王丹丹
王怀江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CNOOC Energy Development of Equipment and Technology Co Ltd
CNOOC China Ltd
CNOOC Inspection Technology Co Ltd
Original Assignee
CNOOC Energy Development of Equipment and Technology Co Ltd
CNOOC China Ltd
CNOOC Inspection Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CNOOC Energy Development of Equipment and Technology Co Ltd, CNOOC China Ltd, CNOOC Inspection Technology Co Ltd filed Critical CNOOC Energy Development of Equipment and Technology Co Ltd
Priority to CN202010517387.3A priority Critical patent/CN111882518B/en
Publication of CN111882518A publication Critical patent/CN111882518A/en
Application granted granted Critical
Publication of CN111882518B publication Critical patent/CN111882518B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Investigating Or Analyzing Materials By The Use Of Magnetic Means (AREA)

Abstract

The invention discloses a self-adaptive pseudo-colorization method for magnetic flux leakage data, which is used for carrying out basic value correction and denoising pretreatment on the magnetic flux leakage data; classifying and graying the preprocessed magnetic flux leakage data to generate a gray image; dividing the generated gray image by two methods, dividing the generated gray image into two parts according to a gray threshold value, and respectively carrying out binarization division on the two parts of images by adopting an Otsu algorithm to obtain a background region gray interval endpoint value; dividing the gray image according to the class label to obtain C 2 To C k The gray maximum value corresponding to the category is used as a gray interval boundary value; combining the background region gray scale interval endpoint value, the gray scale interval boundary value and C 1 The class corresponds to the extreme value of the gray value of the pixel point to obtain each endpoint value of the gray interval; and adjusting pseudo-color coding according to each endpoint value of the gray scale interval and performing pseudo-colorization processing on the gray scale image. The false color image has clear defect characteristics, clear boundary and high boundary identification degree.

Description

Self-adaptive pseudo-colorization method for magnetic flux leakage data
Technical Field
The invention relates to the field of pipeline nondestructive detection and data visualization, in particular to a magnetic flux leakage data self-adaptive pseudo-colorization method.
Background
At present, deep sea oil and gas pipelines work in severe submarine environments all the year round, are easily influenced by complex environments such as high pressure and high corrosion on the seabed, and once leakage occurs, the pipelines are subjected to extremely large ecological pollution and energy waste, so that nondestructive detection is particularly necessary.
The magnetic flux leakage detection technology is one of the common technologies for detecting defects of pipelines. With the improvement of hardware technology and sensor manufacturing process, remote pipeline detection has become reality, and the number and sensitivity of the arranged sensors are greatly improved, so that fine defects or other pipeline state information can be detected more accurately. In order to facilitate more visual observation and analysis of pipeline detection data, defect detection, size inversion and the like, a reasonable method is adopted to carry out visualization processing on magnetic flux leakage data. Common magnetic flux leakage data visualization methods include curve view, gray scale view, pseudo color view, and the like.
In the field of pseudo-color image processing of magnetic flux leakage data, a traditional data pseudo-color processing method adopting gray value segmentation divides gray value boundaries singly, and most of the traditional data pseudo-color processing method is poor in processing effect on defect boundary areas, only axial data is usually considered, and the traditional data pseudo-color processing method is not suitable for pseudo-colorization under current triaxial magnetic flux leakage data. The common magnetic flux leakage data pseudo-color view display is characterized by the characteristic loss caused by gray linear stretching, so that the characteristics of a small defect area cannot be normally displayed, the boundary is fuzzy, the pipeline state information cannot be completely reflected, visual observation and subsequent pipeline defect detection are not easy, and the like.
Disclosure of Invention
Aiming at the problem that the areas on two sides of the defect, which are presented in the pseudo-colorization process of the magnetic flux leakage data gray level image by the traditional rainbow coding method, are similar to the background color of the image, and particularly the problem that the boundary resolution of the smaller defect area is not high, the invention provides the self-adaptive pseudo-colorization method for the magnetic flux leakage data, which is higher in the degree of differentiation of the areas such as the pipeline defect and the welding seam and the boundary color thereof, for solving the technical problems existing in the prior art.
The invention adopts the technical proposal for solving the technical problems in the prior art that: a magnetic flux leakage data self-adaptive pseudo-colorization method, carry on basic value correction and denoising preconditioning to the magnetic flux leakage data; classifying the preprocessed magnetic flux leakage data, setting the classification class number as k, and correspondingly setting class labels as C i I=1, 2 … k, where C 1 All the magnetic flux leakage data of the category are positioned in the defect-free area, and part or all of the magnetic flux leakage data of other categories are positioned in the defect area; carrying out graying treatment on the preprocessed magnetic flux leakage data to generate a gray image; dividing the generated gray level image by adopting two methods respectively, wherein the first dividing method is as follows: setting a gray threshold, dividing the generated gray image into two parts according to the gray threshold, and respectively carrying out binarization division on the two parts of images by adopting an Otsu algorithm to obtain a background region gray interval endpoint value; the second segmentation method is as follows: dividing the gray level image according to the magnetic flux leakage data type label, and dividing C 2 To C k The gray maximum value corresponding to the category magnetic flux leakage data is used as a gray interval boundary value; combining the background region gray scale interval endpoint value, the gray scale interval boundary value and C 1 The class corresponds to the pixel gray value extremum to obtain each endpoint value of the segmented gray interval; and adjusting pseudo-color coding according to each endpoint value of the gray scale interval and performing pseudo-colorization processing on the gray scale image.
Further, the method for performing basic value correction and denoising pretreatment on the magnetic flux leakage data of each sampling point comprises the following steps:
step A-1, performing basic value calibration on the magnetic flux leakage data of each sampling point by adopting an average median method;
and step A-2, denoising the magnetic flux leakage data after the base value calibration by adopting a wavelet threshold denoising method.
Further, the method for classifying the preprocessed magnetic flux leakage data comprises the following steps:
step B-1, setting a classification category number k;
b-2, classifying the axial, radial and circumferential magnetic flux leakage detection data of a pipe section according to the methods of the step B-2-1 and the step B-2-2 to obtain the types of the axial, radial and circumferential magnetic flux leakage data corresponding to the sampling points; wherein:
step B-2-1, classifying the magnetic flux leakage data of the sampling points corresponding to any channel according to the following method to obtain the type of the magnetic flux leakage data of the sampling points corresponding to the channel:
setting amplitude threshold V δ Let the median value of the signals of the current pipe section be V s-mid Judging whether the magnetic flux leakage data amplitude of the sampling point is positioned at V s-mid ±V δ In the range of/2;
if yes, the magnetic flux leakage data category of the sampling point is:
if not, the magnetic flux leakage data category of the sampling point is:
wherein C is i,j Class label for sampling data of i-type sensor at j-position of mileage sampling point, V i,j For the signal amplitude of the i-sensor at the j position of the mileage sampling point, V s-mid Median signal of current pipe section, V s-max ,V s-min The maximum value and the minimum value of the signal respectively correspond to the current pipe section, and a, b, c, d are all adjusting factors smaller than 1;
b-2-2, taking the maximum value of each channel class as the class of the sampling point for any sampling point;
and B-3, taking the maximum value of the axial, radial and circumferential categories of the sampling points as the comprehensive category of the magnetic flux leakage data of the sampling points, and obtaining the final category label of the magnetic flux leakage data of each sampling point of the pipe section.
Further, in the step B-1, the method for setting the classification category number k is as follows:
wherein V is n_max And V n_min Corresponding to maximum and minimum values of signals representing n pipe sections obtained by random sampling, V peak And V valley Corresponding to the peak value and the valley value of the signal amplitude corresponding to the smaller defect in the N pipe sections obtained by the obtained random sampling, wherein N is an intermediate variable and N is class The number of quantization layers to be set to represent the defect, k is the number of classification categories, and floor represents rounding by rounding.
Further, the method for carrying out gray scale processing on the preprocessed magnetic flux leakage data comprises the following steps:
step C-1, setting a window adjustment amplitude threshold, setting the size of an initial sliding window, and expanding the boundary of the magnetic flux leakage data;
c-2, comparing the extreme value difference of the magnetic flux leakage data amplitude value in the current window with the window adjustment amplitude value threshold value, and adjusting the window size until the data boundary if the extreme value difference is smaller than or equal to the window adjustment amplitude value threshold value; c-3, if the extremum difference is larger than the window adjustment amplitude threshold value;
c-3, correcting the extreme value of the magnetic flux leakage data amplitude value in the current window by adopting an adjusting factor so as to realize gray value compensation;
and C-4, segmenting the magnetic flux leakage data of any sampling point in the current window according to the magnitude relation between the amplitude value of the magnetic flux leakage data and the median value of the amplitude value of the magnetic flux leakage data in the channel, and performing local segmentation gray level mapping.
Further, the magnetic flux leakage data after the segmented gray mapping processing is further processed by a gray segmentation transformation method, wherein the gray segmentation transformation method comprises the following steps:
set C 2 The magnetic flux leakage data of the category is partially positioned in the defect-free area and partially positioned in the defect area; c (C) 3 To C k All the magnetic flux leakage data of the category are positioned in the defect area;
when the category label is C 1 、C 2 When the gray level segmentation transformation formula is:
when the category label is C 3 To C k When the gray level segmentation transformation formula is:
wherein R is s As scale factor, R b As scale factor, G cv G is the median gray value i,j G is the gray mapping value of the i-number sensor at the j position of the mileage sampling point i,j ' is the value obtained after the segmentation gray mapping of the sampling point, h 1 、h 2 For the amplification factor, λ, γ are exponentiations.
Further, in the step C-3, the method for correcting the extreme value of the magnetic flux leakage data amplitude in the current window by adopting the adjusting factor comprises the following steps:
wherein V is w-max-c Representing the corrected local window maximum amplitude mapping value; v (V) w-min-c Representing the corrected local window minimum amplitude mapping value; v (V) w-max Representing a local window maximum amplitude mapping value before correction; v (V) w-min Representing a local window minimum amplitude mapping value before correction; alpha, beta are regulating factors; r is R a Representing a deviation coefficient; v (V) max Representing the maximum value in the leakage flux data of the current pipe section, V min Representing the minimum value in the current pipe segment leakage data.
Further, in the step C-4, the method of the local segment gray level mapping is as follows:
wherein G is i,j The gray value of the i sensor after the signal gray conversion at the j position of the mileage sampling point; g m Is the maximum gray value; g cv Is the gray median value; v (V) i,j For the signal amplitude of the i-sensor at the j position of the mileage sampling point, V m_i For median amplitude of channel i, V max For the maximum value of the signal amplitude of the current pipe section, V min Is the minimum value of the signal amplitude of the current pipe section.
Further, the first segmentation method comprises the following steps:
step D-1, dividing the gray level image of the magnetic flux leakage data into two parts, namely an image I, by taking the gray median value as a gray level threshold value 1 And image I 2 Wherein, the method comprises the steps of, wherein,
wherein G is cv Is the median of gray scale, G i,j The gray value of the i sensor after the signal gray conversion at the j position of the mileage sampling point; i 1 (I, j) is the gray value of the image with smaller gray value after division, I 2 (i, j) is the gray value of the image with larger gray value after segmentation;
step D-2, for image I 1 And image I 2 Binarization segmentation is carried out by adopting an Otsu algorithm to obtain a background region gray scale interval [ g ] l ,g h ]The method comprises the steps of carrying out a first treatment on the surface of the The specific method comprises the following steps:
image I is first segmented using the Otsu algorithm 1 Let it share [0, L]Gray scale, computing image I 1 Is a gray value probability distribution;
set image I 1 There is a gray threshold G thr Image I 1 Dividing the gray value of the pixel point into two classes according to the gray threshold value, and respectively setting the two classes asAnd->The gray value interval corresponds to [0,G ] thr ) And [ G ] thr ,L]The gray value of any pixel point is distributed in the classProbability in interval, distributed in +.>The gray level average of the interval and the whole image is further obtained +.>Sum of pixel variances of interval +.>Let->Taking the maximum value to obtain an image I 1 Gray threshold G of (2) thr From image I 1 Gray threshold G of (2) thr Obtaining image I 1 Gray scale division threshold g of (2) l
Employing and image I 1 The same processing method is used for image I 2 Image segmentation is carried out to obtain an image I 2 Gray scale division threshold g of (2) h ;[g l ,g h ]The interval is the background area of the gray image g l 、g h The corresponding value is the endpoint value of the gray scale interval of the background area.
Further, the pseudo-colorization processing method for the gray image comprises the following steps:
step E-1, taking C 1 The minimum and maximum values of the gray values of the pixel points corresponding to the categories are respectively marked as c min 、c max C is taken respectively 1 The maximum value of the gray value of the corresponding pixel point of the other types is denoted as (c) as the boundary value of the gray interval 2 ,c 3 ,...,c k ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein k is the number of classification categories;
e-2, combining the background region gray scale interval end point value, the gray scale interval boundary value and C 1 Class corresponds to the extreme value of the gray value of the pixel point to obtain the endpoint value l of the gray interval 1 、l 2 、l 3 、l 4
l 1 =max(g l ,c min ),l 2 =max(g h ,c max ),l 3 =min(c 2 ,c 3 ),l 4 =min(c 4 ,c 5 );
E-3, according to each endpoint value of the gray scale interval, adopting the following method to adjust pseudo-color coding, and carrying out pseudo-colorization treatment on the magnetic flux leakage data gray scale image;
the R component mapping relation is adjusted as follows:
the G component mapping relationship is adjusted as follows:
the B component mapping relationship is adjusted as follows:
wherein C is B (i, j) is the pixel value of the B component of the mapped pseudo-color image at point (i, j), C G (i, j) is the pixel value of the G component of the mapped pseudo-color image at point (i, j), C R (i, j) is the pixel value of the R component of the mapped pseudo-color image at point (i, j), l 1 、l 2 、l 3 、l 4 G is the end point value of gray scale interval i,j And the gray value after the gray conversion of the signal of the sensor i at the position j of the mileage sampling point is obtained.
The invention has the advantages and positive effects that: based on the rainbow coding method, consider the defective area characteristic of the gray image of the magnetic flux leakage data, adopt the triaxial label of axial, radial, circumference and mode that the variance method combines with maximum between-class to obtain the gray level interval of gray image adaptively, in order to realize the self-adaptive pseudo-colorization of the gray image of the magnetic flux leakage data, can adjust the mapping interval adaptively as far as possible at the same time, make have higher adaptability to different magnetic flux leakage data, its advantage is:
first, compared with the original rainbow coding method, the magnetic flux leakage data obtained after the algorithm processing is improved by the invention has clear defect characteristics, clear boundary and higher boundary identification.
Second, compared with the original rainbow coding method, the pseudo-color image obtained by the improved algorithm of the invention obviously weakens the coincidence degree of the background color and the defect area of the image, so that the defect boundary is clearly visible.
Third, the improved pseudo-colorization method of the present invention has adaptive properties, and improves color discrimination.
Drawings
FIG. 1 is a flow chart of a method for adaptive pseudo-colorization of magnetic flux leakage data according to the present invention;
FIG. 2 is a graph of a gray scale image of the pipeline leakage data segmented using a gray scale image binary segmentation method;
FIG. 3 is the image of FIG. 2 after segmentation by the Otsu algorithm;
FIG. 4 is a pseudo color image after pseudo color visualization of channel axial leakage data using the improved pseudo color encoding method of the present invention;
fig. 5 is a graph comparing the effect of the conventional rainbow coding method and the improved pseudo-color coding method according to the present invention on the visualization of the channel radial magnetic flux leakage data pseudo-color.
FIG. 6 is a graph showing the comparison of the effect of the conventional rainbow coding method and the improved pseudo-color coding method of the invention on the visualization of the circumferential magnetic flux leakage data of the pipeline.
Detailed Description
For a further understanding of the invention, its features and advantages, reference is now made to the following examples, which are illustrated in the accompanying drawings in which:
referring to fig. 1 to 6, a method for adaptively pseudo-colorizing magnetic flux leakage data performs basic value correction and denoising pretreatment on the magnetic flux leakage data; classifying the preprocessed magnetic flux leakage data, setting the classification class number as k, and correspondingly setting class labels as C i I=1, 2 … k, where C 1 All the magnetic flux leakage data of the category are positioned in the defect-free area, and part or all of the magnetic flux leakage data of other categories are positioned in the defect area; carrying out graying treatment on the preprocessed magnetic flux leakage data to generate a gray image; dividing the generated gray level image by adopting two methods, wherein the first dividing method is as follows: setting a gray threshold, dividing the generated gray image into two parts according to the gray threshold, and respectively carrying out binarization division on the two parts of images by adopting an Otsu algorithm to obtain a background region gray interval endpoint value; second segmentation methodThe method comprises the following steps: dividing the gray level image according to the magnetic flux leakage data type label, and dividing C 2 To C k The gray maximum value corresponding to the category magnetic flux leakage data is used as a gray interval boundary value; combining the background region gray scale interval endpoint value, the gray scale interval boundary value and C 1 The class corresponds to the pixel gray value extremum to obtain each endpoint value of the segmented gray interval; and adjusting pseudo-color coding according to each endpoint value of the gray scale interval and performing pseudo-colorization processing on the gray scale image.
The traditional pseudo-color coding method comprises a rainbow coding method and the like, and the pseudo-color processing method of the gray image adopts a mode of combining a class label and a maximum inter-class variance method to adaptively acquire a gray level interval of the gray image, adjusts the pseudo-color coding according to each endpoint value of the gray level interval, and adjusts and improves the traditional pseudo-color coding method.
The magnetic flux leakage data amplitude of the non-defective area with stable signal amplitude can be taken as an amplitude reference value, class labels of the magnetic flux leakage data of the sampling points are divided and set according to the difference value between the magnetic flux leakage data amplitude of the sampling points and the reference value, and the class numbers are larger when the difference value is larger; setting the type label of the magnetic flux leakage data of the defect-free area as C 1 。C i The larger the i value is, the larger the difference value between the amplitude of the magnetic flux leakage data of the sampling point and the reference value is.
Preferably, the method for performing basic value correction and denoising pretreatment on the magnetic flux leakage data of each sampling point can comprise the following steps:
step A-1, carrying out basic value calibration on the magnetic flux leakage data of each sampling point by adopting an average median method;
and step A-2, denoising the magnetic flux leakage data after the base value calibration by adopting a wavelet threshold denoising method.
Preferably, the method for classifying the preprocessed magnetic flux leakage data may include the steps of:
step B-1, setting a classification category number k;
b-2, classifying the axial, radial and circumferential magnetic flux leakage detection data of a pipe section according to the methods of the step B-2-1 and the step B-2-2 to obtain the types of the axial, radial and circumferential magnetic flux leakage data corresponding to the sampling points; wherein:
step B-2-1, classifying the magnetic flux leakage data of the sampling points corresponding to any channel according to the following method to obtain the type of the magnetic flux leakage data of the sampling points corresponding to the channel:
setting amplitude threshold V δ Let the median value of the signals of the current pipe section be V s-mid Judging whether the magnetic flux leakage data amplitude of the sampling point is positioned at V s-mid ±V δ In the range of/2;
if yes, the magnetic flux leakage data category of the sampling point is:
if not, the magnetic flux leakage data category of the sampling point is:
wherein C is i,j Class label for sampling data of i-type sensor at j-position of mileage sampling point, V i,j For the signal amplitude of the i-sensor at the j position of the mileage sampling point, V s-mid Median signal of current pipe section, V s-max ,V s-min The maximum value and the minimum value of the signal respectively correspond to the current pipe section, and a, b, c, d are all adjusting factors smaller than 1; the values of a and b are 0.8-0.99. The values of c and d are 0.8-1.1.
B-2-2, taking the maximum value of each channel class as the class of the sampling point for any sampling point;
and B-3, taking the maximum value of the axial, radial and circumferential categories of the sampling points as the comprehensive category of the magnetic flux leakage data of the sampling points, and obtaining the final category label of the magnetic flux leakage data of each sampling point of the pipe section.
Preferably, in the step B-1, the method for setting the classification category number k is as follows:
wherein V is n_max And V n_min Corresponding to maximum and minimum values of signals representing n pipe sections obtained by random sampling, V peak And V valley Corresponding to the peak value and the valley value of the signal amplitude corresponding to the smaller defect in the N pipe sections obtained by the obtained random sampling, N is generally 5-20, N is an intermediate variable, N class The number of quantization layers to be set to represent the defect, N class Generally, the number of classification categories is 4 to 6,k, and floor represents rounding by rounding.
Preferably, the method for graying the preprocessed magnetic flux leakage data comprises the following steps:
step C-1, setting a window adjustment amplitude threshold, setting the size of an initial sliding window, and expanding the boundary of the magnetic flux leakage data; to ensure the effectiveness of window adjustment, the magnitude of the window adjustment amplitude threshold depends on the magnitude of the defect in the collected pipeline original data, and is generally taken to be 0.3-0.5. The initial sliding window size can be set to be L w Width is W w In order to avoid the problems of incapability of processing the array boundary and the like caused by boundary overflow, boundary expansion is firstly carried out on the preprocessed magnetic flux leakage data to be processed, and L is respectively expanded at the left side and the right side w 2 mileage points, the upper and lower sides are respectively extended by W w And/2 channels. Window length L according to amplitude fluctuation characteristics of magnetic leakage signals and distribution characteristics of sensors in the inner detector w Depending mainly on the defect length, typically 20 to 60; window width W w Mainly depending on the defect depth, generally taking 6-18;
step C-2, comparing the extreme value difference of the magnetic flux leakage data amplitude value in the current window with the window adjustment amplitude value threshold value, and if the extreme value difference is smaller than or equal to the window adjustment amplitude value threshold value, adaptively adjusting the window size, and expanding the length by delta l Wide extensible delta w And (5) re-judging and expanding until the data boundary. Single window size adjustment mileage point delta l In the range of about 5 to 20, the number of channels delta w C-3, if the extremum difference is larger than the window adjustment amplitude threshold value, the range is about 2-6;
c-3, correcting the extreme value of the magnetic flux leakage data amplitude value in the current window by adopting an adjusting factor so as to realize gray value compensation;
and C-4, segmenting the magnetic flux leakage data of any sampling point in the current window according to the magnitude relation between the amplitude value of the magnetic flux leakage data and the median value of the amplitude value of the magnetic flux leakage data in the channel, and performing local segmentation gray level mapping.
Preferably, the magnetic flux leakage data after the segmented gray mapping process is further processed by a gray segment transformation method, wherein the gray segment transformation method is as follows:
set C 2 Some of the magnetic flux leakage data of the category are positioned in the defect-free area, and some of the magnetic flux leakage data of the category are positioned in the defect area; c (C) 3 To C k All the magnetic flux leakage data of the category are positioned in the defect area;
when the category label is C 1 、C 2 When the gray level segmentation transformation formula is:
when the category label is C 3 To C k When the gray level segmentation transformation formula is:
wherein R is s As a scale factor, generally taking 2 to 8; r is R b The scale factor is generally 2 to 8.G cv G is the median gray value i,j G is the gray mapping value of the i-number sensor at the j position of the mileage sampling point i,j ' is the value obtained after the segmentation gray mapping of the sampling point, h 1 、h 2 For the amplification factor, λ, γ are exponentiations. h is a 1 、h 2 Typically 0.7 to 1.4; λ and γ are usually 0.8-1.2, and are generally about 1, and should not be too large or too small, otherwise image distortion is easily caused; r is R b Generally 2 to 8 are taken.
Preferably, in step C-3, the method for correcting the extreme value of the magnetic flux leakage data amplitude in the current window by adopting the adjusting factor can be as follows:
wherein V is w-max-c Representing the corrected local window maximum amplitude mapping value; v (V) w-min-c Representing the corrected local window minimum amplitude mapping value; v (V) w-max Representing a local window maximum amplitude mapping value before correction; v (V) w-min Representing a local window minimum amplitude mapping value before correction; alpha and beta are regulating factors, and the value is usually 0.8-1.4; r is R a Representing the deviation coefficient, the value is usually 2-10, V max Representing the maximum value in the leakage flux data of the current pipe section, V min Representing the minimum value in the current pipe segment leakage data.
Preferably, in the step C-4, the method of the local segment gray mapping can be:
wherein G is i,j The gray value of the i sensor after the signal gray conversion at the j position of the mileage sampling point; g m The maximum gray value is the 8-bit pixel lower value of 255; g cv Is the gray median value; usually takes a value of 50 to 100; v (V) i,j For the signal amplitude of the i-sensor at the j position of the mileage sampling point, V m_i For median amplitude of channel i, V max For the maximum value of the signal amplitude of the current pipe section, V min Is the minimum value of the signal amplitude of the current pipe section.
Preferably, the first segmentation method may comprise the steps of:
step D-1, dividing the gray level image of the magnetic flux leakage data into two parts, namely an image I, by taking the gray median value as a gray level threshold value 1 And image I 2 Wherein I 1 (i, j) is a scoreThe gray value of the image with smaller gray value after cutting. I 2 (i, j) is a gradation value of an image having a large gradation value after division.
Wherein G is cv Is the median of gray scale, G i,j The gray value after the signal gray conversion of the I-number sensor at the j position of the mileage sampling point is I 1 (I, j) is the gray value of the image with smaller gray value after division, I 2 (i, j) is the gray value of the image with larger gray value after segmentation;
step D-2, for image I 1 And image I 2 Binarization segmentation is carried out by adopting an Otsu algorithm to obtain a background region gray scale interval [ g ] l ,g h ]The method comprises the steps of carrying out a first treatment on the surface of the The specific method comprises the following steps:
image I is first segmented using the Otsu algorithm 1 Can be provided with a total of [0, L ]]Gray scale, computing image I 1 Is a gray value probability distribution;
settable image I 1 There is a gray threshold G thr Image I 1 Dividing the gray value of the pixel point into two classes according to the gray threshold value, and respectively setting the two classes asAnd->The gray value interval corresponds to [0,G ] thr ) And [ G ] thr ,L]The gray value of any pixel point is distributed in the class +.>Probability in interval, distributed in +.>The gray level average of the interval and the whole image is further obtained +.>Sum of pixel variances of interval +.>Let->Taking the maximum value to obtain an image I 1 Gray threshold G of (2) thr From image I 1 Gray threshold G of (2) thr Obtaining image I 1 Gray scale division threshold g of (2) l
Employing and image I 1 The same processing method is used for image I 2 Image segmentation is carried out to obtain an image I 2 Gray scale division threshold g of (2) h ;[g l ,g h ]The interval is the background area of the gray image g l 、g h The corresponding value is the endpoint value of the gray scale interval of the background area.
Preferably, the pseudo-colorization process may be adaptively performed on the gray image, and the method of pseudo-colorization process may include:
step E-1, taking C 1 The minimum and maximum values of the gray values of the pixel points corresponding to the categories are respectively marked as c min 、c max C is taken respectively 1 The maximum value of the gray value of the corresponding pixel point of the other types is denoted as (c) as the boundary value of the gray interval 2 ,c 3 ,...,c k ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein k is the number of classification categories;
step E-2, combining the background region gray scale interval end point value, gray scale interval boundary value and C 1 Class corresponds to the extreme value of the gray value of the pixel point to obtain the endpoint value l of the gray interval 1 、l 2 、l 3 、l 4
l 1 =max(g l ,c min ),l 2 =max(g h ,c max ),l 3 =min(c 2 ,c 3 ),l 4 =min(c 4 ,c 5 );
E-3, according to each endpoint value of the gray scale interval, on the basis of rainbow coding, adopting the following method to adjust pseudo-color coding, and carrying out pseudo-colorization treatment on the magnetic flux leakage data gray scale image;
the R component mapping relation is adjusted as follows:
the G component mapping relationship is adjusted as follows:
the B component mapping relationship is adjusted as follows:
wherein C is B (i, j) is the pixel value of the B component of the mapped pseudo-color image at point (i, j), C G (i, j) is the pixel value of the G component of the mapped pseudo-color image at point (i, j), C R (i, j) is the pixel value of the R component of the mapped pseudo-color image at point (i, j), l 1 、l 2 、l 3 、l 4 G is the end point value of gray scale interval i,j And the gray value after the gray conversion of the signal of the sensor i at the position j of the mileage sampling point is obtained.
The workflow and working principle of the invention are further described in the following with a preferred embodiment of the invention:
FIG. 1 is a flow chart of a method for adaptive pseudo-colorization of magnetic flux leakage data according to the present invention. The invention sets class labels for the magnetic flux leakage detection data set and classifies the class of axial, radial and circumferential magnetic flux leakage data, then carries out data graying treatment, combines an Ostu image segmentation algorithm with a class label image segmentation algorithm, carries out self-adaptive gray interval combination, and improves pseudo-color coding, thereby realizing self-adaptive visualization of pseudo-color images.
The invention discloses a self-adaptive pseudo-colorization method for magnetic flux leakage data, which specifically comprises the following steps:
and step 1, preprocessing magnetic flux leakage data.
Step 1.1, basic value calibration.
To avoid the integral drift of the amplitude of the magnetic leakage signal caused by the problems of the shift of the advancing direction of the inner detector or the sliding of the sensor, the magnetic leakage signal is detected by the sensorTaking 500 sampling points (corresponding to the actual pipe length of 1 m) as a pipe section (less than 1 m), performing data base value calibration by adopting an average median method, namely processing by taking the median value of the signal in the pipe section as a reference value, wherein the formula is as follows
Wherein B is i (j) ans The detection magnetic field intensity of the i-number sensor after the j-position of the mileage sampling point is calibrated; b (B) i (j) The detection magnetic field intensity of the sensor i, which is not calibrated at the sampling position of the mileage j; k represents the total number of sensors; b (B) i The median value of the magnetic field intensity of the sensor i; v (V) i-median A median output voltage in the pipe section for the sensor i; v (V) ref The reference voltage value of the Hall sensor is 2.5V; p is the voltage amplification of the detection circuit (typically 3); sens is the sensitivity of the Hall sensor to the input magnetic field strength and output voltage (3.125 mv/Gs).
And 1.2, adopting a wavelet threshold to reduce noise for the magnetic flux leakage data.
Step 1.2.1, selecting a proper wavelet basis function, determining a decomposition layer number NN, wherein the wavelet basis function generally selects sym3, sym4 or sym10 functions in a symN wavelet family, and the decomposition layer number N generally takes 5. The signal to be processed is subjected to N-layer wavelet decomposition by adopting discrete wavelet transformation, and a single-channel magnetic flux leakage signal f (t) discrete wavelet transformation result W (j, k) is represented by the following formula:
in the psi- (j,k) (t) * Is psi (j,k) Complex conjugate result of (t), ψ (j,k) (t) represents a discrete wavelet function.
And step 1.2.2, performing quantization processing on the obtained wavelet coefficients by applying a soft threshold method, wherein the obtained filtered wavelet coefficients are shown in a formula 4.
Where sign is a sign function, W (j, k) is a wavelet coefficient after wavelet transformation, and λ is a threshold value. The specific value of the threshold value can be obtained by searching the maximum value of the wavelet coefficient after wavelet transformation, then finding the minimum value in the maximum values, and setting the minimum value as the threshold value.
Step 1.2.3, taking the Nth layer low-frequency signal component and the processed high-frequency signal components of each layer as initial inputs, and completing signal reconstruction according to a wavelet basis function and a wavelet decomposition result, wherein the following formula 5 is shown:
where W represents the compatibility condition of the wavelet function. Thus, the single-channel magnetic flux leakage signal f' (t) after noise reduction can be obtained.
And 2, graying processing to generate a gray image.
Step 2.1, setting the size of an initial sliding window to be L w Width is W w In order to avoid boundary overflow, the matrix boundary cannot be processed and the likeThe problem is that boundary expansion is firstly carried out on the preprocessed magnetic flux leakage data to be processed, and L is respectively expanded at the left side and the right side w 2 mileage points, the upper and lower sides are respectively extended by W w And/2 channels. Window length L according to amplitude fluctuation characteristics of magnetic leakage signals and distribution characteristics of sensors in the inner detector w Depending mainly on the defect length, typically 20 to 60; window width W w Depending mainly on the depth of the defect, 6 to 18 are generally taken.
Step 2.2, judging whether the amplitude extremum difference in the current window is greater than an amplitude threshold V δ If the window size is smaller than the preset value, the window size is adaptively adjusted, and the delta is extended for a long time l Wide expansion delta w And (3) judging again until the data is bordered, otherwise, performing step 2.3. Single window size adjustment mileage point delta l In the range of about 5 to 20, the number of channels delta w In the range of about 2 to 6 to ensure the validity of window adjustment, the amplitude threshold V δ The size of the defect in the acquired pipeline original data depends on the amplitude of the defect, and is generally 0.3-0.5.
Step 2.3, maximum value V of amplitude in current window is calculated by 6 and 7 w-max Minimum value V w-min Correcting the amplitude to obtain a corrected maximum value V w-max-c Minimum value V w-min-c To achieve gray value compensation;
wherein V is w-max-c Representing the corrected local window maximum amplitude mapping value; v (V) w-min-c Representing the corrected local window minimum amplitude mapping value; alpha and beta are regulating factors, and the value is usually 0.8-1.4; r is R a The deviation coefficient is usually 2 to 10.V (V) max Represents the maximum value in the current pipe section magnetic flux leakage data, and similarly, V min Representing the minimum value in the current pipe segment leakage data.
Step 2.4, for any data point, according to the magnitude relation of the data point and the median magnitude relation of the channel magnitude, carrying out local segmentation gray level mapping by adopting a formula 8;
wherein G is i,j The gray value of the i sensor after the signal gray conversion at the j position of the mileage sampling point; g m The maximum gray value is the 8-bit pixel lower value of 255; g cv The gray median value is 50-100; v (V) i,j For the signal amplitude of the i-sensor at the j position of the mileage sampling point, V m_i For median amplitude of channel i, V max For the maximum value of the signal amplitude of the current pipe section, V min Is the minimum value of the signal amplitude of the current pipe section.
Step 2.5, determining whether the sampling point is located at V s-mid ±V δ Within the range of/2, classifying the data according to formula 9 if the data is within the range, and classifying the data according to formula 10 otherwise.
C in the above i,j And (5) a class label of the sampling data of the i-type sensor at the j position of the mileage sampling point. V (V) i,j For the signal amplitude of the i-sensor at the j position of the mileage sampling point, V s-mid Median signal of current pipe section, V s-max ,V s-min The maximum and minimum values of the signal of the current pipe section respectively. a and b are regulating factors, and the value is 0.8-0.99. c and d are also regulating factors, and the value is 0.8-1.1. K is the number of classification categories and is represented by the following formula 11.
V n_max And V n_min Respectively representing the maximum value and the minimum value of signals of n pipe sections obtained by random sampling, wherein n is generally 5-20V peak And V valley Peak and valley values of the magnitudes of smaller defects of the N pipe sections obtained by the random sampling obtained respectively, N class The number of layers to be quantized for representing the defect is generally set to 4 to 6,K as the number of categories to be classified, and floor represents rounding by rounding.
For any sampling point, taking the maximum value of each channel class as the class of the sampling point of the current mileage, and processing the radial and circumferential magnetic flux leakage detection data of the pipe section according to the steps to obtain a radial data class label C r Circumferential data class label C c And (3) carrying out category label correction by taking the maximum value of the triaxial category label to obtain the final category label C of the magnetic flux leakage data of each sampling point of the pipe section. The triaxial class labels refer to comprehensive class labels that integrate axial, radial, and circumferential class labels.
And 2.6, classifying the gray values obtained by mapping according to the triaxial data type label obtained in the step 2.5 according to formulas 12 and 13, and performing self-adaptive gray conversion to obtain a final gray image after gray conversion processing (the step can also process the original magnetic flux leakage data after the step 2.3 and before the step 2.4 to obtain a basically consistent graying effect and improve the processing efficiency).
When the label is C 1 、C 2 When the gray level segmentation conversion formula is as follows:
wherein R is s The scale factor is generally 2 to 8.G cv G is the median gray value i,j G is the gray mapping value of the i-number sensor at the j position of the mileage sampling point i,j ' is the value obtained after the piecewise gray mapping of the sample point.
When the label is C 3 ~C 7 When the gray level segmentation conversion formula is as follows:
in the formula, h 1 、h 2 For the magnification factor, it is usually 0.7 to 1.4; λ and γ are exponentiations, usually 0.8 to 1.2, and are usually around 1, and should not be too large or too small, otherwise image distortion is easily caused. R is R b The scale factor is generally 2 to 8.
And 2.7, visualizing the magnetic flux leakage data gray scale image.
Step 3, using gray median G cv Dividing the magnetic flux leakage data gray level image to be processed for gray level threshold, as shown in figure 2, to obtain an image I 1 、I 2
The segmented image is:
g in i,j The gray value after the signal gray conversion of the I-number sensor at the j position of the mileage sampling point is I 1 (i,j),I 2 (i, j) are the gray values of the images having smaller and larger gray values, respectively, after segmentation.
Step 4, for the image I respectively 1 、I 2 Binarization segmentation is carried out by adopting an Otsu algorithm, the obtained processed image is shown in figure 3, and a background area gray scale interval [ g ] is obtained at the same time l ,g h ]。
Image I is first segmented using the Otsu algorithm 1 Let it be [0, L ]]Gray level, pixel point with gray level i is set to n i The total number N of the pixel points of the current gray image can be obtained i The method comprises the following steps:
N i =n 0 +n 1 +,,,+n L (16);
at the same time can obtain image I 1 Probability distribution of gray values, i.e. probability p of occurrence of any gray value i i The method comprises the following steps:
image I 1 According to a certain gray threshold G thr Dividing the gray value of the pixel point into two typesThe gray value intervals are respectively [0,G ] thr ) And [ G ] thr ,L]The gray value of any pixel point is distributed in class +.>The probabilities of (a) are:
meanwhile, according to the above formula, it can be distributedThe gray level average value of the interval and the whole image is:
from the above results, it is possible to obtainSum of inter-class variances of intervals +.>The method comprises the following steps:
order theObtaining the image I by obtaining the maximum value 1 Gray threshold G of (2) thr
For image I 2 The image segmentation can also be performed by adopting the flow to obtain the maximum inter-class variance sumThe following are provided: />
Accordingly, the gray level division critical value g of the two images can be obtained l 、g h Wherein, image I 1 Gray threshold G of (2) thr Namely the gray level division critical value g l Image I 2 Gray threshold G of (2) thr Namely the gray level division critical value g h . Obviously, the gray value is located at [ g ] l ,g h ]The interval belongs to the signal plateau, namely the gray image background area.
Step 5, obtaining a magnetic flux leakage data triaxial category label according to the algorithm in step 2.5, and taking C 1 The minimum and maximum values of the gray values of the pixel points corresponding to the categories are respectively marked as c min 、c max C is taken respectively 2 ~C 8 The maximum class gray value is designated as (c) as the gray interval boundary value 2 ,c 3 ,...,c 8 )。
Step 6, combining the gray critical values obtained by the two methods to obtain the endpoint value l of each divided gray value interval 1 =max(g l ,c min ),l 2 =max(g h ,c max ),l 3 =min(c 2 ,c 3 ),l 4 =min(c 4 ,c 5 ). Therein (0,l) 1 ]For the assembly area such as the welding line, (l) 1 ,l 2 ]Left and right regions of defect, (l) 2 ,l 3 ]Is the background area, (l) 3 ,l 4 ]Upper and lower regions of defect, (l) 4 ,255]Is the central region of the defect.
Step 7, improving pseudo-color coding, and performing self-adaptive pseudo-colorization processing on different magnetic flux leakage data gray level images;
the R component mapping relation is modified into
G component mapping relation is modified into
The mapping relation of the component B is modified into
And 8, presenting the magnetic flux leakage data pseudo-color image. The axial pseudo-color image after the pseudo-color encoding is improved is shown in fig. 4, and the pseudo-color image contrast obtained by the pseudo-color encoding method before and after the radial and circumferential magnetic flux leakage data improvement is shown in fig. 5 and 6.
The above-described embodiments are only for illustrating the technical spirit and features of the present invention, and it is intended to enable those skilled in the art to understand the content of the present invention and to implement it accordingly, and the scope of the present invention is not limited to the embodiments, i.e. equivalent changes or modifications to the spirit of the present invention are still within the scope of the present invention.

Claims (6)

1. The self-adaptive pseudo-colorization method of the magnetic flux leakage data is characterized in that the magnetic flux leakage data is subjected to basic value correction and denoising pretreatment; classifying the preprocessed magnetic flux leakage data, setting the classification class number as k, and correspondingly setting class labels as C i I=1, 2 … k, where C 1 All the magnetic flux leakage data of the category are positioned in the defect-free area, and part or all of the magnetic flux leakage data of other categories are positioned in the defect area; carrying out graying treatment on the preprocessed magnetic flux leakage data to generate a gray image; dividing the generated gray level image by adopting two methods respectively, wherein the first dividing method is as follows: setting a gray threshold, dividing the generated gray image into two parts according to the gray threshold, and respectively carrying out binarization division on the two parts of images by adopting an Otsu algorithm to obtain a background region gray interval endpoint value; the second segmentation method is as follows: dividing the gray level image according to the magnetic flux leakage data type label, and dividing C 2 To C k The gray maximum value corresponding to the category magnetic flux leakage data is used as a gray interval boundary value; combining the background region gray scale interval endpoint value, the gray scale interval boundary value and C 1 The class corresponds to the pixel gray value extremum to obtain each endpoint value of the segmented gray interval; according to each endpoint value of the gray scale interval, adjusting the pseudo-color coding and carrying out pseudo-colorization treatment on the gray scale image;
the method for classifying the preprocessed magnetic flux leakage data comprises the following steps:
step B-1, setting a classification category number k;
b-2, classifying the axial, radial and circumferential magnetic flux leakage detection data of a pipe section according to the methods of the step B-2-1 and the step B-2-2 to obtain the types of the axial, radial and circumferential magnetic flux leakage data corresponding to the sampling points; wherein:
step B-2-1, classifying the magnetic flux leakage data of the sampling points corresponding to any channel according to the following method to obtain the type of the magnetic flux leakage data of the sampling points corresponding to the channel:
setting amplitude threshold V δ Let the median value of the signals of the current pipe section be V s-mid Judging whether the magnetic flux leakage data amplitude of the sampling point is positioned at V s-mid ±V δ In the range of/2;
if yes, the magnetic flux leakage data category of the sampling point is:
if not, the magnetic flux leakage data category of the sampling point is:
wherein C is i,j Class label for sampling data of i-type sensor at j-position of mileage sampling point, V i,j For the signal amplitude of the i-sensor at the j position of the mileage sampling point, V s-mid Median signal of current pipe section, V s-max 、V s-min The maximum value and the minimum value of the signal respectively correspond to the current pipe section, and a, b, c, d are all adjusting factors smaller than 1;
b-2-2, taking the maximum value of each channel class as the class of the sampling point for any sampling point;
b-3, taking the maximum value of the axial, radial and circumferential categories of the sampling points as the comprehensive category of the magnetic flux leakage data of the sampling points, and obtaining the final category label of the magnetic flux leakage data of each sampling point of the pipe section;
in the step B-1, the method for setting the classification category number k is as follows:
wherein V is n_max And V n_min The corresponding representation represents random samplingMaximum and minimum values of signals of the obtained n pipe sections, V peak And V valley Corresponding to the peak value and the valley value of the signal amplitude corresponding to the smaller defect in the N pipe sections obtained by the obtained random sampling, wherein N is an intermediate variable and N is class The number of quantization layers to be set for representing the defect, k is the number of classification categories, and floor represents rounding in a rounding manner;
the first segmentation method comprises the following steps:
step D-1, dividing the gray level image of the magnetic flux leakage data into two parts, namely an image I, by taking the gray median value as a gray level threshold value 1 And image I 2 Wherein, the method comprises the steps of, wherein,
wherein G is cv Is the median of gray scale, G i,j The gray value after the signal gray conversion of the I-number sensor at the j position of the mileage sampling point is I 1 (I, j) is the gray value of the image with smaller gray value after division, I 2 (i, j) is the gray value of the image with larger gray value after segmentation;
step D-2, for image I 1 And image I 2 Binarization segmentation is carried out by adopting an Otsu algorithm to obtain a background region gray scale interval [ g ] l ,g h ]The method comprises the steps of carrying out a first treatment on the surface of the The specific method comprises the following steps:
image I is first segmented using the Otsu algorithm 1 Let it share [0, L]Gray scale, computing image I 1 Is a gray value probability distribution;
set image I 1 There is a gray threshold G thr Image I 1 Dividing the gray value of the pixel point into two classes according to the gray threshold value, and respectively setting the two classes asAnd->The gray value interval corresponds to [0,G ] thr ) And [ G ] thr ,L]The gray value of any pixel point is distributed in the classProbability in interval, distributed in +.>The gray level average of the interval and the whole image is further obtained +.>Sum of pixel variances of interval +.>Let->Taking the maximum value to obtain an image I 1 Gray threshold G of (2) thr From image I 1 Gray threshold G of (2) thr Obtaining image I 1 Gray scale division threshold g of (2) l
Employing and image I 1 The same processing method is used for image I 2 Image segmentation is carried out to obtain an image I 2 Gray scale division threshold g of (2) h ;[g l ,g h ]The interval is the background area of the gray image g l 、g h The corresponding background area gray scale interval endpoint value;
the method for pseudo-colorizing the gray image comprises the following steps:
step E-1, taking C 1 The minimum and maximum values of the gray values of the pixel points corresponding to the categories are respectively marked as c min 、c max C is taken respectively 1 The maximum value of the gray value of the corresponding pixel point of the other types is denoted as (c) as the boundary value of the gray interval 2 ,c 3 ,...,c k ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein k is the number of classification categories;
e-2, combining the background region gray scale interval end point value, the gray scale interval boundary value and C 1 Class corresponds to the extreme value of the gray value of the pixel point to obtain the endpoint value l of the gray interval 1 、l 2 、l 3 、l 4
l 1 =max(g l ,c min ),l 2 =max(g h ,c max ),l 3 =min(c 2 ,c 3 ),l 4 =min(c 4 ,c 5 );
E-3, according to each endpoint value of the gray scale interval, adopting the following method to adjust pseudo-color coding, and carrying out pseudo-colorization treatment on the magnetic flux leakage data gray scale image;
the R component mapping relation is adjusted as follows:
the G component mapping relationship is adjusted as follows:
the B component mapping relationship is adjusted as follows:
wherein C is B (i, j) is the pixel value of the B component of the mapped pseudo-color image at point (i, j), C G (i, j) is the pixel value of the G component of the mapped pseudo-color image at point (i, j), C R (i, j) is the pixel value of the R component of the mapped pseudo-color image at point (i, j), l 1 、l 2 、l 3 、l 4 G is the end point value of gray scale interval i,j For the signal gray scale of the i-sensor at the j position of the mileage sampling pointConverted gray values.
2. The method for adaptively pseudo-colorizing magnetic flux leakage data according to claim 1, wherein the method for performing basic value correction and denoising pretreatment on the magnetic flux leakage data of each sampling point comprises the following steps:
step A-1, performing basic value calibration on the magnetic flux leakage data of each sampling point by adopting an average median method;
and step A-2, denoising the magnetic flux leakage data after the base value calibration by adopting a wavelet threshold denoising method.
3. The method for adaptively pseudo-colorizing magnetic flux leakage data according to claim 1, wherein the method for graying the preprocessed magnetic flux leakage data comprises the steps of:
step C-1, setting a window adjustment amplitude threshold, setting the size of an initial sliding window, and expanding the boundary of the magnetic flux leakage data;
c-2, comparing the extreme value difference of the magnetic flux leakage data amplitude value in the current window with the window adjustment amplitude value threshold value, and adjusting the window size until the data boundary if the extreme value difference is smaller than or equal to the window adjustment amplitude value threshold value; c-3, if the extremum difference is larger than the window adjustment amplitude threshold value;
c-3, correcting the extreme value of the magnetic flux leakage data amplitude value in the current window by adopting an adjusting factor so as to realize gray value compensation;
and C-4, segmenting the magnetic flux leakage data of any sampling point in the current window according to the magnitude relation between the amplitude value of the magnetic flux leakage data and the median value of the amplitude value of the magnetic flux leakage data in the channel, and performing local segmentation gray level mapping.
4. The method for adaptively pseudo-colorizing magnetic flux leakage data according to claim 3, wherein the magnetic flux leakage data after the segmented gray mapping process is further processed by a gray segment transformation method, and the gray segment transformation method is as follows:
set C 2 The magnetic flux leakage data of the category is partially positioned in the defect-free area and partially positioned in the defect area;C 3 to C k All the magnetic flux leakage data of the category are positioned in the defect area;
when the category label is C 1 、C 2 When the gray level segmentation transformation formula is:
when the category label is C 3 To C k When the gray level segmentation transformation formula is:
wherein R is s As scale factor, R b As scale factor, G cv G is the median gray value i,j G is the gray mapping value of the i-number sensor at the j position of the mileage sampling point i,j ' is the value obtained after the segmentation gray mapping of the sampling point, h 1 、h 2 For the amplification factor, λ, γ are exponentiations.
5. The method for adaptively pseudo-colorizing magnetic flux leakage data according to claim 3, wherein in the step C-3, the method for correcting the extreme value of the amplitude of the magnetic flux leakage data in the current window by using the adjustment factor is as follows:
wherein V is w-max-c Representing the corrected local window maximum amplitude mapping value; v (V) w-min-c Representing the corrected local window minimum amplitude mapping value; v (V) w-max Representing a local window maximum amplitude mapping value before correction; v (V) w-min Representation schoolA front partial window minimum amplitude mapping value; alpha, beta are regulating factors; r is R a Representing a deviation coefficient; v (V) max Representing the maximum value in the leakage flux data of the current pipe section, V min Representing the minimum value in the current pipe segment leakage data.
6. The method for adaptive pseudo-colorization of magnetic flux leakage data according to claim 3, wherein in the step C-4, the method for partial segment gray scale mapping is as follows:
wherein G is i,j The gray value of the i sensor after the signal gray conversion at the j position of the mileage sampling point; g m Is the maximum gray value; g cv Is the gray median value; v (V) i,j For the signal amplitude of the i-sensor at the j position of the mileage sampling point, V m_i For median amplitude of channel i, V max For the maximum value of the signal amplitude of the current pipe section, V min Is the minimum value of the signal amplitude of the current pipe section.
CN202010517387.3A 2020-06-09 2020-06-09 Self-adaptive pseudo-colorization method for magnetic flux leakage data Active CN111882518B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010517387.3A CN111882518B (en) 2020-06-09 2020-06-09 Self-adaptive pseudo-colorization method for magnetic flux leakage data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010517387.3A CN111882518B (en) 2020-06-09 2020-06-09 Self-adaptive pseudo-colorization method for magnetic flux leakage data

Publications (2)

Publication Number Publication Date
CN111882518A CN111882518A (en) 2020-11-03
CN111882518B true CN111882518B (en) 2023-12-19

Family

ID=73157767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010517387.3A Active CN111882518B (en) 2020-06-09 2020-06-09 Self-adaptive pseudo-colorization method for magnetic flux leakage data

Country Status (1)

Country Link
CN (1) CN111882518B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112539843B (en) * 2020-12-11 2023-06-02 平安科技(深圳)有限公司 Method and device for detecting temperature and computer equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105225256A (en) * 2015-06-10 2016-01-06 西安交通大学 A kind of display packing of high gray depth image
CN105425123A (en) * 2015-11-20 2016-03-23 国网福建省电力有限公司泉州供电公司 Method and system for collaboratively detecting power equipment failure through ultraviolet imaging and infrared imaging
CN105976342A (en) * 2015-09-01 2016-09-28 南京理工大学 Adaptive gray-level image pseudo-color processing method
CN106404893A (en) * 2016-12-16 2017-02-15 北京华航无线电测量研究所 Automatic axial magnetic flux leakage defect signal detection method
CN107392912A (en) * 2017-07-25 2017-11-24 哈尔滨工业大学 Image partition method based on pseudo-color coding and DISCOV codings
CN108428225A (en) * 2018-01-30 2018-08-21 李家菊 Image department brain image fusion identification method based on multiple dimensioned multiple features
CN109147005A (en) * 2018-08-24 2019-01-04 电子科技大学 It is a kind of for the adaptive colouring method of infrared image, system, storage medium, terminal
CN110146589A (en) * 2019-06-17 2019-08-20 东北大学 A kind of high definition method for visualizing of pipe leakage data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10107765A1 (en) * 2001-02-17 2002-08-29 Siemens Ag Process for image processing based on a computed tomography (CT) image of a lung taken using a contrast medium and CT device for carrying out such a process

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105225256A (en) * 2015-06-10 2016-01-06 西安交通大学 A kind of display packing of high gray depth image
CN105976342A (en) * 2015-09-01 2016-09-28 南京理工大学 Adaptive gray-level image pseudo-color processing method
CN105425123A (en) * 2015-11-20 2016-03-23 国网福建省电力有限公司泉州供电公司 Method and system for collaboratively detecting power equipment failure through ultraviolet imaging and infrared imaging
CN106404893A (en) * 2016-12-16 2017-02-15 北京华航无线电测量研究所 Automatic axial magnetic flux leakage defect signal detection method
CN107392912A (en) * 2017-07-25 2017-11-24 哈尔滨工业大学 Image partition method based on pseudo-color coding and DISCOV codings
CN108428225A (en) * 2018-01-30 2018-08-21 李家菊 Image department brain image fusion identification method based on multiple dimensioned multiple features
CN109147005A (en) * 2018-08-24 2019-01-04 电子科技大学 It is a kind of for the adaptive colouring method of infrared image, system, storage medium, terminal
CN110146589A (en) * 2019-06-17 2019-08-20 东北大学 A kind of high definition method for visualizing of pipe leakage data

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Pipeline Magnetic Flux Leakage Image Detection Algorithm Based on Multiscale SSD Network;Lijian Yang等;IEEE Transactions on Industrial Informatics;第501 - 509页 *
管道漏磁内检测信号的自适应成像算法研究;王增国等;石油工程建设;第45卷(第3期);第5-9页 *
管道漏磁内检测数据的自适应可视化及增强方法研究;黄方佑;万方;第1-93页 *
管道漏磁内检测缺陷可视化方法;杨理践等;无损探伤;第36卷(第2期);第1-3页 *

Also Published As

Publication number Publication date
CN111882518A (en) 2020-11-03

Similar Documents

Publication Publication Date Title
CN114757949B (en) Wire and cable defect detection method and system based on computer vision
CN110146589B (en) High-definition visualization method for pipeline magnetic flux leakage data
CN111429403B (en) Automobile gear finished product defect detection method based on machine vision
CN109682839B (en) Online detection method for surface defects of metal arc-shaped workpiece
CN110648310B (en) Weak supervision casting defect identification method based on attention mechanism
CN105913415A (en) Image sub-pixel edge extraction method having extensive adaptability
CN112215803B (en) Aluminum plate eddy current inspection image defect segmentation method based on improved generation countermeasure network
CN115170572A (en) BOPP composite film surface gluing quality monitoring method
CN116703251B (en) Rubber ring production quality detection method based on artificial intelligence
CN114782329A (en) Bearing defect damage degree evaluation method and system based on image processing
CN111882518B (en) Self-adaptive pseudo-colorization method for magnetic flux leakage data
CN116309548B (en) Automatic defect detection system for valve sealing surface
CN105787950A (en) Infrared image sea-sky-line detection algorithm based on line gradient accumulation
CN115719332A (en) Welding quality detection method
CN111738256A (en) Composite material CT image segmentation method based on improved watershed algorithm
CN103455985B (en) Crack on road Enhancement Method based on Hessian structural analysis
CN114778574A (en) Method for detecting and identifying internal defects of in-transit high-voltage cable through X-ray digital imaging
CN117058147A (en) Environment-friendly plastic product defect detection method based on computer vision
CN116993731A (en) Shield tunneling machine tool bit defect detection method based on image
CN110084786B (en) Automatic defect identification method for digital X-ray image with gradually-changed background
CN116958514A (en) Sub-pixel positioning method for shock wave position of optical image
CN111831872A (en) Magnetic flux leakage data self-adaptive gray scale visualization method with enhanced small defect characteristics
CN106778515B (en) Automatic identification method for axial magnetic flux leakage array signal of flange
CN114529515A (en) Method for automatically identifying internal defects of solar cell
CN117036205B (en) Injection molding production quality detection method based on image enhancement

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant