Petrochemical pipeline leakage identification method based on unmanned aerial vehicle inspection image

By generating pixel-level surface normal vector fields and photometric change information, combined with local curvature and color features, corrosion perforation leaks in petrochemical pipelines are identified, solving the problems of false alarms and missed alarms in existing technologies and achieving highly accurate leak identification.

CN121545075APending Publication Date: 2026-02-17张磊
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511736377.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing image recognition technologies struggle to distinguish corrosion perforation leaks in petrochemical pipelines from other visual phenomena, leading to false alarms and missed alarms.

Method used

By generating a pixel-level surface normal vector field, calculating the change in angle between adjacent vectors and the change in luminance, and combining the local curvature distribution with the geometric continuity of the cylinder, HSI color space features are extracted to generate a surface gloss consistency score set. The overlapping pixel area of ​​the wetting anomaly coordinates and the geometric deformation region is determined to identify corrosion perforation leakage.

Benefits of technology

It improves the accuracy and reliability of petrochemical pipeline leak detection, reduces false alarms and false negatives, and ensures the credibility of the detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121545075A_ABST
    Figure CN121545075A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition, in particular to a petrochemical pipeline leakage recognition method based on an unmanned aerial vehicle inspection image, which comprises the following steps: generating a pixel-level surface normal vector field according to an unmanned aerial vehicle inspection image sequence, and calculating an angle variation between adjacent vectors in the pixel-level surface normal vector field, and generating a surface normal vector gradient map in combination with luminosity change information of the multiple frames of images. According to the method, the analysis range is focused in the determined geometric deformation candidate area, the unique gloss and color change characteristics of liquid leakage are captured, and finally, the wet abnormal coordinate set and the geometric deformation area are subjected to space alignment and overlapping judgment, so that the high credibility of an identification result is ensured, and the identification accuracy is improved. False report and missing report caused by interference of environmental factors such as illumination change and surface stains of a single feature source are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to a method for identifying leaks in petrochemical pipelines based on images from drone inspections. Background Technology

[0002] Image recognition is the process of training computers to simulate the human visual system in order to recognize, understand, and interpret the content in digital images or videos.

[0003] Current image recognition technologies, when applied to pipeline leak detection, compare local visual features in images, such as dark spots and abnormal reflections, with leak patterns in a database. This mechanism lacks an understanding of the object's three-dimensional geometry, making it difficult to distinguish visual phenomena with drastically different physical causes. For example, an oil stain caused by corrosion perforation and a harmless stain left by external splashes or routine maintenance may present extremely similar color and texture features in a two-dimensional image. Traditional recognition methods might mistakenly classify both as leaks due to successful pattern matching, resulting in false alarms. Therefore, improvements are needed. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and propose a method for identifying petrochemical pipeline leaks based on UAV inspection images.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for identifying petrochemical pipeline leaks based on UAV inspection images, comprising the following steps: Based on the UAV inspection image sequence, a pixel-level surface normal vector field is generated, the angle change between adjacent vectors within the pixel-level surface normal vector field is calculated, and the surface normal vector gradient map is generated by combining the photometric change information of multiple frames of images. Based on the surface normal gradient map, abrupt change points in vector direction are identified, local curvature distribution data is generated, and the local curvature distribution data is compared with the cylindrical geometric continuity constraint to generate candidate regions for geometric deformation. Based on the candidate regions of geometric deformation, extract the intensity channel values ​​and saturation channel values ​​of the HSI color space within the corresponding coordinate range, construct a local sliding window within the extracted channel data, generate the intensity and saturation covariance matrix, and calculate the surface gloss consistency score set based on the intensity and saturation covariance matrix. Based on the surface gloss consistency score set, the associated pixel coordinates are extracted to generate a set of wetting anomaly coordinates. The set of wetting anomaly coordinates is aligned with the spatial boundary of the candidate region of geometric deformation. The overlapping pixel area of ​​the wetting anomaly coordinates and the deformation region is determined to generate the corrosion perforation leakage identification result.

[0006] Preferably, the step of obtaining the surface normal gradient map is as follows: Based on the UAV inspection image sequence, the pipeline edge contour coordinates are extracted as a spatial reference, the gray-level gradient values ​​are calculated pixel by pixel, the gray-level gradient values ​​are mapped to spatial direction parameters, and a pixel-level surface normal vector field is generated. Based on the pixel-level surface normal vector field, the angular change between adjacent vectors is calculated, the vector divergence value in the pixel neighborhood is statistically analyzed, and the surface normal direction is solved by combining the photometric change information of multiple frames of images. Based on the surface normal direction, the rate of change of spatial direction across pixel coordinates is quantified to generate a surface normal gradient map.

[0007] Preferably, the step of obtaining the local curvature distribution data is as follows: Based on the surface normal gradient map, the principal curvature value and Gaussian curvature value are calculated pixel by pixel. The Gaussian curvature value is subjected to first-order difference according to a fixed pixel neighborhood. The pixel positions where the sign change and extrema overlap in the Gaussian curvature value are identified to form local curvature distribution data.

