A method for analyzing three-dimensional morphology space of industrial pipeline inner wall damage

CN122821159APending Publication Date: 2026-09-25GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611026449.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-09-25

AI Technical Summary

Benefits of technology

[0048]本发明公开了一种工业管道内壁损伤三维形态空间分析方法。针对工业管道弯头内壁腐蚀减薄检测中存在的凹陷边缘难以精确定位、真实损伤与噪声干扰难以区分的问题,本发明通过在内窥检测装置中部署斜向环形补光光源与点云采集单元,获取带有表面朝向信息的三维点云,利用斜向照射下高光带集中分布在腐蚀凹陷边缘的光学特性,精准提取损伤边界特征点。通过计算相邻高光采样点的表面朝向夹角变化识别曲率断点,结合连续内壁面拟合与断点间距分析,有效剔除虚假信号并锁定真实损伤采样点。最后采用密度聚类算法将同一腐蚀区域的损伤点归并为斑块,提取最外圈采样点构建连续闭合的真实腐蚀边界轮廓,实现了对弯头内壁腐蚀减薄区域的精确空间定位与三维形态重构。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122821159A_ABST
    Figure CN122821159A_ABST
Patent Text Reader

Abstract

The application provides an industrial pipeline inner wall damage three-dimensional form space analysis method, comprising the following steps: calculating the orientation included angle between adjacent highlight sampling points according to surface orientation, identifying the sampling points with sudden increase of the orientation included angle as curvature breakpoints; removing the curvature breakpoints, integrating the remaining sampling points, and performing surface fitting, starting from the continuous inner wall sampling points and gradually expanding outward to restore the continuous corrosion recessed inner wall surface of the elbow inner side; identifying the breakpoints adjacent to the recessed inner wall surface as real damage sampling points according to the spacing between the curvature breakpoints and the continuous corrosion recessed inner wall surface; performing spatial clustering on the real damage sampling points by using a density clustering algorithm, merging the adjacent damage sampling points belonging to the same corrosion thinning area into corrosion thinning patches; extracting the outer edge contour of the corrosion thinning area according to the distribution of the outermost circle sampling points of each corrosion thinning patch on the inner wall, and obtaining a continuous closed elbow inner wall real corrosion boundary contour.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information technology, and in particular to a three-dimensional morphological spatial analysis method for damage to the inner wall of industrial pipelines. Background Technology

[0002] As a core component of critical infrastructure in petrochemical and energy transportation, the damage state of industrial pipelines directly affects production safety and equipment lifespan. The inner surface of pipeline bends is a high-risk area for corrosion and thinning due to fluid erosion and stress concentration. Accurate measurement and analysis of the three-dimensional morphology of these damaged areas are crucial for developing maintenance strategies and preventing leaks. Current endoscopic-based damage identification methods often rely on enhanced illumination to improve image contrast when dealing with the complex curved surfaces inside bends, hoping to delineate the complete boundaries of corrosion depressions through clearer grayscale differences. However, changes in illumination can trigger a series of cascading spatial measurement problems. When the supplementary light source is adjusted from axial illumination to oblique annular illumination close to the pipe wall, the change in the incident angle directly alters the distribution of the highlight band on the inner wall surface. This shift in highlight band position is not a simple change in brightness but rather leads to a systematic rearrangement of the normal offset of each measurement point in the point cloud data relative to the actual surface. The boundary point set, which originally exhibits a continuous transition under axial illumination, may experience abrupt changes or breaks in its normal offset curve under oblique illumination, disrupting the curvature connection between adjacent points. Specifically, when the boundary of the corrosion thinning zone is located precisely in the region of drastic curvature change on the inner side of the elbow, the highlight band generated by oblique annular illumination will form an uneven reflection distribution along the pipe wall surface. This uneven reflection causes the point cloud acquisition system to resolve the same physically continuous concave boundary into multiple discrete curvature segments when reconstructing the three-dimensional morphology. Faced with these discontinuous boundary data, inspectors find it difficult to determine which discontinuities represent true damage morphology features and which are measurement artifacts caused by changes in illumination conditions, leading to deviations in the assessment of the actual extent and depth of the corrosion area. Therefore, accurately identifying the true boundary location of the corrosion thinning concave under varying incident angles of supplementary lighting, and re-associating the discontinuous point cloud caused by the migration of the highlight band into a continuous damage profile, becomes a key issue for achieving accurate damage analysis of the inner wall of the pipe inside the elbow. Summary of the Invention

[0003] This invention provides a three-dimensional morphological spatial analysis method for damage to the inner wall of industrial pipelines, comprising:

[0004] An oblique ring supplementary light source and a point cloud acquisition unit are configured in the endoscopic inspection device to obtain the initial point cloud of the inner wall of the industrial pipeline bend. The brightness, incident angle of the supplementary light and the three-dimensional coordinates of each sampling point are synchronously associated. The position of the pipe center is determined according to the pipeline axis, and the direction of the surface normal of each sampling point is unified to form a three-dimensional point cloud with surface orientation.

[0005] Based on the three-dimensional point cloud with surface orientation, sampling points with abrupt changes in brightness and intensity and whose incident direction of supplementary light and surface orientation meet the range of specular angle are selected. Combining the position of the sampling points descending from the main area of ​​the pipe wall to the local concave area, specular sampling points continuously distributed along the outer edge of the corrosion thinning concave area are extracted.

[0006] Based on the surface orientation of the highlight sampling points, the orientation angle between adjacent sampling points is calculated, and the location where the orientation angle suddenly increases is identified to form a curvature breakpoint.

[0007] Curvature breakpoints are removed from the high-light sampling points, and surface fitting is performed on the remaining sampling points. The sampling points are then extended from the continuous inner wall sampling points to the outer edge of the depression to form a continuous eroded inner wall surface of the depression.

[0008] Calculate the distance between the curvature breakpoint and the inner wall of the continuous corrosion depression, and screen out the real damage sampling points that are adjacent to the inner wall of the continuous corrosion depression and located in the area enclosed by the outer edge of the depression.

[0009] Density clustering algorithm is used to spatially cluster the actual damage sampling points and merge them into corrosion thinning patches;

[0010] Based on the distribution of sampling points on the outer ring of each corrosion-thinned patch, adjacent outer edge contour segments are connected and closed to obtain the true corrosion boundary contour of the inner wall of the elbow.

[0011] Preferably, forming a three-dimensional point cloud with surface orientation includes:

[0012] By associating the three-dimensional coordinates, brightness, and incident angle of supplementary light of each sampling point with the sampling time and sampling point identifier, a point cloud of illumination information is formed.

[0013] Based on the illumination information point cloud, extract the spatial coordinates of each sampling point and its adjacent sampling points, determine the local surface normal, and unify the direction of the local surface normal by referring to the tube center position;

[0014] Based on the surface orientation and illumination information associated with the sampling point identifier, delete sampling points that lack associated information.

[0015] Preferably, the extraction of highlight sampling points continuously distributed along the outer edge of the erosion-thinned depression includes:

[0016] Filter out brightness abrupt points where the intensity of light and darkness is greater than that of adjacent sampling points and the brightness difference exceeds a preset brightness threshold.

[0017] The location of the highlight band is selected based on the angle between the incident direction of the supplementary light and the orientation of the surface.

[0018] The outer edge of the depression is determined based on the spatial height variation of the high-light band landing point, and sampling points that are continuously distributed in a narrow strip along the outer edge of the depression are retained.

[0019] Preferably, the step of selecting the highlight band landing point based on the angle between the incident direction of the supplementary light and the surface orientation includes:

[0020] Based on the incident direction of the supplementary light, the light-receiving side and the back-light side of adjacent sampling points are distinguished, and the bright-dark boundary points where the brightness difference between the light-receiving side and the back-light side exceeds the preset boundary threshold are selected.

[0021] Calculate the distance from the light-dark boundary point to the tube core, and connect the starting points where the distance changes from stable to continuously increasing to form the concave outer edge;

[0022] Retain the light and dark boundary points that are continuously clustered along the outer edge of the recess and whose adjacent spacing does not exceed a preset adjacency threshold.

