A method and system for detecting defects on the surface of a submarine pipeline based on machine vision
Patent Information
- Application Number
- CN202611003330.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-07
- Publication Date
- 2026-10-13
AI Technical Summary
[0006]本发明的目的是针对现有技术中海底管道圆柱表面目标在水下光照不均、相机畸变、相邻帧错位以及缺陷类型相似时易发生误检、漏检或类型混淆的问题,提出一种基于机器视觉的海底管道表面缺陷检测方法及系统
[0021]本发明通过获取海底管道外表面的连续彩色视觉图像和相机标定参数,并对连续彩色视觉图像进行去畸变处理,得到去畸变连续图像,使后续图像处理建立在畸变误差被校正后的图像基础上。由于相机标定参数参与去畸变处理,管道边缘、表面纹理和异常区域能够以更接近真实成像几何关系的形式参与后续处理,从而为管体可见区域提取、射线与圆柱面求交以及测地展开提供一致的输入基础。
Smart Images

Figure CN122905958A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of visual inspection technology, specifically a method and system for detecting surface defects in subsea pipelines based on machine vision. Background Technology
[0002] Submarine pipelines, as crucial structures for marine oil and gas transportation, submarine cable protection, and marine engineering infrastructure, are subjected to a complex environment on their outer surfaces under constant pressure, low light, suspended particle disturbance, seawater corrosion, and the influence of marine deposits. Anomalies such as scratches, peeling, corrosion spots, localized dents and shadows, and suspected obstruction by deposits may appear on the outer surface of submarine pipelines. Failure to identify and quantify these anomalies in a timely and accurate manner may affect the accuracy of subsequent maintenance, repair, and risk assessment of the submarine pipeline.
[0003] Existing methods for inspecting the outer surface of subsea pipelines typically rely on underwater robots equipped with cameras, sonar, or other inspection devices moving along the pipeline to collect images. Abnormal areas in the images are then identified through manual review or image recognition algorithms. However, for machine vision-based inspection methods, issues arise due to uneven underwater lighting, camera distortion, perspective distortion of the cylindrical surface of the pipeline, misalignment of adjacent frames caused by robot movement, and the significant influence of the shooting angle on the morphology of surface defects in the images. Directly identifying defects in the raw visual images can easily lead to problems in judgment.
[0004] In existing image processing workflows, some methods can enhance, segment, or detect targets in single-frame images. However, for cylindrical surface targets such as seabed pipelines, there is a certain visual similarity between high reflectivity points, local shadows, and attachment obstructions in the seabed environment and actual surface defects. Without temporal alignment, evidence fusion, and geometric constraint processing for cylindrical geodesic expansion coordinate systems, false detections, missed detections, or confusion of defect types are likely to occur.
[0005] In the scenario of continuous inspection of subsea pipelines, the detection results need to correspond with the pipeline's axial position, circumferential position, and cross-frame continuity in order to provide a relatively stable data foundation for subsequent maintenance decisions. Therefore, there is still room for improvement in the existing technology. Summary of the Invention
[0006] The purpose of this invention is to address the problems in the prior art where cylindrical targets on the surface of submarine pipelines are prone to false detection, missed detection, or type confusion when underwater lighting is uneven, camera distortion occurs, adjacent frames are misaligned, or defect types are similar. The invention proposes a machine vision-based method and system for detecting surface defects on submarine pipelines.
[0007] The objective of this invention can be achieved through the following technical solutions:
[0008] In a first aspect, to address the aforementioned technical problems, the present invention provides a machine vision-based method for detecting surface defects in subsea pipelines, comprising:
[0009] S1. Obtain a continuous color visual image of the outer surface of the subsea pipeline and camera calibration parameters, and perform distortion correction processing on the continuous color visual image to obtain a distortion-corrected continuous image.
[0010] S2. Extract the visible area of the pipe body from the distortion-free continuous image, and perform ray-cylindrical surface intersection on the visible area of the pipe body according to the camera calibration parameters and the prior of the pipe cylinder, establish a cylindrical geodesic unfolding coordinate system, and generate geodesic unfolding maps for each frame.
[0011] S3. In the cylindrical geodesic unfolding coordinate system, perform axial-circumferential joint correction on the geodesic unfolding maps of adjacent frames to obtain time-aligned geodesic unfolding maps;
[0012] S4. Construct a defect evidence tensor based on the time-aligned geodesic unfolded map, and determine candidate defect regions and candidate defect types based on the defect evidence tensor;
[0013] S5. Quantize the candidate defect region in the cylindrical geodetic expansion coordinate system and output the surface defect detection results of the subsea pipeline. The surface defect detection results of the subsea pipeline include defect type, defect location, defect size, defect continuity and defect level.
[0014] Secondly, in order to solve the above-mentioned technical problems, the present invention provides a machine vision-based surface defect detection system for subsea pipelines, comprising:
[0015] The image acquisition and distortion correction module is used to acquire continuous color visual images of the outer surface of the subsea pipeline and camera calibration parameters, and to perform distortion correction processing on the continuous color visual images to obtain distorted continuous images.
[0016] The tube geodesic unfolding module is used to extract the visible area of the tube from the distortion-free continuous image, and according to the camera calibration parameters and the prior knowledge of the cylinder, perform ray-cylindrical intersection on the visible area of the tube to establish a cylindrical geodesic unfolding coordinate system and generate geodesic unfolding maps for each frame.
[0017] The temporal joint correction module is used to perform axial-circumferential joint correction on the geodesic unfolded maps of adjacent frames in the cylindrical geodesic unfolded coordinate system to obtain a temporally aligned geodesic unfolded map.
[0018] The defect evidence analysis module is used to construct a defect evidence tensor based on the time-aligned geodesic unfolded map, and to determine candidate defect regions and candidate defect types based on the defect evidence tensor.
[0019] The defect quantization output module is used to quantify the candidate defect region in the cylindrical geodetic expansion coordinate system and output the surface defect detection results of the subsea pipeline. The surface defect detection results of the subsea pipeline include defect type, defect location, defect size, defect continuity and defect level.
[0020] Compared with the prior art, the present invention has the following advantages:
[0021] This invention acquires continuous color visual images of the outer surface of a subsea pipeline and camera calibration parameters, and then performs distortion correction processing on the continuous color visual images to obtain distortion-corrected continuous images. This allows subsequent image processing to be based on images whose distortion errors have been corrected. Because the camera calibration parameters participate in the distortion correction processing, pipeline edges, surface textures, and abnormal regions can participate in subsequent processing in a form that more closely approximates the true imaging geometry. This provides a consistent input basis for extracting the visible area of the pipeline, finding the intersection of rays and cylindrical surfaces, and geodesic deployment.
[0022] This invention extracts the visible area of the pipe body from distortion-free continuous images. Based on camera calibration parameters and the prior knowledge of the pipe cylinder, it performs ray-cylindrical intersection calculations on the visible area of the pipe body to establish a cylindrical geodesic unfolding coordinate system, generating geodesic unfolded maps for each frame. Then, within the cylindrical geodesic unfolding coordinate system, it performs axial-circumferential joint correction on the geodesic unfolded maps of adjacent frames to obtain temporally aligned geodesic unfolded maps. This processing method transforms the outer surface of the submarine pipe cylinder, which is affected by perspective projection, into an unfolded representation jointly defined by axial and circumferential coordinates, and ensures a stable temporal correspondence between the same pipe surface regions in consecutive frames.
[0023] This invention constructs a defect evidence tensor based on a time-aligned geodesic unfolded map, determines candidate defect regions and types based on the defect evidence tensor, and then quantifies the candidate defect regions in a cylindrical geodesic unfolded coordinate system. The output includes the defect type, location, size, continuity, and severity level of the subsea pipeline surface defects. The reliability of the geometric system is improved through brightness equalization processing, high reflectivity suppression images, pipeline edge lines, pipeline center generation lines, pipeline projected boundary curves or ellipses, scale constraints, and local cylindrical attitude. Furthermore, a distinguishable response basis is formed through scratch evidence channels, peeling evidence channels, corrosion spot evidence channels, local depression shadow evidence channels, and suspected attachment occlusion evidence channels, reducing the interference of high reflectivity, shadow variations, and suspected attachment occlusion on the defect identification results. Attached Figure Description
[0024] Figure 1 This is a flowchart illustrating the machine vision-based surface defect detection method for submarine pipelines in this invention.
[0025] Figure 2This is a schematic diagram of the process for extracting the visible area of the tube and estimating the local cylinder posture in this invention.
[0026] Figure 3 This is a schematic diagram of the module of the machine vision-based subsea pipeline surface defect detection system in this invention. Detailed Implementation
[0027] The technical solutions of the embodiments of the present invention will be described more clearly below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort can fall within the protection scope of the present invention.
[0028] A machine vision-based method for detecting surface defects in subsea pipelines, comprising:
[0029] S1. Obtain continuous color visual images and camera calibration parameters of the outer surface of the subsea pipeline, and perform distortion correction processing on the continuous color visual images to obtain distortion-corrected continuous images.
[0030] Continuous color visual images are image sequences continuously acquired by underwater imaging equipment from the outer surface of a seabed pipe, which may include multiple frames of color images arranged in chronological order.
[0031] Distortion correction processing of continuous color visual images refers to correcting the pixel positions in continuous color visual images according to camera calibration parameters, so that the pixel offset caused by lens distortion in the original image is corrected.
[0032] In some embodiments, distortion correction can be performed using a reverse mapping method based on the camera intrinsic matrix and distortion coefficients. For each frame of a continuous color visual image, the position of the target distortion correction pixel can be determined first, and then its corresponding position in the original image can be found through the camera calibration parameters. The color value at the corresponding position can be interpolated to obtain the distortion correction pixel value.
[0033] For example, an underwater robot moves axially along a seabed pipe and collects continuous color visual images of the outer surface of the seabed pipe at a sampling frequency of 20 frames per second. The system takes the 20 continuous color visual images collected in the first second as input and performs distortion correction processing frame by frame according to the camera calibration parameters. During the processing, the curved edges at the edges of the original image caused by the wide-angle lens are corrected, and the linear texture on the outer surface of the pipe changes from a curved and offset state to a more stable geometric state.
[0034] S2. Extract the visible area of the pipe body from the distortion-free continuous image, and perform ray-cylindrical surface intersection on the visible area of the pipe body according to the camera calibration parameters and the prior of the pipe cylinder, establish a cylindrical geodesic unfolding coordinate system, and generate geodesic unfolding maps for each frame.
[0035] The visible area of the pipe body is the set of pixels corresponding to the visible part of the outer surface of the subsea pipeline in the distortion-free continuous image. The cylinder prior of the pipeline is used to represent the geometric basis that the outer surface of the subsea pipeline can be approximated as a cylindrical surface, and includes the pipeline radius, the initial direction of the pipeline axis, the scale reference, or the local cylindrical attitude constraints determined by the robot pose, ranging equipment, and sonar / laser-assisted data.
[0036] Based on camera calibration parameters and the prior knowledge of the cylindrical pipe, the ray-cylindrical intersection is performed on the visible area of the pipe. This involves forming a visual ray between the image pixels in the visible area of the pipe and the camera optical center, and then determining the intersection point of this visual ray with the cylindrical surface based on the prior knowledge of the cylindrical pipe and scale or pose constraints. Establishing a cylindrical geodesic unfolded coordinate system involves unfolding the intersection points on the cylindrical surface according to the pipe's axial and circumferential directions, converting the points on the cylindrical surface into axial and circumferential coordinates. Generating the geodesic unfolded map involves performing the above geometric mapping on the visible area of the pipe in each frame of the distortion-free continuous image, and then resampling the image according to the cylindrical geodesic unfolded coordinate system to obtain the unfolded image corresponding to each frame.
[0037] Specifically, in the cylindrical geodesic unfolded coordinate system, one coordinate direction can correspond to the axial direction of the subsea pipeline, and the other coordinate direction can correspond to the circumferential direction of the subsea pipeline surface. Since the surface of the subsea pipeline is cylindrical, the same axial coordinate and different visible circumferential coordinates can represent different surface positions within the visible range on the same cross-section of the pipeline, while different axial coordinates and the same visible circumferential coordinates can represent the same circumferential orientation within the visible range along the axial extension direction of the pipeline. Through this coordinate system, the pixel information originally located in the image plane is transformed into an unfolded expression that more closely corresponds to the actual surface of the pipeline.
[0038] For example, in the output of twenty frames of distortion-free continuous images, the system identifies the visible part of the subsea pipeline in the image frame by frame and determines it as the visible area of the pipeline. For one frame of the image, the visible area of the pipeline is located in the middle of the image, and the left and right boundaries correspond to the visible edges on both sides of the pipeline, respectively. The system converts the distortion-free pixels in the visible area of the pipeline into visual rays according to the camera calibration parameters. Then, it combines the pipeline cylinder prior and the robot pose or ranging scale constraints to find the intersection points of these visual rays with the pipeline cylinder surface. Subsequently, each intersection point is converted into axial coordinates and circumferential coordinates in the cylindrical geodesic unfolded coordinate system, and the geodesic unfolded map of the frame is generated by resampling at a fixed sampling interval. The horizontal direction of the geodesic unfolded map of the frame can correspond to the axial coordinates, and the vertical direction can correspond to the circumferential coordinates.
[0039] S3. In the cylindrical geodesic unfolding coordinate system, perform axial-circular joint correction on the geodesic unfolding diagrams of adjacent frames to obtain time-aligned geodesic unfolding diagrams.
[0040] Adjacent geodesic unfolded maps refer to two or more consecutive geodesic unfolded maps in time sequence. Due to underwater robot movement, ocean current disturbances, or slight changes in camera attitude, the axial and circumferential coordinates of the same area on the outer surface of a subsea pipeline may shift in adjacent geodesic unfolded maps. Axial-circumferential joint correction refers to simultaneously considering displacements in both the axial and circumferential directions to register and correct the geodesic unfolded maps of adjacent frames, ensuring that the same surface area of the pipe falls into a consistent cylindrical geodesic unfolded coordinate position as much as possible in the time series.
[0041] Specifically, the axial-circumferential joint correction does not simply involve translation along a single direction, but rather considers both the displacement caused by the axial extension of the pipeline and the displacement caused by the circumferential rotation of the pipeline or changes in the imaging angle within the cylindrical geodesic unfolded coordinate system.
[0042] For example, in the obtained twenty-frame geodesic unfolded map, between the first and second frames, due to the underwater robot moving along the pipe, the axial coordinate of the same surface scratch in the second frame geodesic unfolded map shifts by several sampling units relative to the first frame; at the same time, due to the slight rotation of the robot's posture, the circumferential coordinate corresponding to the scratch also shifts slightly. The system calculates the axial and circumferential offsets between adjacent frames in the cylindrical geodesic unfolded coordinate system and corrects the second frame geodesic unfolded map to a timing reference consistent with the first frame. After continuously performing this process on the twenty-frame geodesic unfolded map, a twenty-frame time-aligned geodesic unfolded map is obtained.
[0043] S4. Construct a defect evidence tensor based on the time-aligned geodesic unfolded map, and determine candidate defect regions and candidate defect types based on the defect evidence tensor.
[0044] The time-aligned geodesic unfolded map is a continuously unfolded image after axial-circumferential joint correction. The defect evidence tensor is a multi-dimensional evidence data structure constructed based on the time-aligned geodesic unfolded map, used to carry evidence information related to the surface anomalies of the subsea pipeline. Determining candidate defect regions and candidate defect types based on the defect evidence tensor involves finding spatial regions in the defect evidence tensor that meet the defect response conditions, and determining the corresponding candidate defect types for these spatial regions based on the response of different evidence information. The input for this step is the time-aligned geodesic unfolded map; the processing involves extracting evidence information related to surface anomalies, forming the defect evidence tensor, and determining the region and type; the output is the candidate defect regions and candidate defect types.
[0045] Specifically, the candidate defect region is the area that may correspond to a defect on the outer surface of the subsea pipeline in the cylindrical geodetic unfolding coordinate system. The candidate defect type is the defect category to which the candidate defect region may belong. Since the time-aligned geodetic unfolding map already has a unified axial and circumferential coordinate basis, the evidence in the defect evidence tensor can correspond to specific geodetic locations, thus ensuring spatial and temporal consistency in the determination of the candidate defect region and candidate defect type.
[0046] For example, in the twenty-frame temporally aligned geodesic unfolded map obtained by S3, the system extracts information related to surface anomalies in each frame, such as color changes, texture changes, morphological continuity, and cross-frame stability. This evidence is then organized into a defect evidence tensor according to geodesic location and evidence dimension. For a given axial and circumferential coordinate interval, the defect evidence tensor shows a long, continuous, and cross-frame stable anomalous response in that region. Based on this response, the system identifies the region as a candidate defect region and determines the type corresponding to the response characteristics of that region as the candidate defect type.
[0047] S5. Quantize the candidate defect region in the cylindrical geodetic expansion coordinate system and output the surface defect detection results of the subsea pipeline. The surface defect detection results of the subsea pipeline include defect type, defect location, defect size, defect continuity and defect level.
[0048] Quantifying candidate defect regions and outputting detection results refers to calculating or determining the type, location, extent, cross-frame continuity, and grade of candidate defect regions in a cylindrical geodetic unfolding coordinate system. Defect type indicates the defect category corresponding to the candidate defect region; defect location indicates the spatial position of the candidate defect region on the outer surface of the subsea pipeline; defect size indicates the scale range of the candidate defect region on the outer surface of the subsea pipeline; defect continuity indicates the continuity of the candidate defect region across consecutive frames or consecutive geodetic locations; and defect grade indicates the classification result of the defect corresponding to the candidate defect region.
[0049] Specifically, since the candidate defect areas are already located in a cylindrical geodesic unfolded coordinate system, the defect locations can be directly correlated with axial and circumferential positions. The defect size can be calculated based on the axial span and circumferential span. The defect continuity can be determined based on the correlation between candidate defect areas at different times. The defect level can be determined based on the defect type, size, continuity, and evidence response. The final output of the subsea pipeline surface defect detection results can be saved in structured data format and can be used in conjunction with inspection tasks, pipeline mileage, or maintenance records.
[0050] For example, in the obtained candidate defect regions, a certain area is located approximately twelve meters behind the inspection starting point in the cylindrical geodetic unfolded coordinate system along the axial coordinate, and its circumferential position is slightly to the right of the upper part of the visible pipeline area. The system calculates the defect location and size based on the coordinate range of this candidate defect region, and determines the defect continuity by combining the continuity relationship of this candidate defect region in the temporally aligned geodetic unfolded map of adjacent multiple frames. Subsequently, the system determines the defect level based on the candidate defect type, defect size, defect continuity, and corresponding evidence response. The output subsea pipeline surface defect detection results include the candidate defect type, defect location, defect size, defect continuity, and defect level for this region, and serve as one of the structured detection results of this subsea pipeline outer surface inspection.
[0051] Furthermore, extracting the visible region of the tube from the distortion-free continuous image includes:
[0052] The distortion-free continuous image is subjected to brightness equalization processing to obtain a brightness-equalized image;
[0053] Based on the area and brightness of high reflective points in the brightness equalization image, a high reflective point suppression image is generated;
[0054] Extract the pipe edge line and the pipe center line from the high reflectivity suppression image;
[0055] The set of pixels located between the edge lines of the pipe and whose distance from the center line of the pipe meets a preset distance range is determined as the visible area of the pipe body.
[0056] Different regions in a distortion-free continuous image may have inconsistent brightness due to variations in lighting angle, seawater scattering, or camera exposure. Brightness equalization processing can make the brightness distribution on the outer surface of the underwater pipeline in the image more balanced.
[0057] Generating a high-reflectivity-suppressed image based on the area and brightness of high-reflectivity points refers to identifying regions with abnormally high brightness and areas that meet the judgment criteria, and then suppressing, repairing, or reducing the brightness of these regions. High-reflectivity points are bright areas in a brightness-balanced image formed by underwater lights on pipe surfaces, seawater particles, or localized deposits; the area of high-reflectivity points is used to represent the pixel range of high-reflectivity points in the image.
[0058] Pipeline edge lines can be extracted using edge response, curve fitting, or contour analysis; pipeline center lines can be extracted based on the positional relationship between the two pipeline edge lines or the direction of the pipe texture. Pipeline edge lines represent the two side boundaries of the visible area of the seabed pipeline in a high-reflectivity image, while pipeline center lines represent the center direction line of the visible area of the pipeline.
[0059] The preset distance range is used to limit the effective range of pixels relative to the center line of the pipe; pixels located between the pipe edge lines can initially exclude the background area outside the pipe, while the set of pixels whose distance from the center line of the pipe meets the preset distance range can further exclude noise or misidentified areas outside the edge.
[0060] For example, in a frame of a distortion-free continuous image, the left side is brighter due to reflection from an underwater supplementary light, while the right side is darker due to shadows. The system performs brightness equalization processing on this frame of the distortion-free continuous image to compress the brightness difference between the left and right areas of the pipe surface, outputting a brightness-equalized image. In the brightness-equalized image, there is a highly reflective point above the pipe surface with an area of several pixels and a brightness higher than the surrounding area. The system determines this highly reflective point as the area to be suppressed based on its area and brightness, and suppresses its brightness so that this area no longer interferes with the extraction of the pipe edge lines. After processing, a highly reflective point suppressed image is output. In the highly reflective point suppressed image, the seabed pipe is distributed in an approximately elongated area. The system extracts two pipe edge lines corresponding to the outer contour of the pipe from the image, and generates a pipe center generation line located in the middle direction of the pipe body based on the geometric relationship between the two pipe edge lines. In the same frame image, the system takes the pixels between the two pipe edge lines as the initial range and calculates the distance of each pixel to the pipe center line. For pixels located between the two pipe edge lines and whose distance meets the preset distance range, the system includes them in the visible area of the pipe body; for pixels located outside the pipe edge lines or whose distance does not meet the preset distance range, the system does not include them in the visible area of the pipe body. The final output visible area of the pipe body corresponds to the visible part of the outer surface of the seabed pipe.
[0061] Furthermore, before performing ray-cylindrical surface intersection calculation on the visible area of the pipe body based on the camera calibration parameters and the prior knowledge of the pipe cylinder, the following steps are also included:
[0062] Fit the pipe projection boundary curve based on the pipe edge line, or fit the boundary ellipse when the visible cross-section arc meets the fitting conditions.
[0063] Estimate the local cylinder orientation based on the pipe projection boundary curve or the boundary ellipse, the pipe center generation line, and the pipe cylinder prior.
[0064] The local cylindrical posture includes the pipe axis direction, the pipe axis reference point, and the pipe radius. The pipe radius is determined by pipe design parameters, ranging equipment, sonar / laser assisted data, or inspection platform posture data.
[0065] Since the visible boundary of a cylinder surface under perspective imaging is usually represented by the pipe projection boundary curve, and may also exhibit an elliptical projection shape when the visible cross-sectional arc meets the fitting conditions, the pipe projection boundary curve or boundary ellipse is fitted based on the pipe edge line. The pipe projection boundary curve or boundary ellipse provides the cylinder projection boundary constraint, the pipe center generation line provides the pipe extension direction constraint, and the pipe cylinder prior, robot pose, ranging equipment, and sonar / laser-assisted data provide scale and spatial attitude constraints. Estimating the local cylinder attitude based on the above information refers to comprehensively determining the pipe axis direction, the pipe axis reference point, and the pipe radius.
[0066] The pipeline axis direction is used to indicate the direction of the subsea pipeline in space; the pipeline axis reference point is used to indicate the reference position on the pipeline axis; the pipeline radius is used to indicate the radius of the pipeline cylinder surface determined by the pipeline cylinder prior and the geometric relationship of the image.
[0067] For example, in the high-reflectivity image from the previous case, the system has already extracted two pipe edge lines. Based on the pixels along these two pipe edge lines, the system performs projection boundary curve fitting and obtains a boundary ellipse corresponding to the visible pipe contour when the visible cross-section arc satisfies the fitting conditions. After obtaining the projection boundary curve or boundary ellipse and the pipe center generation line, the system interprets the visible portion of the pipe in the current image as a cylindrical projection based on the pipe cylinder prior. The system uses the pipe center generation line to determine the image projection direction along the pipe axis and, combined with the projection boundary curve or boundary ellipse and ranging scale constraints, estimates the pipe axis reference point and the pipe radius.
[0068] Furthermore, the visible area of the tube body is subjected to ray-cylindrical surface intersection calculation to establish a cylindrical geodesic development coordinate system and generate a geodesic development map, including:
[0069] Based on the camera calibration parameters, the distortion-free pixels in the visible area of the tube are back-projected into visual rays;
[0070] Find the forward intersection point between the visual ray and the cylindrical surface defined by the local cylindrical posture;
[0071] The axial coordinates are determined based on the projection of the forward intersection point onto the pipe axis.
[0072] The circumferential coordinates are determined based on the visible circumferential angle of the forward intersection point on the pipe cross-section.
[0073] The cylindrical geodesic unfolding coordinate system is established using the axial coordinates and the circumferential coordinates, and resampling is performed according to the preset axial sampling interval and the preset visible circumferential angle sampling interval to generate the geodesic unfolding map.
[0074] Backprojecting distorted pixels into visual rays based on camera calibration parameters refers to converting the position of a two-dimensional pixel into a spatial ray that originates from the optical center of the camera and passes through the corresponding direction of the pixel, based on the camera's imaging model.
[0075] The forward intersection point is the point where the visual ray intersects the cylindrical surface along the forward direction of the camera. The forward intersection point of the visual ray and the cylindrical surface can be determined by substituting the visual ray equation into the geometric constraints of the cylindrical surface and selecting a valid intersection point located in front of the camera. The cylindrical surface, defined by the local cylindrical attitude, is determined by the pipe axis direction, the pipe axis reference point, and the pipe radius.
[0076] Axial coordinates are used to represent the position of the forward intersection point along the pipe axis. Determining the axial coordinates based on the projection of the forward intersection point onto the pipe axis means using the aforementioned pipe axis reference point as a reference, projecting the position of the forward intersection point relative to the pipe axis reference point onto the pipe axis, and using the projected length or projected position as the axial coordinate.
[0077] The pipe cross-section is a section perpendicular to the pipe axis. The circumferential angle of the forward intersection point on the pipe cross-section represents the angular position of that point relative to the pipe circumferential reference direction. Determining the circumferential coordinates based on this circumferential angle involves projecting the forward intersection point onto the pipe cross-section and calculating its circumferential angle within the currently visible circumferential range based on the pipe radius and the reference direction.
[0078] The cylindrical geodesic unfolding coordinate system uses axial and circumferential coordinates as its two dimensions. A preset axial sampling interval limits the sampling distance of the unfolded map along the axial direction, and a preset visible circumferential angle sampling interval limits the sampling angle interval of the unfolded map along the visible circumferential direction. Resampling according to these sampling intervals means mapping the pixel color or feature value corresponding to the forward intersection point to a regular cylindrical geodesic unfolding coordinate grid.
[0079] For example, for a distorted pixel in the visible area of the pipe, whose pixel coordinates are located slightly to the right of the image center, the system determines the direction of the distorted pixel relative to the camera's optical center based on the camera calibration parameters, and forms a visual ray pointing from the camera's optical center to the pipe surface. For the visual ray corresponding to the distorted pixel, the system intersects it with the cylindrical surface defined by the local cylindrical pose. If two intersection points are obtained, one located behind the camera and the other in front of the camera, the system takes the intersection point in front of the camera as the forward intersection point. This forward intersection point is located relative to the pipe axis reference point. Located at a certain distance in the positive direction along the pipeline axis, the system projects this position onto the pipeline axis to obtain the axial coordinates of the forward intersection point. The system then projects this forward intersection point onto the corresponding pipeline cross-section and calculates its circumferential angle relative to a preset reference direction to obtain the circumferential coordinates. The system organizes the axial and circumferential coordinates corresponding to all forward intersection points into a cylindrical geodesic unfolded coordinate system and sets a preset axial sampling interval and a preset visible circumferential angle sampling interval. For each unfolded grid, the system interpolates and fills the grid based on the color values corresponding to adjacent forward intersection points to obtain the geodesic unfolded map of that frame.
[0080] Furthermore, axial-circular joint correction is performed on the geodesic unfolded maps of adjacent frames to obtain time-aligned geodesic unfolded maps, including:
[0081] Brightness-stabilized feature channels are extracted from the geodesic unfolded maps of adjacent frames, respectively.
[0082] The axial and circumferential displacements between adjacent frames are calculated based on the brightness stability feature channel.
[0083] Subpixel registration is performed on the axial displacement and the circumferential displacement to obtain the subpixel corrected displacement;
[0084] The subpixel correction displacement of multiple consecutive frames is temporally smoothed, and the geodesic unfolded map is corrected based on the smoothed subpixel correction displacement to obtain the temporally aligned geodesic unfolded map.
[0085] Since the ambient light on the seabed may change with the movement of the underwater robot, directly using the original brightness may lead to unstable registration. Extracting brightness-stable feature channels can make subsequent axial and circumferential displacement calculations more dependent on the relatively stable surface texture or structural information of the pipe.
[0086] Axial and circumferential displacements can be calculated based on brightness-stable feature channels through correlation matching, feature point matching, or local block matching.
[0087] Subpixel registration is used to correct axial and circumferential displacements with an accuracy of less than one sampling unit. Since the true offset between adjacent frames may not be an integer sampling unit, residual misalignment may still exist if only integer displacement correction is performed. Subpixel registration of axial and circumferential displacements can yield finer subpixel-corrected displacements.
[0088] Temporal smoothing is used to reduce the impact of single-frame registration errors on continuous sequences. Subpixel correction displacements over multiple consecutive frames may fluctuate due to weak local textures, lighting variations, or noise. Temporal smoothing can yield a more stable sequence of correction displacements. By correcting the geodesic unfolded map based on the smoothed displacements, a temporally aligned geodesic unfolded map can be obtained.
[0089] For example, in the geodesic unfolded images of two adjacent frames, the overall brightness of the second frame is slightly higher than that of the first frame, but the positional relationship of the surface texture of the pipe is basically the same. The system extracts the brightness stable feature channels from the two geodesic unfolded images respectively, so as to reduce the impact of the overall brightness difference on the subsequent displacement calculation. The system matches the brightness stable feature channels of the two frames and determines that the second frame is offset forward by three sampling units in the axial direction and offset downward by one sampling unit in the circumferential direction relative to the first frame. Thus, the axial displacement and circumferential displacement between adjacent frames are obtained. Based on the axial displacement of three sampling units and the circumferential displacement of one sampling unit, the system further determines that the axial displacement of the second frame relative to the first frame is three points and two sampling units, and the circumferential displacement is zero points and eight sampling units through sub-pixel registration. Furthermore, in the twenty-frame geodesic unfolded map, the system calculates nineteen consecutive sets of subpixel correction displacements. Due to the local suspended particle occlusion between the seventh and eighth frames, the subpixel correction displacements fluctuate slightly abnormally. The system performs temporal smoothing on the subpixel correction displacements of consecutive frames to ensure that the correction displacements between the seventh and eighth frames are continuous with the preceding and following frames. Finally, the system corrects the twenty-frame geodesic unfolded map based on the smoothed displacement sequence to obtain a temporally aligned geodesic unfolded map.
[0090] Furthermore, the defect evidence tensor includes scratch evidence channels, peeling evidence channels, corrosion spot evidence channels, local depression shadow evidence channels, and suspected attachment obstruction evidence channels.
[0091] The scratch evidence channel is constructed from a slender linear response, local width stability, and geodesic path continuity.
[0092] The stripping evidence channel is constructed by boundary-core contrast, edge closure, and internal color abrupt change;
[0093] The corrosion spot evidence channel is constructed from chromaticity shift, local texture roughness, and patch irregularity;
[0094] The local concave shadow evidence channel is constructed using indicators of cylindrical reference brightness profile deviation and brightness gradient asymmetry.
[0095] The suspected attachment obstruction evidence channel is constructed from cross-frame registration residuals and obstruction boundary closure.
[0096] Slender linear response indicates the degree to which a region exhibits a slender linear response in a cylindrical geodesic unfolded coordinate system; local width stability indicates whether the width of the linear response is stable within a local range; geodesic path continuity indicates whether the linear response extends continuously along the geodesic path in the cylindrical geodesic unfolded coordinate system; all three are used together to construct scratch evidence channels.
[0097] Boundary-core contrast is used to indicate the color or brightness difference between the region boundary and the region core; edge closure is used to indicate whether the region boundary forms a closed or nearly closed structure; internal color abrupt change is used to indicate whether there is a color change within the region. All three are used together to construct a path for erosion evidence.
[0098] Chromaticity offset is used to indicate the degree of deviation of the area color from the surrounding pipe surface; local texture roughness is used to indicate the roughness of the area texture variation; patch irregularity is used to indicate the degree of irregularity of the area shape boundary or internal structure. The three are used together to construct the corrosion spot evidence channel.
[0099] The cylindrical reference brightness profile deviation is used to indicate the degree of deviation of the brightness of the candidate region from the normal brightness distribution of the cylindrical surface of the pipe; the brightness gradient asymmetry index is used to indicate whether there is asymmetry in the transition between brightness and darkness on both sides of the region. The two are used together to construct the evidence channel of local concave shadows.
[0100] Cross-frame registration residuals are used to indicate the degree of difference that still exists in local areas after temporal alignment of adjacent or consecutive frames; occlusion boundary closure is used to indicate whether the boundary of the suspected occlusion area forms a closed or nearly closed structure. The two are used together to construct a channel for evidence of suspected attachment occlusion.
[0101] Furthermore, determining candidate defect regions and candidate defect types based on the defect evidence tensor includes:
[0102] Normalize the scratch evidence channel, the peeling evidence channel, the corrosion spot evidence channel, the local indentation shadow evidence channel, and the suspected attachment obstruction evidence channel in the defect evidence tensor to obtain the corresponding defect confidence map;
[0103] Connectivity filtering is performed on each of the aforementioned defect confidence graphs to obtain the initial defect regions;
[0104] Based on the area, aspect ratio, and boundary closure of the initial defect region, geometric constraint filtering is performed on the initial defect region to obtain the candidate defect region;
[0105] The defect type corresponding to the defect confidence map with the largest response value in each defect confidence map is determined as the candidate defect type.
[0106] Because the construction criteria for scratch evidence channels, peeling evidence channels, corrosion spot evidence channels, local indentation shadow evidence channels, and suspected attachment obstruction evidence channels differ, the range of original response values may vary. By normalizing each channel, corresponding defect confidence maps can be obtained. Connected component filtering is used to extract spatially connected regions from the defect confidence maps whose responses meet certain conditions. The initial defect region is the potential defect region obtained through connected component filtering. Geometric constraint filtering based on area, aspect ratio, and boundary closure can eliminate unreasonable regions caused by noise, reflection, or local texture. The defect confidence map with the largest response value indicates the highest degree of matching between the candidate defect region and the corresponding defect type. Determining the defect type corresponding to the defect confidence map with the largest response value as the candidate defect type enables defect type determination based on multi-channel confidence responses.
[0107] For example, in a certain geodesic deployment area, the original response value range of the scratch evidence channel is 0 to 120, and the original response value range of the corrosion spot evidence channel is 0 to 1.8. The system normalizes the response values of the scratch evidence channel, the peeling evidence channel, the corrosion spot evidence channel, the local depression shadow evidence channel, and the suspected attachment obstruction evidence channel, converting them into a uniform confidence range.
[0108] In the defect confidence map corresponding to the scratch evidence channel, the system found a group of continuous high-response pixels forming a linear connected region; in the defect confidence map corresponding to the corrosion spot evidence channel, the system found a group of blocky high-response pixels forming a patchy connected region. The system performed connected region filtering on the defect confidence maps respectively to obtain multiple initial defect regions.
[0109] Among multiple initial defect regions, one region is too small and its aspect ratio does not meet the geometric constraints of the corresponding defect type, so it is filtered out by the system; another linear region has the required area, a large aspect ratio, and its boundary shape matches its response type, so it is retained as a candidate defect region.
[0110] The average response value of a candidate defect area in the defect confidence map corresponding to the scratch evidence channel is 0.86, and the average response value in the defect confidence map corresponding to the corrosion spot evidence channel is 0.34. The response values in other defect confidence maps are even lower. The system determines the defect type corresponding to the scratch evidence channel with the largest response value as the candidate defect type of the candidate defect area.
[0111] Furthermore, when determining the candidate defect region and candidate defect type based on the defect evidence tensor, if the cylindrical reference brightness profile deviates by more than a first preset threshold and the brightness gradient asymmetry index exceeds a second preset threshold, then the response value of the local concave shadow evidence channel is increased.
[0112] If the cross-frame registration residual exceeds the third preset threshold and the occlusion boundary closure exceeds the fourth preset threshold, then the response value of the suspected attachment occlusion evidence channel is increased.
[0113] Based on the improved evidence channels for local depression shadows and suspected attachment obstruction, the local depression shadows and suspected attachment obstruction can be distinguished.
[0114] The first preset threshold is used to determine whether the deviation of the cylindrical reference brightness profile reaches a level requiring enhancement of the local concave shadow evidence channel; the second preset threshold is used to determine whether the brightness gradient asymmetry index reaches a level requiring enhancement of the local concave shadow evidence channel. When the deviation of the cylindrical reference brightness profile exceeds the first preset threshold and the brightness gradient asymmetry index exceeds the second preset threshold, it indicates that the region has brightness profile deviation and gradient asymmetry characteristics corresponding to local concave shadows, thus increasing the response value of the local concave shadow evidence channel.
[0115] The third preset threshold is used to determine whether the cross-frame registration residual reaches a level that requires enhancement of the suspected attachment occlusion evidence channel; the fourth preset threshold is used to determine whether the occlusion boundary closure reaches a level that requires enhancement of the suspected attachment occlusion evidence channel. When the cross-frame registration residual exceeds the third preset threshold and the occlusion boundary closure exceeds the fourth preset threshold, it indicates that the region has cross-frame residual and closed occlusion boundary features corresponding to the suspected attachment occlusion, thus increasing the response value of the suspected attachment occlusion evidence channel.
[0116] The enhanced evidence channels for localized depression shadows and suspected attachment occlusion amplify two visually similar but causally different responses. Distinguishing between these two channels involves comparing the response relationships of candidate defect areas in the enhanced evidence channels for localized depression shadows and suspected attachment occlusion when the candidate defect type is determined, thereby differentiating between localized depression shadows and suspected attachment occlusion.
[0117] For example, in a candidate defect region, the system calculates the cylindrical reference brightness profile deviation to be 0.62, with a first preset threshold of 0.50; the brightness gradient asymmetry index is 0.58, with a second preset threshold of 0.45. Since both exceed their respective thresholds, the system increases the response value of this region in the local concave shadow evidence channel, making it easier to identify as the type corresponding to the local concave shadow in subsequent candidate defect region and candidate defect type determination.
[0118] In another candidate defect region, the system calculated the cross-frame registration residual to be 0.71, the third preset threshold to be 0.55, the occlusion boundary closure to be 0.68, and the fourth preset threshold to be 0.60. Since both exceed the corresponding thresholds, the system increases the response value of this region in the suspected attachment occlusion evidence channel, making it easier for this region to be identified as the type corresponding to the suspected attachment occlusion in subsequent candidate defect region and candidate defect type judgments.
[0119] For the two candidate defect areas mentioned above, after the local depression shadow evidence channel of the first candidate defect area was improved, its response value was higher than that of the suspected attachment occlusion evidence channel, and the system determined its candidate defect type as local depression shadow; after the suspected attachment occlusion evidence channel of the second candidate defect area was improved, its response value was higher than that of the local depression shadow evidence channel, and the system determined its candidate defect type as suspected attachment occlusion.
[0120] Furthermore, the candidate defect region is quantified in the cylindrical geodesic expansion coordinate system, including:
[0121] The centroid coordinates of the candidate defect region in the cylindrical geodesic expansion coordinate system are used to determine the defect location, which includes the axial position and the circumferential position.
[0122] The axial coordinate span of the candidate defect region in the cylindrical geodesic expansion coordinate system is determined as the axial length.
[0123] The circumferential width is determined by multiplying the visible circumferential angular span of the candidate defect region in the cylindrical geodesic expansion coordinate system with the radius of the pipe.
[0124] The defect area is determined based on the axial length, the circumferential width, the number of grids covered by the candidate defect region, and the surface area corresponding to a single grid.
[0125] The defect dimensions include the axial length, the circumferential width, and the defect area.
[0126] The centroid coordinates are used to represent the center position of the candidate defect region in the cylindrical geodesic expansion coordinate system. The defect position includes axial position and circumferential position. The axial position represents the position of the candidate defect region along the pipe axis, and the circumferential position represents the position of the candidate defect region along the pipe circumference.
[0127] The axial coordinate span is the difference between the maximum and minimum axial coordinates within the candidate defect region. Defining the axial coordinate span as the axial length allows us to represent the length of the candidate defect region along the pipe axis.
[0128] The circumferential angle span is the angle difference between the maximum and minimum circumferential angles within the currently visible circumferential range of the candidate defect region. The circumferential width is determined by multiplying the circumferential angle span by the pipe radius, based on the relationship between arc length, radius, and angle, thus converting the angle range into the circumferential width of the pipe surface.
[0129] The number of grid cells covered by the candidate defect region is used to represent the coverage area of that region in the resampled grid of the cylindrical geodesic unfolded coordinate system. Determining the defect area based on the axial length, circumferential width, and the number of grid cells covered by the candidate defect region refers to summing the surface areas corresponding to individual geodesic grid cells, or correcting for the effective grid coverage ratio by combining the product of the axial length and circumferential width. This avoids overestimation of the area caused by using only the area of the circumscribed rectangle.
[0130] Axial length reflects the size of the defect along the pipe axis, circumferential width reflects the size of the defect along the pipe circumference, and defect area reflects the coverage of the defect on the outer surface of the subsea pipeline. Together, these three dimensions form the basis for subsequent severity scoring and defect level determination.
[0131] For example, a candidate defect region may consist of multiple geodetic grids. The system calculates the average axial and circumferential coordinates of all grids within the candidate defect region to obtain the centroid coordinates. These centroid coordinates are used to determine the defect location, where the axial position is 12.4 meters from the starting point of the current inspection segment, and the circumferential position is 60 degrees relative to the reference direction. The minimum axial coordinate of this candidate defect region in the cylindrical geodetic unfolded coordinate system is 12.2 meters, and the maximum axial coordinate is 12.7 meters. The system determines the difference between these two values as the axial length, resulting in an axial length of 0.5 meters, which is used as part of the defect size.
[0132] The circumferential width can be expressed as: Circumferential width = Circumferential angular span × Pipe radius. Where, the circumferential angular span is the range of circumferential angles covered by the candidate defect region in the cylindrical geodesic unfolded coordinate system, and the unit can be radians; the pipe radius is the pipe radius in the local cylindrical orientation; the circumferential width is the surface width of the candidate defect region along the circumference of the pipe. If the circumferential angular span is in degrees, it can be converted to radians before multiplying by the pipe radius. In this case, the circumferential angular span of the candidate defect region in the cylindrical geodesic unfolded coordinate system is 0.08 radians, and the pipe radius is 0.6 meters. The system multiplies 0.08 radians by 0.6 meters to obtain a circumferential width of 0.048 meters, which is used as part of the defect size.
[0133] The candidate defect region has an axial length of 0.5 meters and a circumferential width of 0.048 meters. The number of effective meshes covered by this candidate defect region accounts for approximately 0.65% of the number of its circumscribed meshes. The system combines the axial length, circumferential width, and the number of meshes covered by the candidate defect region to determine the defect area, which is approximately 0.0156 square meters. This defect area, along with the axial length and circumferential width, constitutes the defect size. For the same candidate defect region, the system's final output defect size includes an axial length of 0.5 meters, a circumferential width of 0.048 meters, and the defect area calculated based on mesh coverage.
[0134] Furthermore, the output of the surface defect detection results for the subsea pipeline includes:
[0135] The candidate defect regions in the temporally aligned geodesic unfolded map of different frames are used as graph nodes;
[0136] When the axial coordinate difference, circumferential coordinate difference, and regional overlap between two graph nodes meet the preset association conditions, a connection edge is established between the two graph nodes to form a cross-frame connection graph.
[0137] The defect continuity is determined based on the connected subgraph containing the candidate defect region in the cross-frame connectivity graph;
[0138] A severity score is calculated based on the candidate defect type, the defect size, the defect continuity, and the channel response value of the defect evidence tensor.
[0139] Based on the comparison between the severity score and the preset grading threshold, the defect level is determined, and the detection result of the surface defect of the subsea pipeline is output.
[0140] By treating candidate defect regions as graph nodes, the cross-frame defect association problem can be transformed into a node association problem in a graph structure.
[0141] Axial coordinate difference represents the difference in axial position between candidate defect regions corresponding to two graph nodes; circumferential coordinate difference represents the difference in circumferential position between candidate defect regions corresponding to two graph nodes; and region overlap represents the degree of overlap between two candidate defect regions in the cylindrical geodesic unfolded coordinate system. Preset association conditions are used to determine whether two graph nodes might represent the same defect observed in different frames. When the axial coordinate difference, circumferential coordinate difference, and region overlap satisfy the preset association conditions, connecting edges are established to form a cross-frame connected graph.
[0142] A connected subgraph is a set of graph nodes that are interconnected through connecting edges in a cross-frame connected graph. Determining defect continuity based on a connected subgraph containing the candidate defect region means representing defect continuity by the degree to which the same defect appears continuously in multiple frames or multiple geodesic locations and forms a connection relationship.
[0143] Candidate defect type reflects defect category, defect size reflects defect spatial scale, defect continuity reflects defect spanning frames, and the channel response value of the defect evidence tensor reflects the intensity of the defect's response at the evidence level. Calculating a severity score based on the above allows the defect level to be determined not only by a single area or a single response, but also by a combination of multiple pieces of information.
[0144] For example, in a time-aligned geodesic unfolded map of 20 consecutive frames, the same suspected scratch area is identified as a candidate defect area in the sixth, seventh, eighth and ninth frames. The system uses these four candidate defect areas as four graph nodes, and also uses candidate defect areas in other frames as graph nodes to form a graph node set.
[0145] The two graph nodes in the sixth and seventh frames have a small difference in axial coordinates and a small difference in circumferential coordinates, and their regions have a high degree of overlap. The system determines that the two meet the preset association conditions, so a connection edge is established between the two graph nodes. The corresponding graph nodes in the seventh and eighth frames, and the eighth and ninth frames also meet the preset association conditions, so a connection edge is established for each of them, ultimately forming a cross-frame connection graph containing multiple graph nodes and connection edges.
[0146] In the cross-frame connection graph, the four graph nodes in the aforementioned sixth to ninth frames form a connected subgraph through connecting edges. This connected subgraph corresponds to the current candidate defect region. The system determines the continuity of the defect based on the number of frames spanned by the connected subgraph, the node connection relationship, and the continuous spatial coverage, thus obtaining the result that the defect exists stably in multiple consecutive frames.
[0147] The severity score can be determined by normalized defect size, defect continuity, and channel response values. All inputs can be normalized before calculation to reduce the impact of different dimensions on the score. Candidate defect types can be assigned different weights. Defect size can be characterized by axial length, circumferential width, and defect area. Defect continuity can be characterized by the number of consecutive frames and connectivity relationships corresponding to the connected subgraph containing the candidate defect region. The channel response value of the defect evidence tensor can be the response value of the evidence channel corresponding to the candidate defect type or multiple related channel response values.
[0148] For candidate defect regions with scratches as the aforementioned candidate defect type, the system normalizes its axial length, circumferential width, and defect area to form a defect size; the result of this connected subgraph spanning four frames forms a defect continuity quantity; and the channel response value of the scratch evidence channel is used as the primary evidence response. The system calculates a severity score based on the candidate defect type, defect size, defect continuity, and the channel response value of the defect evidence tensor.
[0149] The system pre-sets multiple preset grading thresholds to classify severity scores into different defect levels. If the severity score of the aforementioned scratch candidate defect area falls into the intermediate level range, the system determines its defect level based on the comparison results and outputs it along with the candidate defect type, defect location, defect size, and defect continuity. The final defect detection results for the subsea pipeline surface include: defect type as scratch; defect location at 12.4 meters axially and 60 degrees circumferentially; defect size including axial length, circumferential width, and defect area; defect continuity spanning multiple consecutive frames; and defect level obtained by comparing the severity score with the preset grading thresholds.
[0150] A machine vision-based surface defect detection system for subsea pipelines includes:
[0151] The image acquisition and distortion correction module is used to acquire continuous color visual images of the outer surface of the subsea pipeline and camera calibration parameters, and to perform distortion correction processing on the continuous color visual images to obtain distorted continuous images.
[0152] The pipe geodesic unfolding module is used to extract the visible area of the pipe from the distortion-free continuous image, and according to the camera calibration parameters and the pipe cylinder prior, to perform ray-cylindrical surface intersection on the visible area of the pipe, establish a cylindrical geodesic unfolding coordinate system, and generate a geodesic unfolding map.
[0153] The temporal joint correction module is used to perform axial-circumferential joint correction on the geodesic unfolded maps of adjacent frames in the cylindrical geodesic unfolded coordinate system to obtain a temporally aligned geodesic unfolded map.
[0154] The defect evidence analysis module is used to construct a defect evidence tensor based on the time-aligned geodesic unfolded map, and to determine candidate defect regions and candidate defect types based on the defect evidence tensor.
[0155] The defect quantization output module is used to quantify the candidate defect region in the cylindrical geodetic expansion coordinate system and output the surface defect detection results of the subsea pipeline. The surface defect detection results of the subsea pipeline include defect type, defect location, defect size, defect continuity and defect level.
[0156] Furthermore, the use of terms such as "first" and "second" in this invention is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Meanwhile, the meaning of "and / or" throughout the text includes three solutions; for example, "A and / or B" includes solution A, solution B, or a solution that simultaneously satisfies A and B. Additionally, the technical solutions of the various embodiments can be combined with each other, but this should be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0157] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0158] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0159] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.
[0160] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and by calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as image acquisition function, defect analysis function, etc.), etc.; the data storage area may store data created based on the surface defect detection task of the subsea pipeline (such as inspection image data, detection result data, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0161] Wherein, if the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the implementation of one or more of the method flows in the above embodiments of the present invention can also be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above-described method embodiments. Wherein, the computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0162] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. One or more modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0163] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention can be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for detecting surface defects in subsea pipelines based on machine vision, characterized in that, include: S1. Obtain a continuous color visual image of the outer surface of the subsea pipeline and camera calibration parameters, and perform distortion correction processing on the continuous color visual image to obtain a distortion-corrected continuous image. S2. Extract the visible area of the pipe body from the distortion-free continuous image, and perform ray-cylindrical surface intersection on the visible area of the pipe body according to the camera calibration parameters and the prior of the pipe cylinder, establish a cylindrical geodesic unfolding coordinate system, and generate geodesic unfolding maps for each frame. S3. In the cylindrical geodesic unfolding coordinate system, perform axial-circumferential joint correction on the geodesic unfolding maps of adjacent frames to obtain time-aligned geodesic unfolding maps; S4. Construct a defect evidence tensor based on the time-aligned geodesic unfolded map, and determine candidate defect regions and candidate defect types based on the defect evidence tensor; S5. Quantize the candidate defect region in the cylindrical geodetic expansion coordinate system and output the surface defect detection results of the subsea pipeline. The surface defect detection results of the subsea pipeline include defect type, defect location, defect size, defect continuity and defect level.
2. The machine vision-based surface defect detection method for subsea pipelines according to claim 1, characterized in that, Extracting the visible region of the tube from the distortion-free continuous image includes: The distortion-free continuous image is subjected to brightness equalization processing to obtain a brightness-equalized image; Based on the area and brightness of high reflective points in the brightness equalization image, a high reflective point suppression image is generated; Extract the pipe edge line and the pipe center line from the high reflectivity suppression image; The set of pixels located between the edge lines of the pipe and whose distance from the center line of the pipe meets a preset distance range is determined as the visible area of the pipe body.
3. The machine vision-based surface defect detection method for subsea pipelines according to claim 2, characterized in that, Based on the camera calibration parameters and the prior knowledge of the cylindrical pipe, before performing ray-cylindrical surface intersection calculation on the visible area of the pipe, the process further includes: Fit the pipe projection boundary curve based on the pipe edge line, or fit the boundary ellipse when the visible cross-section arc meets the fitting conditions. Estimate the local cylinder orientation based on the pipe projection boundary curve or the boundary ellipse, the pipe center generation line, and the pipe cylinder prior. The local cylindrical posture includes the pipe axis direction, the pipe axis reference point, and the pipe radius.
4. The machine vision-based surface defect detection method for subsea pipelines according to claim 3, characterized in that, Perform ray-cylindrical surface intersection calculations on the visible area of the tube body to establish a cylindrical geodesic development coordinate system, generating geodesic development maps for each frame, including: Based on the camera calibration parameters, the distortion-free pixels in the visible area of the tube are back-projected into visual rays; Find the forward intersection point between the visual ray and the cylindrical surface defined by the local cylindrical posture; The axial coordinates are determined based on the projection of the forward intersection point onto the pipe axis. The circumferential coordinates are determined based on the visible circumferential angle of the forward intersection point on the pipe cross-section. The cylindrical geodesic unfolding coordinate system is established using the axial coordinates and the circumferential coordinates, and resampling is performed according to the preset axial sampling interval and the preset visible circumferential angle sampling interval to generate the geodesic unfolding map.
5. The machine vision-based surface defect detection method for subsea pipelines according to claim 1, characterized in that, Axial-circular joint correction is performed on the geodesic unfolded maps of adjacent frames to obtain a time-aligned geodesic unfolded map, including: Brightness-stabilized feature channels are extracted from the geodesic unfolded maps of adjacent frames, respectively. The axial and circumferential displacements between adjacent frames are calculated based on the brightness stability feature channel. Subpixel registration is performed on the axial displacement and the circumferential displacement to obtain the subpixel corrected displacement; The subpixel correction displacement of multiple consecutive frames is temporally smoothed, and the geodesic unfolded map is corrected based on the smoothed subpixel correction displacement to obtain the temporally aligned geodesic unfolded map.
6. The method for detecting surface defects in subsea pipelines based on machine vision according to claim 1, characterized in that, The defect evidence tensor includes scratch evidence channels, peeling evidence channels, corrosion spot evidence channels, local indentation shadow evidence channels, and suspected attachment obstruction evidence channels. The scratch evidence channel is constructed from a slender linear response, local width stability, and geodesic path continuity. The stripping evidence channel is constructed by boundary-core contrast, edge closure, and internal color abrupt change; The corrosion spot evidence channel is constructed from chromaticity shift, local texture roughness, and patch irregularity; The local concave shadow evidence channel is constructed using indicators of cylindrical reference brightness profile deviation and brightness gradient asymmetry. The suspected attachment obstruction evidence channel is constructed from cross-frame registration residuals and obstruction boundary closure.
7. The method for detecting surface defects of subsea pipelines based on machine vision according to claim 6, characterized in that, Based on the defect evidence tensor, candidate defect regions and candidate defect types are determined, including: Normalize the scratch evidence channel, the peeling evidence channel, the corrosion spot evidence channel, the local indentation shadow evidence channel, and the suspected attachment obstruction evidence channel in the defect evidence tensor to obtain the corresponding defect confidence map; Connectivity filtering is performed on each of the aforementioned defect confidence graphs to obtain the initial defect regions; Based on the area, aspect ratio, and boundary closure of the initial defect region, geometric constraint filtering is performed on the initial defect region to obtain the candidate defect region; The defect type corresponding to the defect confidence map with the largest response value in each defect confidence map is determined as the candidate defect type.
8. The method for detecting surface defects in subsea pipelines based on machine vision according to claim 7, characterized in that, When determining the candidate defect type based on the defect evidence tensor, if the cylindrical reference brightness profile deviates by more than a first preset threshold and the brightness gradient asymmetry index exceeds a second preset threshold, then the response value of the local concave shadow evidence channel is increased. If the cross-frame registration residual exceeds the third preset threshold and the occlusion boundary closure exceeds the fourth preset threshold, then the response value of the suspected attachment occlusion evidence channel is increased. Based on the improved evidence channels for local depression shadows and suspected attachment obstruction, the local depression shadows and suspected attachment obstruction can be distinguished.
9. The machine vision-based surface defect detection method for subsea pipelines according to claim 8, characterized in that, Quantizing the candidate defect region in the cylindrical geodesic expansion coordinate system includes: The centroid coordinates of the candidate defect region in the cylindrical geodesic expansion coordinate system are used to determine the defect location, which includes the axial position and the circumferential position. The axial coordinate span of the candidate defect region in the cylindrical geodesic expansion coordinate system is determined as the axial length. The circumferential width is determined by multiplying the visible circumferential angular span of the candidate defect region in the cylindrical geodesic expansion coordinate system with the radius of the pipe. The defect area is determined based on the axial length, the circumferential width, the number of grids covered by the candidate defect region, and the surface area corresponding to a single grid. The defect size includes the axial length, the circumferential width, and the defect area. Candidate defect regions in the temporally aligned geodesic unfolded graphs of different frames are used as graph nodes. When the axial coordinate difference, circumferential coordinate difference, and region overlap between two graph nodes meet preset association conditions, a connection edge is established between the two graph nodes to form a cross-frame connection graph. The defect continuity is determined based on the connected subgraph containing the candidate defect regions in the cross-frame connection graph. A severity score is calculated based on the candidate defect type, the defect size, the defect continuity, and the channel response value of the defect evidence tensor. The defect level is determined based on the comparison between the severity score and a preset grading threshold.
10. A machine vision-based surface defect detection system for subsea pipelines, characterized in that, include: The image acquisition and distortion correction module is used to acquire continuous color visual images of the outer surface of the subsea pipeline and camera calibration parameters, and to perform distortion correction processing on the continuous color visual images to obtain distorted continuous images. The tube geodesic unfolding module is used to extract the visible area of the tube from the distortion-free continuous image, and according to the camera calibration parameters and the prior knowledge of the cylinder, perform ray-cylindrical intersection on the visible area of the tube to establish a cylindrical geodesic unfolding coordinate system and generate geodesic unfolding maps for each frame. The temporal joint correction module is used to perform axial-circumferential joint correction on the geodesic unfolded maps of adjacent frames in the cylindrical geodesic unfolded coordinate system to obtain a temporally aligned geodesic unfolded map. The defect evidence analysis module is used to construct a defect evidence tensor based on the time-aligned geodesic unfolded map, and to determine candidate defect regions and candidate defect types based on the defect evidence tensor. The defect quantization output module is used to quantify the candidate defect region in the cylindrical geodetic expansion coordinate system and output the surface defect detection results of the subsea pipeline. The surface defect detection results of the subsea pipeline include defect type, defect location, defect size, defect continuity and defect level.