[0008] Preferably, the step of obtaining the candidate region for geometric deformation is as follows: Based on the local curvature distribution data, the degree of deviation of the abrupt change point is calculated; Based on the degree of deviation of the mutation point, according to the cylindrical geometric continuity constraint, the set of pixels whose deviation continuously exceeds the constraint limit and are connected are selected, and the set of pixels with Gaussian curvature values ​​of zero and principal curvature values ​​with absolute difference along the axial direction of the difference of principal curvature values ​​of zero are eliminated to form a candidate region for geometric deformation.

[0009] Preferably, the step of obtaining the intensity saturation covariance matrix is ​​as follows: Based on the candidate regions of the geometric deformation, the intensity channel values ​​and saturation channel values ​​of the HSI color space are extracted. A local sliding window of a fixed size is constructed in each local region. The covariance of the intensity channel values ​​and saturation channel values ​​in the local sliding window is calculated to generate an intensity-saturation covariance matrix.

[0010] Preferably, the step of obtaining the surface gloss consistency score set is as follows: Calculate the wetting characteristic response value based on the intensity saturation covariance matrix; Based on the wet feature response value, the wet feature response value is written into the local sliding window within the candidate region of geometric deformation one by one. The minimum wet feature response value in the local sliding window to which each pixel belongs is selected according to the pixel position to generate a surface gloss consistency score set.

[0011] Preferably, the step of obtaining the wetting anomaly coordinate set is as follows: Based on the surface gloss consistency score set, the scores are compared one by one according to the preset negative correlation value interval, the row and column coordinates of the pixels falling into the interval are extracted, and duplicates are removed according to the row and column coordinates while retaining the original order to generate a wetness anomaly coordinate set.

[0012] Preferably, the step for obtaining the corrosion perforation leakage identification result is as follows: Based on the set of wet anomaly coordinates, the wet anomaly coordinates are mapped to a unified image raster index, aligned with the spatial boundary of the candidate region of geometric deformation, and the number of overlapping pixels in each connected region is counted and the pixel area is calculated to generate the overlapping pixel area determination result. Based on the overlapping pixel area determination result, defect labels are written for connected regions where the overlapping pixel area exceeds the minimum area threshold, adjacent defect labels are merged and the outer boundary index is updated to generate corrosion perforation leakage identification results.

[0013] Compared with the prior art, the advantages and positive effects of the present invention are as follows: This invention extracts and quantifies surface normal vector changes from UAV inspection image sequences to establish a geometric morphology description of the pipe surface. It can directly perceive physical structural abrupt changes caused by corrosion or external force damage. Furthermore, it compares the identified local curvature distribution with the continuity constraints of cylindrical geometry, effectively distinguishing between real structural defects and normal pipe bending or welds, thus improving the accuracy and reliability of deformation identification. At the same time, it does not perform indiscriminate analysis on the entire image, but focuses the analysis on the identified candidate areas of geometric deformation, capturing the unique gloss and color change characteristics of liquid leakage. Finally, it spatially aligns and overlaps the wetting anomaly coordinate set with the geometric deformation area, ensuring the high reliability of the identification results and avoiding false alarms and missed alarms caused by environmental factors such as changes in lighting and surface stains due to a single feature source. Attached Figure Description

[0014] Figure 1 This is a schematic diagram of the steps of the present invention. Detailed Implementation

[0015] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0016] Please see Figure 1 This invention provides a technical solution: a method for identifying leaks in petrochemical pipelines based on images from unmanned aerial vehicle (UAV) inspections, comprising the following steps: Based on the UAV inspection image sequence, a pixel-level surface normal vector field is generated, the angular change between adjacent vectors within the pixel-level surface normal vector field is calculated, and the surface normal vector gradient map is generated by combining the photometric change information of multiple frames of images. Based on the surface normal vector gradient map, identify the abrupt change points in vector direction, generate local curvature distribution data, compare the local curvature distribution data with the cylindrical geometric continuity constraint conditions, and generate candidate regions for geometric deformation. Based on the candidate regions of geometric deformation, extract the intensity channel values ​​and saturation channel values ​​of the HSI color space within the corresponding coordinate range. Construct a local sliding window within the extracted channel data to generate the intensity-saturation covariance matrix. Calculate the surface gloss consistency score set based on the intensity-saturation covariance moments. Based on the surface gloss consistency score set, the associated pixel coordinates are extracted to generate a set of wetting anomaly coordinates. The set of wetting anomaly coordinates is aligned with the spatial boundary of the candidate region of geometric deformation. The overlapping pixel area between the wetting anomaly coordinates and the deformation region is determined to generate the corrosion perforation leakage identification result.