[0023] Preferably, the formation of curvature breakpoints includes:

[0024] Based on the three-dimensional coordinates and adjacency relationship of the highlight sampling points, the highlight sampling points are arranged along the edge of the erosion-thinning depression;

[0025] Calculate the surface orientation angle between adjacent highlight sampling points for each pair to form an orientation angle sequence;

[0026] Calculate the difference between the current orientation angle and the previous orientation angle and the next orientation angle respectively, and identify the sampling point where both differences exceed the preset sudden increase threshold.

[0027] Preferably, identifying sampling points where both differences exceed a preset surge threshold includes:

[0028] Filter candidate sudden increase sampling points where the current orientation angle is greater than the previous orientation angle and the next orientation angle, respectively;

[0029] Calculate the surface distance from the candidate abrupt sampling point to the outer edge of the depression, and retain the candidate abrupt sampling points whose surface distance does not exceed the preset edge distance to form curvature breakpoint sampling points located at the junction of the inner wall and outer edge of the corrosion depression.

[0030] Preferably, forming the continuous corrosion recessed inner wall surface includes:

[0031] According to the sampling point identifier, the curvature breakpoints are removed from the specular sampling points, and sampling points with spatial spacing not exceeding a preset adjacency threshold and surface orientation difference not exceeding a preset orientation threshold are retained to form a continuous set of remaining points;

[0032] Select the adjacent sampling points in the continuous remaining point set as control points, establish a local surface based on the three-dimensional coordinates of the control points, and use the minimum sum of the vertical distances from each control point to the local surface as the fitting condition to form an initial fitting surface;

[0033] The remaining sampling points that are adjacent to the edge of the initial fitted surface and whose vertical distance and surface orientation difference do not exceed the corresponding preset threshold are included layer by layer, and the surface is continuously updated and expanded until the edge of the surface reaches the outer edge of the concave area.

[0034] Preferably, the screening of actual damage sampling points that are adjacent to the inner wall of the continuous corrosion depression and located within the area enclosed by the outer edge of the depression includes:

[0035] For each curvature breakpoint, determine the nearest surface point with the smallest three-dimensional coordinate distance on the inner wall of the continuous corrosion depression;

[0036] Calculate the straight-line distance from the curvature breakpoint to the nearest corresponding surface point, and record the breakpoint spacing.

[0037] Filter out curvature breakpoints whose straight-line distance does not exceed a preset proximity threshold and whose corresponding nearest curved surface point is located within the area enclosed by the outer edge of the depression.

[0038] Preferably, the step of using a density clustering algorithm to spatially cluster the actual damage sampling points and merge them into corrosion thinning patches includes:

[0039] Set the neighborhood distance and the minimum number of sampling points within the neighborhood based on the point cloud sampling interval;

[0040] Identify core sampling points within the neighborhood that reach the minimum number of points, and expand the sampling points connected to the density of the core sampling points to form a cluster of damage points;

[0041] Based on the cluster identifier, spatially continuous real damage sampling points are merged, and discrete sampling points that are not included in the damage point cluster are excluded.

[0042] Preferably, the step of connecting and closing adjacent outer edge contour segments based on the outer ring sampling point distribution of each corrosion thinning patch to obtain the true corrosion boundary contour of the elbow inner wall includes:

[0043] Based on clustering identifiers, extract the actual damage sampling points within each corrosion-thinned plaque;

[0044] The real damage sampling points in which there are no sampling points of the same cluster identifier on at least one side of the curved surface neighborhood are determined as the outer ring sampling points;

[0045] Starting from any of the outer ring sampling points, connect the adjacent outer ring sampling points with the smallest surface distance that are not connected in sequence. Terminate the connection when there are no outer ring sampling points with a spacing not exceeding the preset adjacent threshold to form an outer edge contour segment.

[0046] Connect adjacent outer edge contour segments whose endpoint spacing does not exceed a preset closure threshold and whose end extension direction angle does not exceed a preset direction threshold, until the outer edge contour segments are connected end to end.

[0047] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:

[0048] This invention discloses a three-dimensional morphological spatial analysis method for damage to the inner wall of industrial pipelines. Addressing the challenges of accurately locating the edges of depressions and distinguishing between actual damage and noise interference in the detection of corrosion thinning on the inner wall of industrial pipeline elbows, this invention deploys an oblique ring-shaped supplementary light source and a point cloud acquisition unit within an endoscopic inspection device to acquire a three-dimensional point cloud containing surface orientation information. Utilizing the optical characteristic that high-brightness bands are concentrated at the edges of corrosion depressions under oblique illumination, the invention accurately extracts feature points of the damage boundary. By calculating the change in the surface orientation angle between adjacent high-brightness sampling points, curvature breakpoints are identified. Combined with continuous inner wall surface fitting and breakpoint spacing analysis, false signals are effectively eliminated, and the actual damage sampling points are located. Finally, a density clustering algorithm is used to group damage points in the same corrosion area into patches, and the outermost sampling points are extracted to construct a continuous and closed true corrosion boundary contour, achieving precise spatial positioning and three-dimensional morphological reconstruction of the corrosion thinning area of ​​the elbow inner wall. Attached Figure Description

[0049] Figure 1 This is a flowchart of a three-dimensional morphological spatial analysis method for damage to the inner wall of an industrial pipeline according to the present invention.

[0050] Figure 2 This is a schematic diagram of a three-dimensional morphological spatial analysis method for damage to the inner wall of an industrial pipeline according to the present invention.

[0051] Figure 3 This is another schematic diagram of a three-dimensional morphological spatial analysis method for damage to the inner wall of an industrial pipeline according to the present invention. Detailed Implementation

[0052] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0053] like Figures 1-3 This embodiment of a method for three-dimensional morphological spatial analysis of damage to the inner wall of industrial pipelines may specifically include:

[0054] S101. Deploy an oblique ring supplementary light source and a point cloud acquisition unit in the endoscopic inspection device to obtain the initial point cloud of the inner wall of the industrial pipeline bend under oblique illumination, simultaneously collect the brightness and darkness of each sampling point and the incident angle of the supplementary light, analyze and calculate the orientation of the inner wall surface of each sampling point toward the pipe center, and obtain a three-dimensional point cloud with surface orientation.

[0055] An initial point cloud of the inner wall of the elbow is obtained. The brightness, incident angle of supplementary light, and three-dimensional coordinates of each sampling point are associated with the sampling time and sampling point identifier. The pipe center position is determined based on the pipe axis in the coordinate system of the endoscopic detection device, resulting in an illumination information point cloud. Based on this illumination information point cloud, the spatial coordinates of each sampling point and its adjacent sampling points are extracted. The surface normal of each sampling point is determined based on the local surface formed by adjacent sampling points. The direction of the surface normal is uniformly adjusted with reference to the pipe center position, resulting in a surface orientation point cloud pointing towards the pipe center. Based on this surface orientation point cloud, the three-dimensional coordinates, brightness, incident angle of supplementary light, and surface orientation are associated with the sampling point identifier. Sampling points lacking associated information are deleted, resulting in a three-dimensional point cloud with surface orientation information.

[0056] In one embodiment, the endoscopic inspection device includes a point cloud acquisition unit and a brightness acquisition component. The device is installed inside an industrial pipe bend, with an obliquely arranged annular supplementary light source surrounding the field of view of the point cloud acquisition unit. The supplementary light source is tilted towards the pipe wall to illuminate the pipe. The point cloud acquisition unit records the three-dimensional coordinates of sampling points on the inner wall of the bend, and the brightness acquisition component simultaneously records the brightness of the corresponding sampling points.

[0057] Specifically, the sampling time is used as a common index for point cloud data and brightness / darkness data. Each sampling time corresponds to a set of sampling points, each with a unique identifier. The supplementary light incident angle is determined as follows: Let the direction of the light source pointing to the sampling point be vector L, i.e., the direction of the incident light ray, and let the surface orientation towards the tube center at the sampling point be vector N. Then, the supplementary light incident angle θ is the angle between vector L and vector N, obtained through the vector dot product operation θ = arccos(L·N / |L||N|). The physical meaning of θ is the angle between the incident light ray and the normal to the inner surface of the tube wall, ranging from 0° to 90°. When the light irradiates the tube wall perpendicularly, θ ≈ 0°; when the light grazes the tube wall, θ is close to 90°. This ensures that the three-dimensional coordinates, brightness / darkness data, and supplementary light incident angle belong to the same sampling point.

[0058] In one possible implementation, the relative positions of the point cloud acquisition unit and the oblique ring supplementary light source are pre-calibrated. During the sampling process, based on the position and orientation of the endoscopic detection device, each sampling point is converted to a unified pipe coordinate system, and the point cloud is connected according to the overlapping pipe wall positions in adjacent sampling areas to form an initial point cloud covering the inner area of ​​the bend.

[0059] Furthermore, multiple cross-sections are divided from the initial point cloud along the pipe's extension direction. Within each cross-section, inner wall sampling points continuously distributed along the main arc are extracted. Least-squares circular arc fitting is performed on these inner wall sampling points, and the center of the fitted circle is taken as the cross-section center. The centers of each cross-section are then connected sequentially to form the pipe axis. The cross-section center serves as the pipe's center position for the corresponding cross-section.

[0060] It should be noted that the pipe axis in the bend area is spatially curved. For bends with small bending radii, the interval between adjacent cross-sections is reduced to 0.3 to 0.5 times the nominal pipe diameter, ensuring that the central angle corresponding to the arc segment of each sampling point within the cross-section does not exceed 15 degrees, thus avoiding distortion of the sampling point distribution within the cross-section due to the bend curvature. For locations where the curvature changes rapidly on the inner side of the bend, the neighborhood range is reduced to 0.5 to 0.7 times the normal neighborhood radius, ensuring that the local surface fitting does not cross the curvature abrupt change line. For cross-sections with local depressions, sampling points deviating from the main arc are excluded, and the pipe center position is determined by the remaining inner wall sampling points. Based on the initial point cloud, adjacent sampling points continuously distributed around each sampling point are extracted, and the neighborhood is defined by the spatial distance between the sampling points. The adjacent sampling points form a local surface. First, a local coordinate system is established with the target sampling point as the center. The height changes of adjacent sampling points along different directions are compared to determine the tangent plane that fits the local surface. The direction perpendicular to the tangent plane is used as the candidate surface normal. If discrete sampling points exist within the neighborhood, exclude those that deviate from the local main surface and then redetermine the tangent plane. For bends with small radii, reduce the interval between adjacent cross-sections to 0.3 to 0.5 times the nominal pipe diameter, ensuring that the central angle corresponding to the arc segment of each sampling point within each cross-section does not exceed 15 degrees, thus avoiding distortion of the sampling point distribution within the cross-section due to bend curvature. For locations where the curvature changes rapidly on the inner side of the bend, reduce the neighborhood range to 0.5 to 0.7 times the radius of the normal neighborhood, ensuring that the local surface fitting does not cross the curvature abrupt change line.

[0061] For example, two candidate surface normals with opposite directions correspond to the same sampling point. A tube center direction is formed by pointing from the sampling point to the corresponding tube center position. The angles between the two candidate surface normals and the tube center direction are compared, and the direction with the smaller angle is selected as the surface orientation of the sampling point, so that the surface orientations uniformly point to the tube center.

[0062] Preferably, the surface orientation of adjacent sampling points is checked for continuity. When the surface orientation of a sampling point is opposite to that of most surrounding sampling points, but its three-dimensional coordinates are still located on the continuous pipe wall surface, the surface orientation of that sampling point is flipped; when there are insufficient adjacent sampling points, it is marked as missing orientation information.

[0063] In one embodiment, the three-dimensional coordinates, brightness intensity, supplementary lighting incident angle, and surface orientation are associated point by point according to the sampling point identifier. If any sampling point lacks three-dimensional coordinates, supplementary lighting incident angle, or surface orientation, the sampling point is deleted; if the brightness intensity exceeds the effective recording range of the brightness acquisition component, it is marked as invalid lighting information and deleted. After the association is completed, sampling points with complete information are retained to obtain a three-dimensional point cloud with surface orientation.

[0064] S102. By analyzing the three-dimensional point cloud with surface orientation, identify the brightness and darkness reflected back by each sampling point under oblique supplementary lighting, determine the landing point of the highlight band by combining the incident angle of the supplementary lighting, and extract the highlight sampling points concentrated on the edge of the corrosion thinning depression.

[0065] A 3D point cloud with surface orientation is acquired. The brightness intensity, incident angle of the supplementary light, and surface orientation are extracted according to the sampling point identifier. Sampling points with brightness intensity higher than adjacent sampling points and a brightness difference exceeding a preset brightness threshold are selected to obtain a set of brightness abrupt change points. Based on this set of brightness abrupt change points, the angle between the incident direction of the supplementary light and the surface orientation is determined. Brightness abrupt change points with an angle within a preset specular angle range are retained, and a set of specular band landing points is determined based on the 3D coordinates. Based on the set of specular band landing points, the outer edge of the depression is determined according to the position where the spatial height of the sampling points decreases from the main pipe wall area to the local concave area. Specular band landing points that are continuously distributed in a narrow strip along the outer edge of the depression are retained to obtain specular sampling points.

[0066] In one implementation, the three-dimensional coordinates, brightness, incident angle of supplementary lighting, and surface orientation are read point by point from a three-dimensional point cloud with surface orientation. All information is associated with the sampling point identifier to ensure that the spatial position, lighting state, and pipe wall orientation of the same sampling point remain consistent.

[0067] Specifically, a brightness neighborhood is formed by selecting continuously adjacent sampling points on the inner curved surface of the elbow, centered on the sampling point to be judged. This brightness neighborhood does not cross significant point cloud gaps and is limited by the spatial distance between sampling points to avoid including non-adjacent pipe wall regions on either side of the depression in the same comparison range. Further, the difference between the brightness intensity of the sampling point to be judged and the brightness intensity of each sampling point within the brightness neighborhood is calculated. The preset brightness threshold is determined based on a continuous pipe wall region without significant depressions in the same detection. The specific steps are: extracting the brightness difference distribution of adjacent sampling points in this region, calculating the standard deviation σ of the brightness difference, and taking 2.5 times the standard deviation as the preset brightness threshold T, i.e., T = 2.5σ. In the continuous pipe wall region, the brightness difference between adjacent sampling points approximately follows a normal distribution. 2.5σ corresponds to a 99.4% confidence upper bound on one side. Only about 0.6% of normal brightness differences exceed this threshold. Therefore, brightness differences exceeding T can be confidently identified as abnormal brightness jumps caused by changes in surface morphology, such as abrupt changes in the orientation of concave edges, rather than fluctuations in the reflectivity of the pipe wall itself. When the brightness intensity of the sampling point to be judged is higher than that of its neighboring sampling points, and the brightness difference exceeds the preset brightness threshold, the sampling point is recorded in the brightness abrupt change point set.

[0068] In one possible implementation, the oblique ring-shaped supplementary light source has multiple emission positions distributed along the ring direction. The incident direction of the supplementary light is determined by the line connecting the current emission position and the brightness abrupt change point, and the surface orientation is taken from the direction of the corresponding sampling point in the three-dimensional point cloud toward the tube center, thereby obtaining the angle between the incident direction of the supplementary light and the surface orientation. The preset specular angle range can be obtained during the calibration of the endoscopic detection device.

[0069] Specifically, within a calibration pipe section matching the inner wall material and surface roughness of the pipe under test, the incident direction of the supplementary light is changed, and the angle interval corresponding to when the reflected brightness is significantly higher than the brightness of the neighboring area is recorded. This angle interval is then used as a preset highlight angle range. When the angle of the brightness abrupt change point falls within this range, it is retained as the highlight band landing point; other brightness abrupt change points are excluded.