[0017] The steps to obtain the surface normal gradient map are as follows: Based on the UAV inspection image sequence, the pipeline edge contour coordinates are extracted as a spatial reference, the gray-level gradient values ​​are calculated pixel by pixel, the gray-level gradient values ​​are mapped to spatial direction parameters, and a pixel-level surface normal vector field is generated. Based on the pixel-level surface normal vector field, the angular change between adjacent vectors is calculated, the vector divergence value in the pixel neighborhood is statistically analyzed, and the surface normal direction is solved by combining the photometric change information of multiple frames of images. Based on the surface normal direction, the rate of change of spatial direction across pixel coordinates is quantified to generate a surface normal gradient map.

[0018] Specifically, based on the UAV inspection image sequence, each frame is first preprocessed, using a Gaussian filter to smooth and denoise the image, with the Gaussian kernel size set to [value missing]. Standard deviation The Canny edge detection operator is used to extract the edge contours of pipes in the image, and a high threshold is set as the maximum value of the pixel gradient magnitude in the image. The low threshold is the same as the high threshold. If the maximum gradient magnitude is 255, then the high threshold is set to 38.25 and the low threshold is set to 15.3. Two parallel pipe edge contour lines are extracted, and the midline of these two contour lines is calculated as the main axis of the pipe. The Euclidean distance from the midline to any edge is calculated as the projection radius of the pipe on the image plane. A cylindrical spatial geometric model is established using these edge contour coordinates. Then, for each pixel within the pipe region, the horizontal gradient is calculated using the Sobel operator. and vertical gradient The calculation formula is: as well as ,in Representing coordinates The pixel grayscale value at a given location is used to map the grayscale gradient of a two-dimensional image plane to a normal vector in three-dimensional space, based on the calculated gradient value and the Lambertian volume reflection model. For example, for a point on the pipe surface... Calculate its normalized offset relative to the main axis of the pipeline. ,in The vertical distance from the pixel to the principal axis is used to derive the geometric normal components of that point on the cylindrical surface. Simultaneously, grayscale gradient information is fused to fine-tune these geometric normals, constructing an initial normal vector field. For each pixel location, a normal vector field is generated containing... The three-component unit normal vectors eventually traverse the entire pipeline region of the image, generating a pixel-level surface normal vector field. Based on the pixel-level surface normal field, centered on the current pixel... Within the local neighborhood window, iterate through the area and calculate the dot product of the normal vector of the center pixel and the normal vectors of the other 8 pixels in the neighborhood. Use the inverse cosine function to find the angle difference between adjacent vectors. If the angle difference exceeds a preset angle threshold... (i.e., 30 degrees) is then marked as a potential high-frequency variation region. Next, the vector divergence value within the local neighborhood is calculated using the discrete divergence calculation formula. ,in and Let be the components of the normal vector along the coordinate axes of the image plane. Using the central difference method to approximate the partial derivatives, the statistically obtained divergence values ​​reflect the source and sink characteristics of the vector field. To further optimize the normal direction, photometric variation information from multiple frames of images is introduced. Five consecutive frames are selected, and the position of the same physical point in different frames is traced using optical flow. A set of photometric solid equations is constructed, and an objective function is established. ,in The photometric consistency term represents the difference between the predicted light intensity and the actual observed light intensity. To smooth out the constraint term, abrupt changes in adjacent normals are penalized. and As the weighting coefficient, set , The objective function is solved iteratively using the gradient descent method, with the number of iterations set to 50 or until the change in the objective function is less than 1. Stop at a certain point, and the optimal solution obtained is the corrected surface normal. Update the normal vector data of the corresponding pixel in the vector field to obtain the surface normal direction. To capture minute perturbations and abrupt changes in the normal vector in space, based on the surface normal direction, it is necessary to calculate the first derivative of the normal vector field, i.e., the normal vector gradient, for each pixel in the image coordinate system. Calculate the normal vectors respectively Regarding the horizontal axis of the image and ordinate Use the partial derivatives to construct the Jacobian matrix. The calculation formula is: ,in Represents the normal vector components exist Rate of change in direction, using The Scharr operator is used for convolution to obtain a more accurate numerical differential result. The Frobenius norm of the Jacobian matrix is ​​calculated as the quantized value of the spatial orientation change rate of the pixel. The calculation expression is as follows: The norm value directly reflects the curvature of the surface normal. The calculated norm value is then normalized to... Within the interval, for each pixel position, the normalized value is stored in the matrix as the gradient intensity value of that point, thereby constructing a two-dimensional matrix data with the same size as the original image, that is, generating the surface normal vector gradient map.

[0019] The steps for obtaining local curvature distribution data are as follows: Based on the surface normal gradient map, the principal curvature value and Gaussian curvature value are calculated pixel by pixel. The Gaussian curvature value is then subjected to first-order difference according to a fixed pixel neighborhood. The pixel positions where the sign change and extrema overlap in the Gaussian curvature value are identified, forming local curvature distribution data.