[0070] For example, the spatial distribution of the highlight bands on the inner wall of the bend is reconstructed according to the three-dimensional coordinates of the highlight band landing points. Spatially adjacent highlight band landing points are connected along the circumference and bending direction of the pipe to form several highlight band landing point segments. For the same highlight band landing point segment, the radial distances from the sampling points to the inner wall of the pipe body are compared sequentially to identify the position where the radial distance transitions from a stable state to a continuously increasing state. The criteria for determining a stable state are: the rate of change of radial distance for at least three consecutive sampling points, i.e., the difference in radial distance between adjacent sampling points does not exceed the elevation measurement noise level corresponding to the point cloud sampling interval, taken as 0.1 mm; the criteria for continuously increasing states are: the radial distance of at least three consecutive sampling points thereafter monotonically increases and the cumulative increase exceeds 0.5 mm. The first sampling point that meets the above transition conditions from stable to increasing states is the starting position of the outer edge of the depression.

[0071] It should be noted that the outer edge of the recess is formed by a continuous arrangement of multiple starting positions along the inner wall surface of the bend. If there is a gap in the point cloud between adjacent starting positions, it is determined whether they belong to the same outer edge based on the spatial distance and surface orientation difference between the sampling points on both sides of the gap; when the spatial distance is within a preset adjacency range and the surface orientation changes continuously, the correlation between the starting positions on both sides is retained.

[0072] Preferably, the distribution width and continuous length of the highlight band landing points are examined along the outer edge of the depression. The distribution width is determined by the curved distance from the highlight band landing point to the outer edge of the depression, and the continuous length is determined by the cumulative spacing of adjacent highlight band landing points along the outer edge direction. Highlight band landing points with a distribution width within a preset narrow band range and a continuous length exceeding a preset length threshold are retained to obtain highlight sampling points concentrated on the edge of the corrosion-thinning depression.

[0073] The intensity of light and dark at each sampling point under oblique ring lighting was collected. The sampling point that is closer to the pipe wall and receives stronger light while the side facing away from the light is darker was identified. The location where the bright band gathers in a narrow strip along the outer edge of the depression was determined as the landing point of the highlight band. The highlight sampling point band that is concentrated at the sampling point at the edge of the corrosion thinning depression was obtained.

[0074] The brightness, three-dimensional coordinates, and surface orientation of each sampling point are acquired. Based on the incident direction of the supplementary light, the illuminated and shaded sides of adjacent sampling points are determined. Sampling points whose brightness on the illuminated side is higher than that on the shaded side and whose brightness difference exceeds a preset threshold are selected to obtain a set of bright-dark boundary points. Based on the set of bright-dark boundary points, the distance from each sampling point to the tube center is calculated. The starting position where the distance changes from stable to continuously increasing is determined. Adjacent starting positions are connected to form the outer edge of the recess, and the bright-dark boundary points that are clustered in a narrow strip along the outer edge of the recess are retained to obtain a set of highlight band landing points. Based on the set of highlight band landing points, adjacent landing points are connected according to the spacing along the inner wall of the bend. Landing points whose spacing does not exceed a preset adjacency threshold and are continuously distributed along the outer edge of the recess are retained to obtain a highlight sampling point band.

[0075] In one implementation, the three-dimensional coordinates, brightness, and surface orientation of each sampling point are read from a three-dimensional point cloud with surface orientation, and the incident direction of the supplementary light is determined based on the emission position of the oblique ring supplementary light source. The incident direction of the supplementary light corresponds one-to-one with the spatial position of each sampling point.

[0076] Specifically, adjacent sampling points are continuously distributed along the inner curved surface of the elbow, centered on the sampling point to be judged. The side facing the direction of the supplementary light incident light is designated as the illuminated side, and the side away from the direction of the supplementary light incident light is designated as the shaded side. Sampling points that cross the recessed gaps in the point cloud projection are not used for brightness comparison. Furthermore, the brightness intensity of the sampling points on the illuminated side and the shaded side is obtained separately, and they are compared in pairs according to their spatial adjacency. When the brightness intensity of the sampling point on the illuminated side is higher than that of the corresponding sampling point on the shaded side, and the brightness difference between the two exceeds a preset boundary threshold, the sampling point on the illuminated side is determined as the brightness-dark boundary sampling point, and a brightness-dark boundary point set is formed by all the brightness-dark boundary sampling points.

[0077] In one possible implementation, the preset boundary threshold is determined based on the brightness fluctuation of the continuous pipe wall region during the same detection. Sampling points on the pipe wall without obvious depressions and with continuous surface orientation are selected. The brightness difference between adjacent sampling points is statistically analyzed, and the difference exceeding the brightness fluctuation range of the continuous pipe wall body is set as the preset boundary threshold. Based on the set of brightness-dark boundary points, the distance from each brightness-dark boundary sampling point to the corresponding pipe core position is calculated. These distances are compared sequentially along the pipe circumference or bending direction. When the distance changes from a stable change to a continuous increase, the starting position of the change is determined as the position where the main pipe wall region descends towards the corrosion-thinning depression. Spatially adjacent starting positions of change are connected to form the outer edge of the depression. For areas where the curvature changes rapidly inside bends, when the pipe core position offset of adjacent cross-sections exceeds 5% of the pipe diameter, the pipe core position of the cross-section where each sampling point is located is used as the distance reference to avoid distance deviation caused by using a fixed pipe core. If the distance from the light-dark boundary sampling point to two adjacent cross-sections is less than 50% of the cross-section interval, it is determined to cross two adjacent cross-sections. In this case, the distance change is determined based on the pipe center position of the corresponding cross-section, and then the adjacent change starting positions are connected according to the three-dimensional coordinates. Further, the distance from the light-dark boundary sampling point along the pipe wall surface to the outer edge of the depression is calculated, and the light-dark boundary sampling points whose surface distance is within a preset narrow band range are retained. The narrow band range is taken as 8% to 12% of the depression feature size. When the pipe center position of adjacent cross-sections deviates by more than 5% of the pipe diameter, the pipe center position of the cross-section where each sampling point is located is used as the distance reference. In the bend area, the pipe axis is bent, and the pipe center position of adjacent cross-sections naturally deviates. When the deviation is less than 5% of the pipe diameter, the distance calculation error caused by using a unified pipe center does not exceed 5% of the distance from the sampling point to the pipe center, which is within an acceptable range. When it exceeds 5%, the pipe center needs to be taken for each cross-section to control the error. When a sampling point has fewer than 3 other highlight band landing points within a 10% radius of the pipe diameter centered on it, it is determined to be isolated. A 10% radius covers the typical spacing range of normal highlight band landing points, usually 3% to 8% of the pipe diameter. The lower limit of 3 points ensures that the retained landing points have local clustering rather than sporadic noise. The sampling points are connected sequentially along the outer edge of the depression, forming a highlight band landing point set by a continuous cluster of sampling points in a narrow strip. Sampling points that deviate from the outer edge of the depression or appear locally isolated are not included in the highlight band landing point set. A sampling point is considered isolated when it has fewer than 3 other highlight band landing points within a contiguous area centered on it and with a radius of 10% of the pipe diameter.

[0078] Preferably, the continuity of the landing points is checked according to the spacing of adjacent highlight band landing points along the inner wall of the bend. When the spacing between adjacent landing points does not exceed a preset adjacency threshold, and both are located within a preset narrow band range of the outer edge of the depression, the connection between adjacent landing points is maintained; other connections are deleted, resulting in a highlight sampling point band concentrated on the edge of the corrosion-thinned depression. The preset adjacency threshold is set to 1.5 to 3 times the average spacing of the sampling points, preferably 2 times. In areas with uniform point cloud density, the spacing between adjacent highlight band landing points is close to the average spacing of the sampling points; at locations where the curvature of the depression edge changes, the local point cloud density may increase, leading to a smaller landing point spacing, or the spacing may increase near point cloud gaps. A threshold of 2 times the average spacing covers normal landing points near gaps while filtering out long-distance misconnections across regions. When the point cloud density is high, a threshold of 1.5 times is used to tighten the connection range and avoid misconnections of landing points on different depression edges; when the density is low, a threshold of 3 times is used to widen the connection range and avoid breakage of the continuous band due to an excessively tight threshold. The preset narrow band range is set to 8% to 12% of the concave feature size, preferably 10%. The highlight sampling point band is formed by connecting highlight sampling points that meet the continuity condition, forming a band-shaped feature region distributed along the edge of the concave area.

[0079] S103. Calculate the orientation angle between adjacent specular sampling points based on the surface orientation, and identify sampling points with a sudden increase in orientation angle as curvature breakpoints.

[0080] The specular sampling point band is obtained. Based on the three-dimensional coordinates of each specular sampling point and the adjacency relationship along the specular sampling point band, the specular sampling points are arranged according to the extension direction of the etched thinning depression edge to obtain an ordered specular sampling point set. According to the ordered specular sampling point set, the surface orientation of adjacent specular sampling points is extracted pair by pair. The angle between two surface orientations that does not exceed a straight angle is taken as the orientation angle, and the subsequent specular sampling point is determined as the corresponding point of the orientation angle, to obtain the orientation angle sequence. According to the orientation angle sequence, the difference between the current orientation angle and the previous orientation angle and the subsequent orientation angle are calculated respectively. If both differences exceed a preset surge threshold, the specular sampling point corresponding to the current orientation angle is determined as the curvature breakpoint.

[0081] In one implementation, the three-dimensional coordinates, surface orientation, and adjacency relationships of each highlight sampling point in the highlight sampling point band are read. The adjacency relationship represents the continuous connection state of the highlight sampling points along the edge of the eroded thinning depression, and spatial nearest points that cross point cloud gaps or depression interior regions are not used as adjacent highlight sampling points.

[0082] Specifically, a starting specular sampling point is selected from one end of the specular sampling point band. The next specular sampling point is chosen from the adjacent points closest to it along the edge of the depression, and these points are arranged sequentially in the same manner. The established connections are maintained during the arrangement process until the other end of the specular sampling point band is reached, resulting in an ordered set of specular sampling points. When the specular sampling point band is closed or partially encircling, the specular sampling point with the smallest axial position of the pipe in the three-dimensional coordinates can be selected as the starting point; if multiple candidate starting points exist, the specular sampling point with the forward position along the circumference of the pipe is selected. The arrangement rule only determines the comparison order and does not change the three-dimensional coordinates or surface orientation of the specular sampling points. Further, the surface orientation of adjacent specular sampling points is extracted pairwise according to the ordered set of specular sampling points. Each surface orientation is the direction pointing from the corresponding sampling point to the pipe center, with the angle between the two directions not exceeding a straight angle as the orientation angle. The next specular sampling point among the adjacent specular sampling points is determined as the corresponding point of this orientation angle.

[0083] For example, if the surface orientations of adjacent highlight sampling points are basically the same, the angle between their orientations is within a small range; if a steep fold occurs at the junction of the inner wall and outer edge of the corrosion-thinned depression, a large change occurs between the orientations of adjacent surfaces. The angles between each orientation are recorded sequentially according to the arrangement order of the highlight sampling points to form an orientation angle sequence.

[0084] It should be noted that the inner wall of the elbow itself has continuous curvature, and the directional angle may change slowly with the curvature of the pipe when moving along the concave edge. To distinguish this continuous change from a local sudden increase, the current directional angle, the previous directional angle, and the next directional angle are obtained respectively, and the difference between the current directional angle and the directional angles on both sides is calculated.

[0085] In one possible implementation, the preset abrupt increase threshold is determined based on the inner wall region of a continuous bend without obvious surface fractures. A segment of highlight sampling points with continuously varying surface orientations is selected (with a length of no less than 20 sampling points). The difference sequence between the angles of adjacent orientations is statistically analyzed, and the mean μ of this difference sequence is calculated. Δ With standard deviation σ Δ Take the preset sudden increase threshold T surge =μ Δ +3σ Δ On a normal continuous surface, the difference in orientation angles approximately follows a normal distribution, μ. Δ +3σ Δ Corresponding to the 99.9% confidence upper bound on one side, only about 0.1% of normal fluctuations will exceed this threshold. μ in pipes of different diameters or bending radii... Δ and σ Δ They are different and need to be labeled separately.

[0086] Preferably, when the difference between the current orientation angle and the previous orientation angle, and the difference between the current orientation angle and the next orientation angle, both exceed the preset surge threshold, the highlight sampling point corresponding to the current orientation angle is determined as a curvature breakpoint. If only one side's difference exceeds the preset surge threshold, the original attributes of the highlight sampling point are retained, and it is not determined as a curvature breakpoint.

[0087] Extract the deflection direction of each adjacent highlight sampling point toward the tube core, identify adjacent sampling points whose orientation changes from a gentle transition to a steep fold along the edge of the depression, and determine the curvature breakpoints at the positions where the angle between the two orientations suddenly increases between one or two sampling points. This yields curvature breakpoint sampling points concentrated at the junction of the inner wall and outer edge of the corrosion depression.

[0088] The ordered set of specular highlights is obtained, and the surface orientations towards the tube center are extracted point by point according to the arrangement order to obtain a surface orientation sequence corresponding to each specular highlight sampling point. Based on the surface orientation sequence, the orientation angles between adjacent surface orientations that do not exceed a flat angle are determined, and sampling points whose current orientation angle is greater than both the previous and subsequent orientation angles are selected to obtain candidate abrupt increase sampling points. Based on the candidate abrupt increase sampling points, sampling points whose angle difference on both sides exceeds a preset abrupt increase threshold and whose surface distance to the outer edge of the depression does not exceed a preset edge distance are retained to obtain curvature breakpoint sampling points located at the junction of the inner wall and outer edge of the corrosion depression.

[0089] In one embodiment, an ordered set of highlight sampling points arranged along the edge of the corrosion-thinned depression is obtained, and the three-dimensional coordinates and surface orientation of each highlight sampling point are extracted according to the sampling point identifier. The surface orientation is the direction of the local pipe wall surface where the sampling point is located toward the corresponding pipe core position.

[0090] Specifically, following the order of the ordered specular sampling point set, the surface orientation of each specular sampling point is recorded sequentially to form a surface orientation sequence. For regions where the specular sampling point bands are closed, the sampling point with the smaller axial coordinate of the pipe can be selected as the starting point of the sequence, and the remaining sampling points are arranged along a fixed circumferential direction. Further, adjacent surface orientations are extracted pair by pair from the surface orientation sequence, and the orientation angle between them is determined to be no more than a straight angle. Each orientation angle is associated with the next adjacent specular sampling point, so that the position of the angle change can be attributed to a specific specular sampling point.

[0091] In one possible implementation, the current orientation angle, the previous orientation angle, and the next orientation angle are compared sequentially. When the current orientation angle is simultaneously greater than the orientation angles on both its front and rear sides, the highlight sampling point corresponding to the current orientation angle is recorded as a candidate surge sampling point. Sampling points at the end of the sequence that lack one side of the orientation angle are not included in the candidate selection. The preset surge threshold can be obtained based on the absence of a continuous region with obvious corrosion folds on the inner surface of the same bend.

[0092] Specifically, select a segment of highlight sampling points where the surface orientation changes gradually, calculate the range of differences between the angles of continuous orientations, and set the limit of the difference range as a preset surge threshold.

[0093] For example, the difference between the current orientation angle and the previous orientation angle, and the difference between the current orientation angle and the next orientation angle are calculated respectively. When both differences exceed the preset surge threshold, the corresponding candidate surge sampling point is retained; when only one side's difference exceeds the threshold, the corresponding sampling point is not identified as a local fold position. Based on the retained candidate surge sampling points, the shortest connection path from the inner wall surface of the bend to the outer edge of the depression is determined, and the length of the shortest connection path is used as the surface distance. The preset edge distance can be set according to the point cloud sampling interval and the strip width of the outer edge of the depression, and is used to limit the candidate surge sampling points to be located within the neighborhood of the corrosion depression edge.

[0094] Preferably, candidate abrupt increase sampling points whose surface distance does not exceed a preset edge distance are retained, and their three-dimensional coordinates are used to verify that the sampling points are located on one side of the inner wall of the depression and adjacent to the outer edge of the depression. Sampling points that satisfy the conditions of abrupt increase on both sides of the included angle and the edge distance are determined as curvature breakpoint sampling points at the junction of the inner wall and the outer edge of the corrosion depression.