[0020] Specifically, based on the surface normal gradient map, a computational grid for extracting differential geometric properties is first established, and then a pixel-by-pixel grid is constructed on the gradient map. A local sliding window is used, and the principal curvature of each pixel is solved based on the Weingarten transformation matrix using the normal vector gradient data within the window. and And then through the formula The Gaussian curvature values ​​are calculated, and a Gaussian curvature field matrix is ​​generated. Then, a first-order spatial difference operation is performed on this matrix to calculate the curvature along the image row direction. (axis) and column direction ( The difference value (axis) is used to set a curvature noise filtering threshold, which is set to twice the standard deviation of the Gaussian curvature field. For example, if the calculated standard deviation is 0.005, the threshold is set to 0.01. Background noise points with absolute difference values ​​lower than this threshold are filtered out. Then, logical judgment is performed on the retained feature points to identify the zero-crossing positions where the sign of the difference value flips. At the same time, the second-order difference is calculated to determine the local extrema. The coordinates of the sign change point and the coordinates of the extrema point are intersected, and the points whose spatial distance is less than the set intersection operation are retained. The overlapping positions of these pixels mark the areas where curvature undergoes a fundamental abrupt change. The coordinate indices of these pixels and their corresponding Gaussian curvature values ​​and principal curvature values ​​are integrated to form local curvature distribution data.

[0021] The steps for obtaining candidate regions for geometric deformation are as follows: Based on the local curvature distribution data, the degree of deviation at the abrupt change point is calculated using the following formula: ; in, The deviation of the abrupt change point of the pixel in row u and column v. Let be the absolute value of the Laplacian operator for the Gaussian curvature at the pixel in row u and column v. The gradient vector of the Gaussian curvature is calculated as follows: , indicating the direction of the Gaussian curvature change. Let be the first partial derivative of the Gaussian curvature along the horizontal coordinate axis. Let be the first-order partial derivative of the Gaussian curvature along the longitudinal coordinate axis. The horizontal axis direction is... The vertical axis direction, Let be the local circumferential unit vector of the pipe at the pixel in row u and column v. Let be the dot product of the Gaussian curvature gradient vector and the local circumferential unit vector of the pipe, representing the component of the curvature change in the circumferential direction. Let be the magnitude of the Gaussian curvature gradient vector. This is a constant used to adjust the influence of directional weights. To prevent extremely small positive numbers with a denominator of zero; Based on the degree of deviation of the mutation point, according to the cylindrical geometric continuity constraint, the set of pixels whose deviation continuously exceeds the constraint limit and are connected are selected, and the set of pixels with Gaussian curvature values ​​of zero and absolute values ​​of principal curvature values ​​along the axial direction of the difference are removed to form a candidate region for geometric deformation.

[0022] In the formula for calculating the degree of deviation of the mutation point, where The basic term reflects the second-order intensity of the curvature abrupt change, i.e. the severity of the deformation, while the exponential term acts as a directional gain coefficient. Utilizing the unique cylindrical geometry of the pipeline, the gain is dynamically adjusted by detecting the alignment between the curvature gradient direction and the pipeline circumference. When the curvature change direction is mainly along the pipeline circumference (as is common in corrosion and cracks), the dot product term increases, and the exponential weight significantly improves the score of the basic term. Conversely, if the change is along the axial direction (as in normal welds or machining textures), the weight is lower, thus effectively suppressing structural noise and achieving directional enhancement of the geometric features of minute leakage sources. Let be the absolute value of the Laplacian operator for the Gaussian curvature at the pixel in row u and column v. This parameter quantifies the divergence flux density of the Gaussian curvature field, characterizing the sharpness of the curvature peaks, and its dimensions are: (in image space) The steps to obtain this parameter are as follows: based on the generated Gaussian curvature matrix, apply a discrete Laplacian operator convolution kernel. Perform a full-image scan operation, calculate the second-order difference sum between the center pixel and its four neighboring pixels, and take its absolute value. For example, at a defect edge point, the calculated second-order difference response value is -0.15, then the parameter value is 0.15. Let be the gradient vector of the Gaussian curvature. This parameter indicates the direction and rate of most dramatic change in the curvature field, and its dimensions are . (in image space) The steps to obtain this parameter are as follows: use the Sobel operator to calculate the first derivatives of the Gaussian curvature field in the horizontal and vertical directions, respectively. and , forming vectors For example, if the gradient of a point in the x-direction is calculated to be 0.03 and the gradient in the y-direction to be 0.04, then the vector is... ; Let be the local circumferential unit vector of the pipe at the pixel in row u and column v. This parameter is a dimensionless direction indicator. The steps to obtain this parameter are as follows: based on the equation of the central axis extracted from the pipe edge contour, calculate the perpendicular vector from each point in the image coordinate system to the center line. Rotate this perpendicular vector by 90 degrees to obtain the tangential vector, and normalize it by dividing it by its magnitude. For a horizontally placed pipe, its circumferential unit vector is constant. ; The constant used to adjust the influence of directional weights is a dimensionless gain control factor. The steps to obtain this parameter are as follows: construct a validation set containing typical circumferential corrosion defects, set the target signal-to-noise ratio gain to 10 dB, and use a grid search method within the interval... The optimal solution is found that maximizes the ratio of the response value of the defect area to the response value of the background area; in this embodiment, it is set to 2.5. To prevent extremely small positive numbers with a denominator of zero, we set... ; Calculations based on parameters: Set the current pixel Located at a suspected pipeline leak location, the following parameters were obtained (units based on a unified pixel spatial metric): Absolute value of the Laplacian operator of Gaussian curvature ; Gaussian curvature gradient vector Then its modulus length ; Local circumferential unit vector of the pipeline (For example, a horizontal pipe has a circumferential direction as the vertical direction). Adjustment constant ; Minimal positive number ; The first step is to calculate the directional projection (dot product) in the molecule: ; The second step is to calculate the denominator (gradient magnitude correction): ; The third step is to calculate the internal ratio of the exponential function: ; Step 4: Calculate the gain of the exponential term: ; Fifth step, calculate the final deviation. : ; The results show that the geometric deformation feature score of this pixel is 1.1083, which is about 7.4 times higher than the original second-order curvature change of 0.15. This indicates that the curvature change direction at this point is highly coincident with the circumferential direction of the pipe, and it is very likely that the surface geometric anomaly is caused by circumferential corrosion or circumferential cracks. According to the preset anomaly judgment threshold (e.g., 0.8), this point will be accurately identified as a candidate region for geometric deformation.

[0023] The steps to obtain the intensity saturation covariance matrix are as follows: Based on the candidate regions of geometric deformation, the intensity channel values ​​and saturation channel values ​​of the HSI color space are extracted. A local sliding window of fixed size is constructed in each local region, and the covariance of the intensity channel values ​​and saturation channel values ​​in the local sliding window is calculated to generate the intensity-saturation covariance matrix.

[0024] Specifically, based on the candidate regions for geometric deformation, the original RGB color data of the UAV inspection image within that region is read, and a color space conversion operation is performed to map the RGB data to the HSI color space. This conversion process first normalizes the pixel values ​​of the red, green, and blue channels to the HSI color space. Closed interval, using the formula Calculate the intensity channel values ​​to reflect light intensity information using the formula. The saturation channel values ​​are calculated to reflect color purity information. Based on this, a scale for local statistical analysis is defined, and the size of the local sliding window is set to... The pixel size was determined based on statistical analysis of historical corrosion and leakage samples. The average visual width of a tiny leak point was measured to be 0.8 cm. Combined with the camera's spatial resolution of 0.8 mm / pixel, the feature width was calculated to be approximately 10 pixels. A slightly larger odd-numbered size was chosen to ensure center alignment. Subsequently, a local sliding window was constructed within the extracted channel data. The entire candidate region was traversed row by row and column by column with a step size of 1 pixel. At each window position, the area covered by the window was extracted. Given two data sequences, intensity and saturation values, calculate their average. Then, calculate the covariance between the intensity and saturation channel values ​​in the local sliding window. The calculation method is to multiply the intensity deviation and saturation deviation of each pixel, sum them, and divide by the total number of pixels minus one. This covariance value quantifies the synchronous change trend of brightness and color purity in the local area. The calculated covariance value is stored in a two-dimensional array according to the center coordinate of the window to generate the intensity-saturation covariance matrix.

[0025] The steps for obtaining the surface gloss consistency score set are as follows: Based on the intensity saturation covariance matrix, the wetting characteristic response value is calculated using the following formula: ; in, Let w be the wetting characteristic response value of the w-th local sliding window. Let be the covariance between the intensity channel values ​​and the saturation channel values ​​within the w-th local sliding window. Let be the standard deviation of the intensity channel values ​​within the w-th local sliding window. Let be the standard deviation of the saturation channel values ​​within the w-th local sliding window. This represents the average intensity channel value of all pixels within the candidate region for geometric deformation. Let be the average value of the intensity channels within the w-th local sliding window. It is a positive adjustment parameter; Based on the wetting feature response value, the wetting feature response value is written into the local sliding window within the candidate region of geometric deformation. The minimum wetting feature response value in the local sliding window of each pixel position is selected to generate a surface gloss consistency score set.

[0026] Specifically, in the formula for calculating the wet characteristic response value, the first part uses the Pearson correlation coefficient to measure the linear coupling between intensity and saturation. Since wet oil stains usually cause the surface to darken (increase in intensity) and the color to deepen (increase in saturation), the two exhibit a specific negative correlation characteristic, so this term is usually negative. The second part uses the hyperbolic tangent function to introduce a nonlinear brightness gating mechanism, which weights the degree of darkening of the local area relative to the overall background. Only when the local area is significantly darker than the background is it given a high magnification, so that the response value of the wet area deviates significantly in the negative direction, locating the wet leakage area that absorbs light. Let be the covariance between the intensity channel values ​​and the saturation channel values ​​within the w-th local sliding window. This parameter quantifies the joint volatility of brightness and saturation, and has a dimensionless value of 1. The steps to obtain this parameter are as follows: using the covariance matrix generated in the previous steps, directly read the value at the corresponding window index position. For example, at index ... The covariance value read from the window is (Negative values ​​indicate that saturation increases as intensity decreases). is the standard deviation of the intensity channel values ​​within the w-th local sliding window. This parameter characterizes the dispersion of local brightness and has a dimension of 1. The steps to obtain this parameter are: read the 121 intensity values ​​within the window, calculate its variance, and then take the square root. For example, the calculated value is 0.08. is the standard deviation of the saturation channel values ​​within the w-th local sliding window. This parameter characterizes the dispersion of local color purity and has a dimension of 1. The steps to obtain this parameter are: read the 121 saturation values ​​within the window, calculate its variance, and then take the square root. For example, the calculated value is 0.06. The average intensity channel value of all pixels within the candidate region for geometric deformation is used as the background brightness benchmark. This parameter has a dimension of 1. The steps to obtain this parameter are: traverse the intensity channel data of the entire candidate region and calculate the average intensity of all pixels. For example, the overall average brightness of the region is 0.65. This is the average value of the intensity channels within the w-th local sliding window. This parameter reflects the brightness level of the local microenvironment and has a dimension of 1. The steps to obtain this parameter are: calculate the average value of the intensity of all pixels within the current window, for example, the local average brightness is 0.45 (showing a darkening feature). This is a positive adjustment parameter used to control the sensitivity to brightness differences. It is a dimensionless scaling factor. The steps to obtain this parameter are as follows: collect 50 sets of pipe images containing wet and dry interfaces, and statistically analyze the average intensity difference between the wet and dry areas. The activation function is set to activate when the intensity difference reaches this value. The output should reach 0.9 (i.e., close to saturation), according to the formula. Solving for Calculated The integer setting is 7.5; Calculations based on parameters: The current window is positioned over a damp, dark spot suspected of leaking, with the following parameter values: covariance ; Strength Standard Deviation ; Standard deviation of saturation ; Overall average strength ; Local average intensity ; Adjust parameters ; The first step is to calculate the correlation coefficient (first half): ; The second step is to calculate the brightness difference: ; The third step is to calculate the hyperbolic tangent weighting term: ; From the table ; ; The fourth step is to calculate the final wetting characteristic response value. : ; The results show that the wetness feature score of this local window is -1.667, which is a significant negative value. The score of the normal background area (no correlation or no darkening) is usually close to 0. A value less than -1.0 indicates that the area has a very strong "darkening and saturation" feature, which is consistent with the physical properties of wet leakage. In subsequent processing, the smaller the value (the more negative), the more significant the anomaly will be regarded.

[0027] Based on the wetness feature response values, a single-channel floating-point matrix with the exact same size as the original image is initialized. The initial values ​​of all elements in the matrix are set to the maximum floating-point number (e.g., 999.0) to store the consistency score for subsequent calculations. Then, all local sliding windows with calculated response values ​​are traversed. For each window, its coverage area in the image coordinate system is obtained, i.e., from the top-left corner of the window... To the bottom right corner coordinates Within a rectangular region, read the corresponding wetting characteristic response value of the window. (For example, -1.667 calculated above), visit each pixel position within the rectangular area one by one, and compare the value currently stored in the matrix at that position with... If a comparison is made, If it is less than the current stored value, then utilize The process of updating the value at this position involves writing the wet feature response value into a local sliding window within the candidate region of geometric deformation, ensuring that each pixel ultimately retains the one with the smallest response value (i.e. the strongest negative correlation feature) among all windows covering it. The minimum wet feature response value in the local sliding window to which each pixel belongs is selected according to the pixel position. This operation accurately captures the most significant wet anomaly signal through a spatial "minimum pooling" strategy, removes interference from blurred edge areas, and finally, after traversal, the data stored in the matrix constitutes the surface gloss consistency score set.

[0028] The steps for obtaining the coordinate set of wetting anomalies are as follows: Based on the surface gloss consistency score set, the scores are compared one by one according to the preset negative correlation value interval. The row and column coordinates of the pixels falling into the interval are extracted, and duplicates are removed according to the row and column coordinates while retaining the original order to generate a set of wet anomaly coordinates.

[0029] Specifically, based on the surface gloss consistency score set, a negative correlation value range for screening wetness features is first established. The upper threshold of this range is not arbitrarily selected, but rather derived from statistical analysis of a large amount of surface gloss data from healthy pipelines. The specific process involves selecting 500 known leak-free historical pipeline inspection images, calculating the surface gloss consistency score for each pixel in these images, and constructing a histogram of the score probability distribution. Fitting revealed that the background noise score follows a normal distribution with a mean of -0.1 and a standard deviation of 0.15. To ensure anomaly identification with an extremely low false alarm rate, based on the 6-sigma criterion in statistics, the anomaly judgment threshold is set to the mean minus six times the standard deviation, resulting in a threshold of -1.0. This determines the negative correlation value range as negative infinity to -1.0. Subsequently, the table stored in memory is loaded. A surface gloss consistency score set matrix is ​​generated, which contains the negative correlation response value calculated for each pixel location. Floating-point values ​​in the matrix are read one by one in row-major order, and the read values ​​are compared with the set upper limit of -1.0. Pixels with values ​​strictly less than -1.0 are determined to have significant wettability negative correlation characteristics. The row and column indices of the pixel in the matrix are immediately extracted, and these two coordinate values ​​are combined into coordinate pairs. Although the matrix traversal process naturally guarantees the uniqueness of the coordinates, a deduplication operation based on a hash table is still performed to prevent data redundancy that may be introduced in multi-threaded processing. This ensures that each coordinate pair exists uniquely in the set, while strictly maintaining the scanning order of pixels in the original image. All the selected coordinate pairs are stored sequentially in a dynamic array to generate a wettability anomaly coordinate set.

[0030] The steps for obtaining corrosion perforation leakage identification results are as follows: Based on the set of wet anomaly coordinates, the wet anomaly coordinates are mapped to a unified image raster index, aligned with the spatial boundary of the candidate region of geometric deformation, and the number of overlapping pixels in each connected region is counted and the pixel area is calculated to generate the overlapping pixel area determination result. Based on the overlapping pixel area determination results, defect labels are written for connected regions where the overlapping pixel area exceeds the minimum area threshold. Adjacent defect labels are merged and the outer boundary index is updated to generate corrosion perforation leakage identification results.

[0031] Specifically, based on the wetting anomaly coordinate set, a blank binary raster map with the same resolution as the original inspection image is first constructed. Each coordinate point in the wetting anomaly coordinate set is mapped onto this raster map, and the corresponding pixel value is marked as 1, while the remaining positions are kept as 0, forming a wetting feature distribution map. Simultaneously, the geometric deformation candidate region data generated in the previous steps is read and converted into a binary mask. Spatial alignment is performed to ensure that the origin and scaling ratio of the coordinate systems of the two masks are completely consistent. Then, a pixel-by-pixel logical AND operation is performed on these two masks, retaining only the pixels marked as 1 in both images. These points represent locations that geometrically exhibit a concave or perforated shape and optically exhibit negatively correlated gloss due to wetting. To obtain definitive evidence of corrosion-induced perforation and leakage, connected component analysis was performed on the pixels retained in the computational result image. An 8-neighborhood connectivity algorithm was used to identify several independent connected regions. The total number of pixels contained in each connected region was counted, followed by physical area conversion. The conversion factor was obtained based on flight metadata from the UAV inspection. The relative ground altitude recorded in the flight log was 10 meters. Combined with the camera sensor pixel size of 4.8 micrometers and focal length of 24 millimeters, the ground sampling distance was calculated to be 2.0 millimeters using triangulation principles. This resulted in a physical area of ​​4.0 square millimeters represented by a single pixel. The number of pixels in each connected region was multiplied by this unit area factor to obtain the actual physical coverage area of ​​each suspected leak area, generating an overlapping pixel area determination result.

[0032] Based on the overlapping pixel area determination results, a defect confirmation and filtering process based on physical scale is implemented. A minimum area threshold is set to remove image noise or non-leakage-related micro-surface defects. This threshold setting references the pitting corrosion evaluation standard in the periodic inspection rules for pipelines in the petrochemical industry, and combines it with observation data from simulated leak experiments. The experiments revealed that the wetted spots formed in the early stages of diffusion from micropore leaks with a diameter less than 2 mm typically have an area of ​​no less than 10 square millimeters. Therefore, the minimum area threshold is conservatively set to 10 square millimeters. The calculated area of ​​all connected regions is iterated, and regions smaller than this threshold are considered invalid interference and removed. For regions with an area exceeding 10 square millimeters, their attribute fields are written with... The defect label "corrosion perforation leak" is entered. Considering that the actual leak point may break into multiple adjacent fragments on the image due to uneven lighting or occlusion, a neighborhood merging operation is performed. The Euclidean distance between the geometric centroids of each independent defect region is calculated. If the distance between the centroids of two defect regions is less than the preset merging radius, which is set to one-hundredth of the average pipe diameter, such as 50 mm (corresponding to 25 pixels on the image), then the two regions are regarded as the same leak source and merged. The label information of the merged region is updated, and its bounding rectangle is recalculated. The coordinate indices of the upper left and lower right corners are recorded. Finally, all confirmed defect information is summarized to generate the corrosion perforation leak identification result.

[0033] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A petrochemical pipeline leakage identification method based on unmanned aerial vehicle inspection images, characterized in that, The method comprises the following steps: According to the unmanned aerial vehicle inspection image sequence, a pixel-level surface normal vector field is generated, the angle change between adjacent vectors in the pixel-level surface normal vector field is calculated, and a surface normal vector gradient map is generated in combination with the luminosity change information of multiple image frames; According to the surface normal vector gradient map, a vector direction mutation point is identified, local curvature distribution data is generated, the local curvature distribution data is compared with the cylindrical geometric continuity constraint condition, and a geometric deformation candidate area is generated; According to the geometric deformation candidate area, HSI color space intensity channel values and saturation channel values in the corresponding coordinate range are extracted, a local sliding window is constructed in the extracted channel data, an intensity saturation covariance matrix is generated, and a surface gloss consistency score set is calculated and generated according to the intensity saturation covariance matrix. According to the surface gloss consistency score set, associated pixel coordinates are extracted, a wetting abnormal coordinate set is generated, the wetting abnormal coordinate set is aligned with the spatial boundary of the geometric deformation candidate area, the overlapping pixel area of the wetting abnormal coordinate and the deformation area is determined, and a corrosion perforation leakage identification result is generated.

2. The petrochemical pipeline leak identification method based on UAV inspection images according to claim 1, characterized in that, The surface normal vector gradient map is obtained by: According to the unmanned aerial vehicle inspection image sequence, pipeline edge contour coordinates are extracted as a spatial reference, a gray gradient value is calculated pixel by pixel, the gray gradient value is mapped to a spatial direction parameter, and a pixel-level surface normal vector field is generated; According to the pixel-level surface normal vector field, the angle change between adjacent vectors is calculated, the vector divergence value in the pixel neighborhood is counted, the surface normal direction is solved in combination with the luminosity change information of multiple image frames, and the surface normal direction is obtained; According to the surface normal direction, the spatial direction change rate of the cross-pixel coordinates is quantified, and the surface normal vector gradient map is generated.

3. The petrochemical pipeline leak identification method based on UAV inspection images according to claim 1, characterized in that, The local curvature distribution data is obtained by: According to the surface normal vector gradient map, the principal curvature value and the Gaussian curvature value are calculated pixel by pixel, the Gaussian curvature value is first-order differentiated according to a fixed pixel neighborhood, the pixel position where the sign change and the extreme value of the Gaussian curvature value overlap is identified, and the local curvature distribution data is formed.

4. The petrochemical pipeline leak identification method based on UAV inspection images according to claim 1, characterized in that, The geometric deformation candidate area is obtained by: According to the local curvature distribution data, the deviation degree of the mutation point is calculated; According to the deviation degree of the mutation point, the pixel set whose deviation degree continuously exceeds the constraint limit and is connected is screened according to the cylindrical geometric continuity constraint condition, the pixel set whose Gaussian curvature value is zero and the absolute value of the axial difference of the principal curvature value is lower than the constraint limit is removed, and the geometric deformation candidate area is formed.

5. The petrochemical pipeline leak identification method based on UAV inspection images according to claim 1, characterized in that, The intensity saturation covariance matrix is obtained by: According to the geometric deformation candidate area, the intensity channel values and the saturation channel values in the HSI color space are extracted, a local sliding window of a fixed size is constructed in each local area, the covariance of the intensity channel values and the saturation channel values in the local sliding window is counted, and the intensity saturation covariance matrix is generated.

6. The petrochemical pipeline leak identification method based on UAV inspection images according to claim 1, characterized in that, The surface gloss consistency score set is obtained by: According to the intensity saturation covariance matrix, a wetting feature response value is calculated; According to the wet feature response value, the wet feature response value is written in a local sliding window within a range of a geometric deformation candidate area, a minimum value of the wet feature response value in a respective local sliding window to which each pixel position belongs is selected according to the pixel position, and a surface gloss consistency score set is generated.

7. The petrochemical pipeline leak identification method based on UAV inspection images according to claim 1, characterized in that, The obtaining step of the wet anomaly coordinate set is: According to the surface gloss consistency score set, each score is compared in a preset negative correlation numerical interval, pixel row and column coordinates falling into the interval are extracted, the row and column coordinates are de-duplicated and the original order is kept, and a wet anomaly coordinate set is generated.

8. The petrochemical pipeline leak identification method based on UAV inspection images according to claim 1, characterized in that, The obtaining step of the corrosion perforation leakage identification result is: According to the wet anomaly coordinate set, the wet anomaly coordinates are mapped to a unified image grid index, aligned with the spatial boundary of the geometric deformation candidate area, the number of overlapping pixels is counted and the pixel area is converted for each connected region, and an overlapping pixel area determination result is generated; According to the overlapping pixel area determination result, a defect label is written for a connected region with an overlapping pixel area exceeding a minimum area threshold, adjacent defect labels are merged and an enclosing boundary index is updated, and a corrosion perforation leakage identification result is generated.

Citation Information

Cited By

  • Intelligent scheduling system based on unmanned aerial vehicle routing inspection data acquisition path planning

    CN122089001A