[0095] S104. Remove curvature breakpoints, integrate the remaining sampling points, and perform surface fitting. Starting from the continuous inner wall sampling points, gradually expand outward to restore the continuous corrosion depression inner wall surface on the inside of the elbow.

[0096] Acquire highlight sampling points and curvature breakpoint sampling points. Remove curvature breakpoint sampling points from the highlight sampling point band according to their identifiers, retaining sampling points whose spatial spacing does not exceed a preset adjacency threshold and whose surface orientation difference does not exceed a preset orientation threshold, thus obtaining a continuous set of remaining points. Based on this continuous set of remaining points, select adjacent continuous sampling points as control points. Establish a local surface based on the three-dimensional coordinates of the control points, minimizing the sum of the vertical distances from each control point to the local surface, thus obtaining an initial fitted surface. Based on the initial fitted surface, progressively incorporate remaining sampling points adjacent to the surface edge whose vertical distance and surface orientation difference do not exceed the corresponding preset thresholds, redetermining the extended surface until the surface edge reaches the outer edge of the depression, obtaining a continuously etched inner wall surface of the depression.

[0097] In one implementation, a highlight sampling point band, curvature breakpoint sampling points, and the corresponding three-dimensional coordinates and surface orientation of each sampling point are acquired. Curvature breakpoint sampling points are retrieved from the highlight sampling point band according to their identifiers, and sampling points with the same identifier are deleted, ensuring that the remaining data does not include steep inflection points at the junction of the inner wall and outer edge of the depression.

[0098] Specifically, adjacency relationships are established along the inner wall surface of the elbow for the discarded sampling points. Two sampling points are considered continuous adjacent sampling points if the spatial distance between them does not exceed a preset adjacency threshold and the angle between their surface orientations does not exceed a preset orientation threshold. A continuous set of remaining points is formed by these interconnected continuous adjacent sampling points. The preset adjacency threshold can be determined based on the point cloud sampling interval. For elbow inner wall regions with continuous surfaces in the same detection, the spatial distance range between adjacent sampling points is statistically analyzed, and a limit higher than the main body spacing range is used as the preset adjacency threshold. The preset orientation threshold is determined based on the normal variation range of the orientation of adjacent surfaces in the continuous inner wall region.

[0099] In one possible implementation, control points are selected from a set of continuous remaining points that are adjacent to each other and whose quantity meets the requirements for establishing a local surface. Control points are preferably taken from continuous regions in the inner wall of the corrosion depression that are far from the curvature breakpoint and the outer edge of the depression, and each control point is required to have adjacent sampling points in multiple directions to avoid establishing the initial fitted surface with a unidirectional arrangement of points.

[0100] Specifically, a local coordinate reference is established using the three-dimensional coordinates of the control points. The coordinates of the control points along the local pipe wall extension direction are used as the basis for the surface position, and the coordinates perpendicular to the local pipe wall are used as the height basis. The curvature and spatial position of the local surface are adjusted to minimize the sum of the vertical distances from each control point to the local surface, thus obtaining the initial fitted surface. The vertical distance is the shortest distance from the control point to the surface along the normal of the local surface, and is not replaced by the straight-line distance between control points. For areas with large curvature on the inner side of the bend, the control points are grouped according to their position at the center of the pipe cross section, so that the initial fitted surface changes continuously with the pipe curvature direction. Further, starting from the edge sampling points of the initial fitted surface, candidate sampling points adjacent to the edge sampling points but not yet included in the surface are retrieved from the continuous remaining point set. The vertical distance from the candidate sampling points to the current surface, as well as the angle between the surface orientation of the candidate sampling points and the edge orientation of the current surface, are obtained respectively. When the vertical distance of a candidate sampling point does not exceed a preset distance threshold and the angle between the surfaces does not exceed a preset orientation threshold, the candidate sampling point is included in the control point set, and the surface position is redefined based on the expanded control points. Each time, only sampling points directly adjacent to the edge of the current surface are included, allowing the surface to expand layer by layer from the inside to the outside along the inner wall of the corrosion depression.

[0101] It should be noted that the preset distance threshold can be determined based on the normal discrete range of continuous inner wall sampling points relative to the local curved surface. For pipe wall regions without obvious fractures, a local curved surface is fitted, the vertical distance from the sampling points to the fitted surface is statistically analyzed, and the boundary covering the discrete range of the main body is used as the preset distance threshold. When the point cloud sampling density changes, the threshold can be set according to the sampling interval of the corresponding region.

[0102] Preferably, candidate sampling points on the outer edge of the curved surface are continuously searched until the edge sampling points reach the determined outer edge of the depression, or until there are no remaining sampling points on the outer edge that simultaneously satisfy the vertical distance condition and the surface orientation condition. The last redefined curved surface is taken as the inner wall surface of the continuous erosion depression, the edge of which connects to the outer edge of the depression, and its interior does not contain the previously discarded curvature breakpoint sampling points.

[0103] S105. Based on the distance between the curvature breakpoint and the inner wall of the continuous corrosion depression, the breakpoint adjacent to the inner wall of the depression is identified as the actual damage sampling point.

[0104] The curvature breakpoint sampling points and the inner wall surface of the continuous corrosion depression are acquired. For each curvature breakpoint sampling point, the surface point with the smallest three-dimensional coordinate distance to it is determined on the inner wall surface of the continuous corrosion depression, thus obtaining the corresponding nearest surface point. Based on the corresponding nearest surface point, the straight-line distance from the curvature breakpoint sampling point to the corresponding nearest surface point is obtained, and this straight-line distance is used as the breakpoint spacing to obtain the breakpoint spacing record corresponding to each curvature breakpoint sampling point. A preset proximity threshold is set according to the point cloud sampling spacing. Curvature breakpoint sampling points whose breakpoint spacing does not exceed the preset proximity threshold and whose corresponding nearest surface point is located within the area enclosed by the outer edge of the depression are selected from the breakpoint spacing record to obtain the true damage sampling points.

[0105] In one implementation, the curvature breakpoint sampling points, the inner wall surface of the continuous corrosion depression, and the outer edge of the depression are acquired. The three-dimensional coordinates of each curvature breakpoint sampling point are read according to a unified pipeline coordinate system, and the spatial coordinates of each surface position on the inner wall surface of the continuous corrosion depression are read, so that the two types of objects are under the same spatial reference.

[0106] Specifically, using each curvature breakpoint sampling point as the retrieval center, local surfaces within a preset retrieval range are selected from the inner wall surface of the continuously corroded depression. The preset retrieval range is set based on the point cloud sampling interval, covering multiple adjacent surface positions but not crossing the outer edge of the depression into the main pipe wall area. Further, for each surface position on the local surface, the three-dimensional straight-line distance between it and the current curvature breakpoint sampling point is obtained, and these distances are compared in ascending order. The surface position with the smallest distance is determined as the nearest corresponding surface point to the current curvature breakpoint sampling point, ensuring a unique correspondence for each curvature breakpoint sampling point.

[0107] In one possible implementation, the inner wall of the continuous corrosion depression is composed of multiple adjacent surface patches. When the curvature breakpoint sampling point is located in the boundary region of adjacent surface patches, candidate nearest surface points are determined within each surface patch. The distances between each candidate nearest surface point and the curvature breakpoint sampling point are then compared, and the one with the smaller distance is retained as the corresponding nearest surface point. Based on the corresponding nearest surface point, the straight-line distance between the curvature breakpoint sampling point and the corresponding nearest surface point is obtained, and this straight-line distance is recorded as the breakpoint spacing. The breakpoint spacing reflects the spatial separation degree of the curvature breakpoint sampling point relative to the inner wall of the continuous corrosion depression, and each breakpoint spacing is recorded according to the sampling point identifier. The preset proximity threshold can be determined based on the sampling spacing of the point cloud obtained in the same detection.

[0108] Specifically, a region with a continuous surface and stable point cloud distribution is selected from the inner wall of the continuous corrosion depression to obtain the main body distance range between adjacent sampling points, and the distance limit covering the main body distance range is used as the preset proximity threshold.

[0109] It should be noted that the area enclosed by the outer edge of the depression represents the internal range of the inner wall surface of the continuous corrosion depression on the curved surface of the pipe wall. Adjacent outer edge sampling points can be connected along the arrangement direction of the outer edge of the depression, and the location of the nearest curved surface point, whether inside, on, or outside the boundary, can be determined based on the closed boundary after the connection.

[0110] Preferably, curvature breakpoint sampling points are retained from the breakpoint spacing record if the breakpoint spacing does not exceed a preset proximity threshold and the corresponding nearest surface point is located within the area enclosed by the outer edge of the depression. Curvature breakpoint sampling points whose corresponding nearest surface point is located outside the outer edge of the depression, or whose breakpoint spacing exceeds the preset proximity threshold, are not retained, thereby obtaining the true damage sampling points.

[0111] S106. Density clustering algorithm is used to perform spatial clustering of real damage sampling points, and adjacent damage sampling points belonging to the same corrosion thinning area are merged into corrosion thinning patches.

[0112] The actual damage sampling points are obtained. A neighborhood distance is set based on the point cloud sampling interval, and a minimum number of sampling points within the neighborhood is set. A density clustering algorithm is used to determine the core sampling points whose neighborhood number reaches the minimum number of points. Sampling points that are density-connected to the core sampling points are expanded to obtain damage point clusters. Based on the damage point clusters, actual damage sampling points with the same cluster identifier and spatial continuity are grouped into corrosion thinning patches, and discrete sampling points not belonging to any damage point cluster are excluded.

[0113] In one implementation, actual damage sampling points and their three-dimensional coordinates are acquired, and the spatial spacing between adjacent sampling points on the inner wall of the continuous corrosion depression is statistically analyzed. For each sampling point, the three-dimensional Euclidean distance *d* between it and all other sampling points is calculated, where *d* is calculated based on the square root of the sum of the squares of the differences in the x, y, and z coordinates of each sampling point. For each sampling point, the K nearest neighbors are identified, with K ranging from 5 to 8. After sorting the neighbors by distance from smallest to largest, the distance of the Kth neighbor is taken as the characteristic spacing of that sampling point. The characteristic spacing of all sampling points is statistically analyzed, and the median *M* is calculated as the baseline spacing. Based on the baseline spacing *M*, the neighborhood distance is set to a value between 1.5 and 2 times *M*, ensuring that the neighborhood range covers adjacent actual damage sampling points distributed within the same local corrosion area. A smaller multiple is used when the sampling point density is high, and a larger multiple is used when the density is low, ensuring that the neighborhood contains a sufficient number of effective sampling points for subsequent analysis.

[0114] Specifically, taking any real damage sampling point as the center, the number of real damage sampling points whose three-dimensional straight-line distance to it does not exceed the neighborhood distance is counted. The minimum number of points is set based on the point cloud sampling density at continuous corrosion edges, and is used to determine whether a stable damage point distribution has formed in a local area. When the number of sampling points in the neighborhood of a real damage sampling point reaches the minimum number of points, it is determined as a core sampling point, and the real damage sampling points in its neighborhood are grouped into the same damage point cluster. If there are other core sampling points in the neighborhood, the expansion continues to the neighborhood of the core sampling point until there are no more density-connected sampling points that have not yet been grouped.

[0115] In one embodiment, an independent clustering identifier is configured for each damage point cluster. Real damage sampling points with the same clustering identifier and spatial contiguousness are grouped into a corrosion thinning patch. Real damage sampling points whose number of sampling points in their neighborhood does not reach the minimum number of points and do not fall within the neighborhood of any core sampling point are identified as discrete sampling points and excluded.

[0116] S107. Based on the distribution of the outermost sampling points of each corrosion thinning patch on the inner wall, extract the outer edge contour of the corrosion thinning area to obtain the true corrosion boundary contour of the continuous closed elbow inner wall.

[0117] For each corrosion-thinned patch, extract the actual damage sampling points within the patch based on cluster identifiers. If there are no sampling points with the same cluster identifier on at least one side of the surface neighborhood of a sampling point, it is determined as an outer ring sampling point, resulting in an outer ring sampling point set. Based on the outer ring sampling point set, starting from any outer ring sampling point, sequentially connect adjacent outer ring sampling points with the smallest surface distance that are not connected. Stop connecting when there are no sampling points with a spacing not exceeding a preset adjacency threshold, thus obtaining an outer edge contour segment. Based on the outer edge contour segment, connect adjacent contour segments whose endpoint spacing does not exceed a preset closure threshold and whose end extension direction angle does not exceed a preset direction threshold, until all contour segments are connected end to end, obtaining a continuous closed true corrosion boundary contour of the inner wall of the bend.

[0118] In one implementation, corrosion-thinned patches and their cluster identifiers are read piece by piece, and real damage sampling points with the same cluster identifier are extracted. Each real damage sampling point retains its three-dimensional coordinates, surface orientation, and adjacency relationship on the curved surface of the inner wall of the elbow, avoiding cross-connection of sampling points between different corrosion-thinned patches.

[0119] Specifically, a local neighborhood is defined on the inner curved surface of the elbow, centered on the actual damage sampling point to be determined, and a tangent plane of the neighborhood is established based on the surface orientation of the sampling point. Adjacent sampling points are searched along multiple directions around the sampling point to be determined. When no sampling point with the same cluster identifier exists in at least one direction within the preset neighborhood, the sampling point is determined to be located at the outer edge of the corrosion thinning patch.

[0120] It should be noted that the actual damage sampling points located inside the corrosion-thinning plaque typically have sampling points with the same cluster identifier distributed in all directions of their curved surface neighborhood; sampling points located at the outer edge of the plaque, however, have gaps in the direction facing outwards. All sampling points that meet the edge determination criteria are extracted into an outer ring sampling point set, which corresponds to the outer boundary of each corrosion-thinning plaque. Further, any outer ring sampling point is selected from the outer ring sampling point set as the connection starting point. Among the unconnected outer ring sampling points, the adjacent sampling point with the smallest distance along the curved surface of the bend's inner wall is retrieved. This curved surface distance is the path length connecting two sampling points along the inner wall surface. This distance metric is used for boundary point sorting and connection, and differs from the three-dimensional straight-line distance used in the clustering stage, accurately reflecting the actual adjacency relationship of sampling points on the curved wall surface.

[0121] In one possible implementation, the average distance between adjacent points in the outer ring sampling point set is calculated as the main sampling interval d, and a preset adjacency threshold is set to 1.5d. The outer ring sampling point set is traversed, and when the surface distance between a candidate outer ring sampling point and the current sampling point does not exceed the preset adjacency threshold, a connection relationship is established; when there is no candidate sampling point that meets the condition, the current connection is stopped, forming an outer edge contour segment.

[0122] For example, when there are local point cloud gaps at the edge of a corrosion-thinned patch, multiple outer edge contour segments can be formed for the same patch. For each outer edge contour segment, two endpoints are determined according to the order of the connected outer ring sampling points, and the end extension direction is determined according to the direction of the line connecting the endpoint and its adjacent sampling points, so that the endpoint position and the contour extension trend correspond one-to-one. Further, the preset closure threshold can be set according to the sampling interval of the outer ring sampling points and the width of the local point cloud gap that can be connected; the preset direction threshold can be set according to the normal turning range of adjacent connection directions in the continuous corrosion edge. When the distance between the endpoints of two outer edge contour segments does not exceed the preset closure threshold, and the angle between the corresponding end extension directions does not exceed the preset direction threshold, the endpoints are connected.

[0123] Preferably, adjacent outer edge contour segments that satisfy the endpoint spacing and extension direction conditions are repeatedly searched until the outer edge contour segments of the same corrosion thinning patch are connected end to end. The closed contour is then checked for continuity according to the order of the outer ring sampling points, and duplicate connections are deleted to obtain the true corrosion boundary contour of the inner wall of the continuous closed elbow that corresponds one-to-one with the corrosion thinning patch.

[0124] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the concept of this application. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.

Claims

1. A three-dimensional morphological spatial analysis method for damage to the inner wall of industrial pipelines, characterized in that, include: An oblique ring supplementary light source and a point cloud acquisition unit are configured in the endoscopic inspection device to obtain the initial point cloud of the inner wall of the industrial pipeline bend. The brightness, incident angle of the supplementary light and the three-dimensional coordinates of each sampling point are synchronously associated. The position of the pipe center is determined according to the pipeline axis, and the direction of the surface normal of each sampling point is unified to form a three-dimensional point cloud with surface orientation. Based on the three-dimensional point cloud with surface orientation, sampling points with abrupt changes in brightness and intensity and whose incident direction of supplementary light and surface orientation meet the range of specular angle are selected. Combining the position of the sampling points descending from the main area of ​​the pipe wall to the local concave area, specular sampling points continuously distributed along the outer edge of the corrosion thinning concave area are extracted. Based on the surface orientation of the highlight sampling points, the orientation angle between adjacent sampling points is calculated, and the location where the orientation angle suddenly increases is identified to form a curvature breakpoint. Curvature breakpoints are removed from the high-light sampling points, and surface fitting is performed on the remaining sampling points. The sampling points are then extended from the continuous inner wall sampling points to the outer edge of the depression to form a continuous eroded inner wall surface of the depression. Calculate the distance between the curvature breakpoint and the inner wall of the continuous corrosion depression, and screen out the real damage sampling points that are adjacent to the inner wall of the continuous corrosion depression and located in the area enclosed by the outer edge of the depression. Density clustering algorithm is used to spatially cluster the actual damage sampling points and merge them into corrosion thinning patches; Based on the distribution of sampling points on the outer ring of each corrosion-thinned patch, adjacent outer edge contour segments are connected and closed to obtain the true corrosion boundary contour of the inner wall of the elbow.

2. The method for three-dimensional morphological spatial analysis of damage to the inner wall of industrial pipelines according to claim 1, characterized in that, The formation of a three-dimensional point cloud with surface orientation includes: By associating the three-dimensional coordinates, brightness, and incident angle of supplementary light of each sampling point with the sampling time and sampling point identifier, a point cloud of illumination information is formed. Based on the illumination information point cloud, extract the spatial coordinates of each sampling point and its adjacent sampling points, determine the local surface normal, and unify the direction of the local surface normal by referring to the tube center position; Based on the surface orientation and illumination information associated with the sampling point identifier, delete sampling points that lack associated information.

3. The method for three-dimensional morphological spatial analysis of damage to the inner wall of industrial pipelines according to claim 1, characterized in that, The extraction of highlight sampling points continuously distributed along the outer edge of the erosion-thinned depression includes: Filter out brightness abrupt points where the intensity of light and darkness is greater than that of adjacent sampling points and the brightness difference exceeds a preset brightness threshold. The location of the highlight band is selected based on the angle between the incident direction of the supplementary light and the orientation of the surface. The outer edge of the depression is determined based on the spatial height variation of the high-light band landing point, and sampling points that are continuously distributed in a narrow strip along the outer edge of the depression are retained.

4. The method for three-dimensional morphological spatial analysis of damage to the inner wall of an industrial pipeline according to claim 3, characterized in that, The method of selecting the highlight band landing point based on the angle between the incident direction of the supplementary light and the surface orientation includes: Based on the incident direction of the supplementary light, the light-receiving side and the back-light side of adjacent sampling points are distinguished, and the bright-dark boundary points where the brightness difference between the light-receiving side and the back-light side exceeds the preset boundary threshold are selected. Calculate the distance from the light-dark boundary point to the tube core, and connect the starting points where the distance changes from stable to continuously increasing to form the concave outer edge; Retain the light and dark boundary points that are continuously clustered along the outer edge of the recess and whose adjacent spacing does not exceed a preset adjacency threshold.

5. The method for three-dimensional morphological spatial analysis of damage to the inner wall of an industrial pipeline according to claim 1, characterized in that, The formation of curvature breakpoints includes: Based on the three-dimensional coordinates and adjacency relationship of the highlight sampling points, the highlight sampling points are arranged along the edge of the erosion-thinning depression; Calculate the surface orientation angle between adjacent highlight sampling points for each pair to form an orientation angle sequence; Calculate the difference between the current orientation angle and the previous orientation angle and the next orientation angle respectively, and identify the sampling point where both differences exceed the preset sudden increase threshold.

6. The method for three-dimensional morphological spatial analysis of damage to the inner wall of an industrial pipeline according to claim 5, characterized in that, The identification of sampling points where both differences exceed a preset surge threshold includes: Filter candidate sudden increase sampling points where the current orientation angle is greater than the previous orientation angle and the next orientation angle, respectively; Calculate the surface distance from the candidate abrupt sampling point to the outer edge of the depression, and retain the candidate abrupt sampling points whose surface distance does not exceed the preset edge distance to form curvature breakpoint sampling points located at the junction of the inner wall and outer edge of the corrosion depression.

7. The method for three-dimensional morphological spatial analysis of damage to the inner wall of an industrial pipeline according to claim 1, characterized in that, The formation of the continuous corrosion recessed inner wall surface includes: According to the sampling point identifier, the curvature breakpoints are removed from the specular sampling points, and sampling points with spatial spacing not exceeding a preset adjacency threshold and surface orientation difference not exceeding a preset orientation threshold are retained to form a continuous set of remaining points; Select the adjacent sampling points in the continuous remaining point set as control points, establish a local surface based on the three-dimensional coordinates of the control points, and use the minimum sum of the vertical distances from each control point to the local surface as the fitting condition to form an initial fitting surface; The remaining sampling points that are adjacent to the edge of the initial fitted surface and whose vertical distance and surface orientation difference do not exceed the corresponding preset threshold are included layer by layer, and the surface is continuously updated and expanded until the edge of the surface reaches the outer edge of the concave area.

8. The method for three-dimensional morphological spatial analysis of damage to the inner wall of an industrial pipeline according to claim 1, characterized in that, The screening of actual damage sampling points that are adjacent to the inner wall of the continuous corrosion depression and located within the area enclosed by the outer edge of the depression includes: For each curvature breakpoint, determine the nearest surface point with the smallest three-dimensional coordinate distance on the inner wall of the continuous corrosion depression; Calculate the straight-line distance from the curvature breakpoint to the nearest corresponding surface point, and record the breakpoint spacing. Filter out curvature breakpoints whose straight-line distance does not exceed a preset proximity threshold and whose corresponding nearest curved surface point is located within the area enclosed by the outer edge of the depression.

9. The method for three-dimensional morphological spatial analysis of damage to the inner wall of an industrial pipeline according to claim 1, characterized in that, The step of using a density clustering algorithm to spatially cluster the actual damage sampling points and merge them into corrosion thinning patches includes: Set the neighborhood distance and the minimum number of sampling points within the neighborhood based on the point cloud sampling interval; Identify core sampling points within the neighborhood that reach the minimum number of points, and expand the sampling points connected to the density of the core sampling points to form a cluster of damage points; Based on the cluster identifier, spatially continuous real damage sampling points are merged, and discrete sampling points that are not included in the damage point cluster are excluded.

10. A three-dimensional morphological spatial analysis method for damage to the inner wall of an industrial pipeline according to claim 1, characterized in that, The process of connecting and closing adjacent outer edge contour segments based on the outer ring sampling point distribution of each corrosion thinning patch to obtain the true corrosion boundary contour of the elbow inner wall includes: Based on clustering identifiers, extract the actual damage sampling points within each corrosion-thinned plaque; The real damage sampling points in which there are no sampling points of the same cluster identifier on at least one side of the curved surface neighborhood are determined as the outer ring sampling points; Starting from any of the outer ring sampling points, connect the adjacent outer ring sampling points with the smallest surface distance that are not connected in sequence. Terminate the connection when there are no outer ring sampling points with a spacing not exceeding the preset adjacent threshold to form an outer edge contour segment. Connect adjacent outer edge contour segments whose endpoint spacing does not exceed a preset closure threshold and whose end extension direction angle does not exceed a preset direction threshold, until the outer edge contour segments are connected end to end.