A pipe inner wall defect detection method, device, equipment and storage medium
Patent Information
- Application Number
- CN202611197866.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]针对现有技术存在的表面附着物易造成误检以及环向展开导致跨边界缺陷漏检的问题,本申请通过管内壁缺陷检测方法、装置、设备及存储介质,实现从物理几何形貌层面抑制反射率伪影,并恢复管内壁环向连续性以提高缺陷识别准确率的目的
[0014]本申请的有益效果是:区别于现有技术的情况,本申请公开了一种管内壁缺陷检测方法、装置、设备及存储介质,通过获取表征管内壁表面几何形貌变化的表面形貌梯度数据作为缺陷识别的输入,由于水渍和污垢等附着物主要改变表面反射率而不显著改变微观几何形貌,而裂纹具有深度和边缘凹陷,因此基于几何形貌变化进行识别能够从物理层面直接抑制仅由反射率变化形成的伪缺陷干扰,降低误检率。同时,通过在环向分布的检测数据的首尾边界处形成闭环拓扑关系,恢复了管内壁在环向上的连续性,使位于首尾边界两侧的缺陷特征能够相互聚合,从而保持跨越首尾边界的缺陷特征连续,减少了相关技术中展开图像边界处缺陷断裂导致的漏检,提高了缺陷识别的完整性和准确率。在此基础上,通过结合柔性转移控制,根据缺陷位置调整抓取姿态以避开缺陷区域,减少了被检管材在分拣过程中的二次损伤。
Smart Images

Figure CN123015461A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine vision nondestructive testing and automated control technology, specifically to a method, apparatus, equipment and storage medium for detecting defects in the inner wall of a pipe. Background Technology
[0002] Currently, in the field of pipe defect detection, ordinary light sources combined with linear scan cameras are commonly used for imaging, and conventional convolutional neural networks are employed to identify defects in the acquired grayscale or color images. However, in actual industrial environments, pipe walls are often accompanied by water stains and dirt. These surface deposits alter surface reflectivity and create image features resembling cracks. Cracks exhibit geometrical variations such as depth and edge indentations, making it difficult for conventional visual detection methods based on reflectivity differences to distinguish between the two, easily leading to false detections. Furthermore, when the inner wall of the pipe is unfolded into a planar image, cracks crossing the circumferential boundary will break at the unfolded boundary. Conventional rectangular convolutional kernels, due to their limited receptive field, cannot associate the breakage region, resulting in missed detections of cross-boundary defects. Therefore, there is an urgent need for a pipe inner wall defect detection scheme that can reduce false defect interference and maintain continuous identification of cross-boundary defects. Summary of the Invention
[0003] To address the problems of false detection caused by surface deposits and missed detection of cross-boundary defects due to circumferential unfolding in existing technologies, this application aims to improve the accuracy of defect identification by using a pipe inner wall defect detection method, device, equipment, and storage medium to suppress reflectivity artifacts from the perspective of physical geometry and restore the circumferential continuity of the pipe inner wall.
[0004] To address the aforementioned technical problems, this application provides a method for detecting defects on the inner wall of a pipe, comprising: acquiring surface topography gradient data of the inner wall of the pipe, wherein the surface topography gradient data characterizes the geometric topography changes of the inner wall surface; determining detection data distributed circumferentially along the inner wall of the pipe based on the surface topography gradient data; forming a closed-loop topological relationship at the beginning and end boundaries of the detection data, wherein the closed-loop topological relationship is used to maintain the continuity of defect features across the beginning and end boundaries; performing defect feature aggregation on the detection data based on the closed-loop topological relationship, and outputting defect identification results.
[0005] In some embodiments, obtaining surface topography gradient data of the inner wall of the pipe includes: projecting structured light stripes onto the inner wall of the pipe; acquiring deformed stripes modulated by the surface topography of the inner wall of the pipe; and calculating the surface normal gradient data of the inner wall of the pipe based on the phase change of the deformed stripes to obtain surface topography gradient data; wherein the surface topography gradient data is generated based on the geometric topography change of the inner wall of the pipe and is used to suppress false defect interference formed solely by changes in surface reflectivity.
[0006] In some embodiments, projecting structured light stripes onto the inner wall of the tube includes: sequentially projecting multiple stripe patterns with different preset phase shifts along the axial direction of the inner wall of the tube, wherein the multiple stripe patterns have the same stripe period in the circumferential direction of the inner wall of the tube; acquiring deformed stripes modulated by the surface morphology of the inner wall of the tube includes: refracting the stripe light path reflected from the inner wall surface of the inner wall of the tube to the line scan camera through a central conical mirror, so that the imaging field of view of the line scan camera covers the entire circumferential region of the inner wall of the tube; during the relative movement of the inner wall of the tube and the line scan camera, controlling the line scan camera to acquire multiple deformed stripes row by row based on encoder trigger signals. The image is used to determine the reflection intensity of the same circumferential position on the inner wall of the pipe under different phase shift patterns for each deformed fringe image. Based on the phase change of the deformed fringes, the surface normal gradient data of the inner wall of the pipe is calculated, including: performing phase calculation on the gray values of multiple deformed fringe images corresponding to the same circumferential and axial positions to obtain the encapsulated phase; performing phase unpacking on the encapsulated phase to obtain the continuous phase; determining the normal gradient components of the inner wall surface based on the mapping relationship between the continuous phase and the calibrated phase gradient; and arranging the normal gradient components according to the axial and circumferential positions to generate surface topography gradient data.
[0007] In some embodiments, forming a closed-loop topology at the beginning and end boundaries of the detection data includes: determining the detection data obtained by circumferentially unfolding along the inner wall of the pipe as the beginning boundary data and the end boundary data; establishing an adjacency relationship between the beginning boundary data and the end boundary data, so that the defect features located on one side of the beginning boundary data and the defect features located on the one side of the end boundary data can be aggregated with each other through the adjacency relationship; and forming a closed-loop topology based on the adjacency relationship.
[0008] In some embodiments, defect feature aggregation is performed on the detection data based on closed-loop topology to output defect identification results, including: dividing the detection data into multiple feature nodes, which are arranged along the circumferential and axial directions of the inner wall of the pipe. Each feature node corresponds to a local region in the detection data, and the local region includes gradient magnitude features and gradient direction features in the surface topography gradient data; constructing node adjacency relationships based on the spatial adjacency relationships between adjacent feature nodes, and setting cross-boundary connections between the boundary nodes of the corresponding first boundary data and the boundary nodes of the corresponding tail boundary data, so that the boundary node at the end with the largest circumferential angle and the boundary node at the end with the smallest circumferential angle are adjacent nodes; performing multiple rounds of feature transfer on each feature node based on the node adjacency relationships and cross-boundary connections, so that each feature node updates its own features according to the features of its adjacent nodes; after the multiple rounds of feature transfer are completed, feature nodes with the same defect response are determined as a defect connected region; when the defect connected region contains nodes on both the first boundary data side and the tail boundary data side, a complete defect segmentation region spanning the first and tail boundaries is output, and the complete defect segmentation region is used as the defect identification result.
[0009] In some embodiments, the method further includes: determining at least two of the depth parameter, length parameter, and area parameter of the defect region based on surface topography gradient data; determining the defect level corresponding to the defect region based on at least two of the depth parameter, length parameter, and area parameter; and the defect identification result includes the location information and defect level of the defect region.
[0010] In some embodiments, the method further includes: generating flexible transfer control instructions based on the location information of the defect area and the defect level, the flexible transfer control instructions including gripping posture instructions and placement posture instructions; acquiring the pose data and conveying speed of the inspected pipe on the conveying path, the pose data including the yaw angle, pitch angle and roll angle of the inspected pipe; predicting the target spatial position of the inspected pipe to reach the target transfer station based on the pose data and conveying speed; controlling the actuator to approach the inspected pipe in a state of relative stillness or speed difference less than a preset speed difference according to the target spatial position; determining the gripping contact area of the actuator based on the location information of the defect area, and controlling the actuator to grip the inspected pipe in a posture where the gripping contact area avoids the defect area; when the defect level indicates a repairable defect, adjusting the placement posture of the inspected pipe according to the location information of the defect area so that the defect area faces a preset avoidance direction; when the defect level indicates an unrepairable defect, transferring the inspected pipe to the scrap carrying position.
[0011] To address the aforementioned technical problems, another technical solution adopted in this application is: providing a pipe inner wall defect detection device, comprising: a data acquisition module for acquiring surface morphology gradient data of the pipe inner wall, wherein the surface morphology gradient data characterizes the geometric morphology changes of the pipe inner wall surface; a detection module for determining detection data distributed circumferentially along the pipe inner wall based on the surface morphology gradient data; a closed-loop topology module for forming a closed-loop topology relationship at the beginning and end boundaries of the detection data, wherein the closed-loop topology relationship is used to maintain the continuity of defect features crossing the beginning and end boundaries; and a defect identification module for performing defect feature aggregation on the detection data based on the closed-loop topology relationship and outputting defect identification results.
[0012] Furthermore, this application also provides a pipe inner wall inspection device, comprising: a conveying mechanism configured to carry the inspected pipe material and move it along an inspection path; an imaging component disposed at an inspection station on the inspection path, configured to acquire surface morphology gradient data of the inner wall of the inspected pipe material; a processor configured to determine inspection data distributed circumferentially along the inner wall of the pipe based on the surface morphology gradient data, form a closed-loop topology relationship at the beginning and end boundaries of the inspection data, perform defect feature aggregation on the inspection data based on the closed-loop topology relationship, and output defect identification results, the defect identification results including defect location and defect level; and a flexible transfer mechanism configured to control the gripping contact area to avoid the defect location based on the defect identification results, and transfer the inspected pipe material in an attitude corresponding to the defect level.
[0013] In addition, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the pipe inner wall defect detection method as described above.
[0014] The beneficial effects of this application are as follows: Unlike existing technologies, this application discloses a method, apparatus, device, and storage medium for detecting defects on the inner wall of a pipe. By acquiring surface morphology gradient data characterizing changes in the geometric morphology of the inner wall surface as input for defect identification, since water stains and dirt primarily alter surface reflectivity without significantly changing the microscopic geometry, while cracks have depth and edge depressions, identification based on geometric morphology changes can directly suppress false defect interference caused solely by reflectivity changes at the physical level, reducing the false detection rate. Simultaneously, by forming a closed-loop topological relationship at the beginning and end boundaries of the circumferentially distributed detection data, the continuity of the inner wall of the pipe in the circumferential direction is restored, allowing defect features located on both sides of the beginning and end boundaries to converge, thereby maintaining the continuity of defect features across the beginning and end boundaries. This reduces missed detections caused by defect breaks at the boundaries of the unfolded image in related technologies, improving the completeness and accuracy of defect identification. Furthermore, by combining flexible transfer control, the gripping posture is adjusted according to the defect location to avoid the defect area, reducing secondary damage to the inspected pipe material during sorting. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein: Figure 1 This is a flowchart illustrating the pipe inner wall defect detection method provided in this application; Figure 2 This is a schematic diagram of the pipe inner wall defect detection device provided in this application; Figure 3 This is a schematic diagram of the pipe inner wall detection device provided in the embodiments of this application. Detailed Implementation
[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0017] The terms "first," "second," and "third" used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0018] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0019] like Figure 1 As shown, this embodiment provides a method for detecting defects in the inner wall of a pipe. The method includes the following steps: Step S100: Obtain surface morphology gradient data of the inner wall of the pipe. The surface morphology gradient data characterizes the geometric morphology changes of the inner wall surface.
[0020] During manufacturing or use, defects such as cracks and pits may occur on the inner wall of the pipe, altering the microscopic geometry of the inner wall surface. Surface morphology gradient data is used to reflect the degree and direction of this geometric change. Unlike traditional grayscale or color-based images, which primarily reflect differences in reflectivity of the pipe wall surface, water stains, dirt, and other deposits can alter surface reflectivity, thus creating artifacts resembling defects in ordinary images.
[0021] Since water stains and dirt typically spread evenly on the pipe wall surface without creating significant geometric depressions or protrusions, surface topography gradient data can ignore such interference caused solely by changes in reflectivity. This embodiment, by acquiring surface topography gradient data characterizing geometric changes, physically suppresses the interference of reflectivity pseudo-defects, providing a reliable data foundation for accurate defect identification.
[0022] Furthermore, obtaining the surface morphology gradient data of the inner wall of the pipe includes: projecting structured light stripes onto the inner wall of the pipe; acquiring deformed stripes modulated by the surface morphology of the inner wall of the pipe; and calculating the surface normal gradient data of the inner wall of the pipe based on the phase change of the deformed stripes to obtain the surface morphology gradient data; wherein, the surface morphology gradient data is generated based on the geometric morphology change of the inner wall of the pipe and is used to suppress the interference of pseudo-defects formed solely by changes in surface reflectivity.
[0023] Structured light stripes can be sinusoidal grating stripes, Gray code stripes, or other light patterns with specific periodicity and phase shift characteristics.
[0024] By projecting these structured light stripes onto the inner wall of the tube, the projected stripes will be distorted or deformed when there are geometric changes such as cracks or pits on the surface of the tube wall.
[0025] After collecting these deformed fringes, the normal gradient data of the inner wall surface of the pipe can be calculated by analyzing the phase changes of the fringes. Since the normal gradient data directly reflects the microscopic geometric changes of the object's surface, and water stains, dirt, and other deposits usually only change the surface reflectivity without producing significant geometric depressions or protrusions, the surface morphology gradient data generated based on the normal gradient data can effectively suppress the interference of pseudo-defects caused solely by changes in reflectivity.
[0026] For example, when there are water stains on the surface of the pipe wall, ordinary grayscale imaging will form bright or dark spots in the image due to the reflection and scattering of light by the water stains, which can easily be misidentified as cracks or defects. However, when using structured light stripe imaging, although the reflectivity of the water stain area changes, the geometry of the pipe wall at its bottom does not change. Therefore, the phase of the stripes will not change abruptly, and the calculated normal gradient data remains stable, thus filtering out the artifacts caused by water stains from a physical perspective.
[0027] Through the above mechanism, this application achieves direct separation of geometric features and reflectivity features from the physical optics level, reducing the dependence on the denoising capabilities of subsequent algorithms.
[0028] Specifically, projecting structured light stripes onto the inner wall of the tube includes: sequentially projecting multiple stripe patterns with different preset phase shifts along the axial direction of the inner wall of the tube, wherein the multiple stripe patterns have the same stripe period in the circumferential direction of the inner wall of the tube.
[0029] Multiple fringe patterns are typically solved using a four-step phase-shifting method, which involves projecting four sinusoidal fringe patterns with a phase difference of π / 2 in sequence. These fringe patterns maintain the same period along the circumferential direction of the tube's inner wall to ensure a consistent reference for phase calculations across the entire circumferential circumference.
[0030] By projecting sequentially along the axial direction, different axial positions of the inner wall of the pipe can be covered, achieving a scan of the entire inner wall of the pipe. It should be understood that, in addition to the four-step phase shift method, three-step or more phase shift methods can also be used, as long as the encapsulation phase can be calculated.
[0031] The acquisition of deformed fringes modulated by the surface morphology of the inner wall of the tube includes: refracting the fringe light path reflected from the inner wall surface of the tube to the line scan camera through a central conical mirror, so that the imaging field of view of the line scan camera covers the entire circumferential region of the inner wall of the tube; during the relative movement between the inner wall of the tube and the line scan camera, the line scan camera is controlled to acquire multiple deformed fringe images row by row based on the encoder trigger signal, so that the reflection intensity of each deformed fringe image corresponds to the same circumferential position of the inner wall of the tube under different phase shift patterns.
[0032] A central conical mirror is positioned inside the tube. Its conical structure deflects reflected light from the entire circumferential region of the tube's inner wall by 90 degrees, projecting it onto the sensor of the line scan camera. This optical path design allows the line scan camera to capture a full-circumference image of the tube's inner wall in a single pass, avoiding mechanical errors and time delays caused by rotating scanning. As the tube is conveyed at a constant speed along its axial direction, the encoder outputs trigger pulses based on the tube's travel distance. The line scan camera acquires one line of image data for each pulse received.
[0033] Because the projection system can project multiple phase-shift patterns within the time it takes for the pipe to move one pixel line distance, the multiple deformed stripe images acquired row by row by the line scan camera can correspond to the reflection intensity of the same circumferential position on the inner wall of the pipe under different phase-shift patterns. This encoder-triggered synchronous acquisition mechanism ensures a strict correspondence between each row of image data and the phase-shift pattern under high-speed motion, avoiding motion blur and phase aliasing.
[0034] Based on the phase change of deformed stripes, the surface normal gradient data of the inner wall of the pipe is calculated as follows: phase calculation is performed on the gray values of multiple deformed stripe images corresponding to the same circumferential and axial positions to obtain the wrapped phase; phase unwrapping is performed on the wrapped phase to obtain the continuous phase; the normal gradient components of the inner wall surface are determined based on the mapping relationship between the continuous phase and the calibrated phase gradient; and the normal gradient components are arranged according to the axial and circumferential positions to generate surface morphology gradient data.
[0035] Taking the four-step phase-shifting method as an example, for the same pixel location, the wrapping phase at that location can be calculated using the arctangent function based on the grayscale values under four different phase-shifting patterns. Due to the range limitation of the arctangent function, the wrapping phase is restricted to the range of -π to π, resulting in phase jumps. Therefore, a phase unwrapping operation is required, and the continuous phase distribution is recovered by comparing the phase difference between adjacent pixels and integrating. The continuous phase directly reflects the height change of the inner wall surface of the tube. During the calibration stage, a mapping relationship between the continuous phase and the surface normal gradient is established using a standard sample with a known height.
[0036] In actual testing, based on this mapping relationship, the continuous phase can be converted into the normal gradient components of the inner wall surface of the pipe, including the gradient in the x-direction and the gradient in the y-direction.
[0037] Finally, by arranging the normal gradient components of each pixel location according to their actual axial and circumferential positions, a two-dimensional surface topography gradient data matrix can be generated. This data matrix not only contains the location information of the defects but also the depth variation trend and direction information of the defects, providing a high-precision data foundation for subsequent defect feature aggregation and physical parameter calculation.
[0038] Step S200: Based on the surface morphology gradient data, determine the detection data distributed circumferentially along the inner wall of the pipe.
[0039] Because the pipe has an annular cross-section, the acquired surface topography gradient data usually needs to be mapped or unfolded onto a two-dimensional data plane distributed along the circumferential direction to facilitate subsequent data processing and feature extraction. The detection data is the unfolded dataset containing surface topography gradient information.
[0040] For example, the detection data can be a two-dimensional matrix with the circumferential angle as the horizontal axis and the axial position as the vertical axis, where each element in the matrix corresponds to the topographic gradient value at a specific location on the inner wall of the pipe.
[0041] By transforming the topographic gradient data of the three-dimensional pipe wall surface into detection data distributed along the circumferential direction, the complex cylindrical surface detection problem can be transformed into a planar detection problem, reducing the complexity of data processing.
[0042] Step S300: A closed-loop topological relationship is formed at the beginning and end boundaries of the detection data. The closed-loop topological relationship is used to maintain the continuity of defect features across the beginning and end boundaries.
[0043] When the inner wall of a pipe is unfolded circumferentially into planar inspection data, the starting and ending positions of the circumferential angle form two boundaries: the first boundary and the last boundary. Physically, the first and last boundaries are actually the same location on the circumferential direction of the pipe wall, and they are closely adjacent. However, in the unfolded planar data, the first and last boundaries are separated into two sides of the plane. If a crack crosses this circumferential position, it will be cut into two independent features on the first and last sides in the unfolded inspection data. The closed-loop topology establishes a connection between the first and last boundary data, logically restoring the continuity of the inner wall of the pipe in the circumferential direction. This topology allows defect features located on the first boundary side and those on the last boundary side to be identified as adjacent features, thus preventing cross-boundary defects from being misjudged as two independent defects during unfolding, effectively avoiding missed detections or misjudged defect sizes.
[0044] In one optional embodiment, after obtaining the detection data through geometric distortion correction, a closed-loop topology relationship is constructed. Forming a closed-loop topology relationship at the beginning and end boundaries of the detection data includes: determining the detection data obtained by circumferentially unfolding along the inner wall of the pipe as the beginning boundary data and the end boundary data; establishing an adjacency relationship between the beginning boundary data and the end boundary data, enabling defect features located on one side of the beginning boundary data and defect features located on the other side of the end boundary data to aggregate through the adjacency relationship; and forming a closed-loop topology relationship based on the adjacency relationship.
[0045] The inner wall of the pipe is a continuous ring structure in physical space, but when unfolded into two-dimensional planar detection data, the start and end positions of the circumferential angle are cut off, forming first boundary data and last boundary data. If a circumferential crack happens to cross this cut position, it will be segmented into two independent features in the detection data: one located at the first boundary and the other at the last boundary. This embodiment logically reconnects the first and last boundary data by establishing an adjacency relationship between them. This adjacency relationship can be a pixel-level correspondence or a feature-level association.
[0046] By establishing adjacency relationships, a logically closed-loop topology is formed, enabling subsequent feature aggregation algorithms to cross boundaries and transfer features, thereby re-aggregating two features that should belong to the same defect.
[0047] Step S400: Perform defect feature aggregation on the detection data based on the closed-loop topology relationship, and output the defect identification result.
[0048] After forming a closed-loop topology, the extraction and aggregation of defect features are no longer restricted by planar boundaries. When a defect feature located near the first boundary is detected, it can be associated with the corresponding feature near the tail boundary through the closed-loop topology, and the two can be aggregated into a complete defect connected domain. The defect identification results include information such as the defect type, location, and size.
[0049] For example, if the aggregated defect connected domain spans both the beginning and end boundaries, the output will show the defect as a complete circumferential crack. This embodiment performs feature aggregation through closed-loop topological relationships, ensuring the complete representation of cross-boundary defects and improving the accuracy and completeness of defect identification.
[0050] Based on closed-loop topology, defect feature aggregation is performed on the detection data. The output defect identification result includes: dividing the detection data into multiple feature nodes, which are arranged along the circumferential and axial directions of the inner wall of the pipe. Each feature node corresponds to a local region in the detection data, which includes the gradient magnitude and gradient direction features in the surface topography gradient data; constructing node adjacency relationships based on the spatial adjacency relationships between adjacent feature nodes, and setting cross-boundary connections between the boundary nodes of the corresponding first boundary data and the boundary nodes of the corresponding tail boundary data, so that the boundary node at the end with the largest circumferential angle and the boundary node at the end with the smallest circumferential angle are adjacent nodes; performing multiple rounds of feature transfer on each feature node based on the node adjacency relationships and cross-boundary connections, so that each feature node updates its own features according to the features of its adjacent nodes; after the multiple rounds of feature transfer are completed, feature nodes with the same defect response are determined as a defect connected region; when the defect connected region contains nodes on both the first boundary data side and the tail boundary data side, a complete defect segmentation region spanning the first and tail boundaries is output, and the complete defect segmentation region is used as the defect identification result.
[0051] This embodiment employs a graph topology structure for defect feature aggregation, rather than a traditional rectangular convolutional kernel. First, the detection data is divided into multiple grid-like or superpixel-level local regions, each acting as a feature node. Each feature node contains the gradient magnitude and gradient direction features of its corresponding region, directly reflecting whether geometric changes exist within that region. Subsequently, node adjacency relationships are constructed based on the spatial proximity of the feature nodes; for example, nodes adjacent vertically, horizontally, or vertically are considered adjacent. Crucially, for boundary nodes located at the first and last boundaries of the data, although they are on opposite sides of the two-dimensional plane, they are physically adjacent. Therefore, cross-boundary connections are established between these two types of boundary nodes, making them adjacent.
[0052] After constructing the graph topology containing cross-boundary connections, multiple rounds of feature propagation are performed. In each round, each feature node collects the feature information of all its neighboring nodes and updates it based on its own features. Due to the existence of cross-boundary connections, nodes on the first boundary side can directly receive the feature information of nodes on the tail boundary side, and vice versa.
[0053] After multiple rounds of feature propagation, the node features in the entire graph topology reach a stable state. At this point, feature nodes with the same or similar defect responses are clustered into a defect connected component. If a defect connected component contains nodes on both the first boundary data side and the last boundary data side, it indicates that this is a complete defect that spans the unfolded boundary, and the system outputs it as a complete defect segmentation region.
[0054] In contrast, if a conventional rectangular convolutional kernel is used to process an expanded image, the receptive field of the kernel, limited by its physical size, cannot cross the image boundary to associate feature information on the opposite side. This inevitably leads to cross-boundary defects being misjudged as two independent short defects, resulting in missed detections or incorrect defect size calculations. This embodiment breaks the limitation of planar boundaries by establishing cross-boundary connectivity, achieving continuous segmentation of cross-boundary defects and demonstrating the necessity of cross-boundary connectivity.
[0055] Optionally, a geometric distortion correction step is included before dividing the detection data into multiple feature nodes.
[0056] An initial circumferential unfolded image corresponding to the detection data is acquired. This initial circumferential unfolded image is obtained by unfolding the imaging data of the inner wall of the pipe along the circumferential direction. The initial circumferential unfolded image is input into the geometric distortion correction module. The geometric distortion correction module performs coordinate resampling on the initial circumferential unfolded image based on the affine transformation parameters obtained from calibration to correct the nonlinear stretching distortion caused by circumferential unfolding imaging. The corrected circumferential unfolded image is used as the detection data. The affine transformation parameters obtained from calibration are determined as follows: multiple calibration marks are set on the inner wall of the calibration pipe at intervals along the circumferential direction, and the arc length spacing between the multiple calibration marks is known. A calibration image containing multiple calibration marks is acquired, and circumferential unfolding is performed on the calibration image. The deviation between the actual pixel spacing of adjacent calibration marks in the unfolded calibration image and the theoretical pixel spacing corresponding to the arc length spacing is calculated. The affine transformation parameters that change with the circumferential position are obtained by fitting the deviation, so that the geometric distortion correction module corrects the aspect ratio of the defect features in the initial circumferential unfolded image according to the affine transformation parameters.
[0057] Because the magnification varies slightly depending on the circumferential angle when the inner wall of the pipe is folded and imaged using the central conical mirror, nonlinear stretching distortion occurs at the edges of the initial circumferential unfolded image. Without correction, the aspect ratio of the defect features will be distorted, affecting the accuracy of subsequent calculations of physical parameters such as defect area and length. The calibration process involves setting calibration marks, such as equally spaced crosshairs, on the calibration pipe with known arc length spacing. After acquiring and unfolding the calibration image, the actual pixel spacing between adjacent crosshairs in the unfolded image is calculated.
[0058] Since the theoretical pixel spacing corresponding to a known arc length spacing is fixed, the deviation between the actual pixel spacing and the theoretical pixel spacing reflects the degree of distortion at that circumferential position. By fitting these deviations, the affine transformation parameters that vary with the circumferential position can be obtained. The geometric distortion correction module uses these affine transformation parameters to resample the coordinates of the initial circumferential unfolded image, mapping the distorted pixels back to their correct spatial positions, thereby restoring the true aspect ratio of the defect features.
[0059] It should be understood that, in addition to affine transformations, polynomial transformations or spatial transformation networks based on neural networks can also be used to achieve geometric distortion correction, as long as coordinate resampling and correction of nonlinear stretching distortion can be achieved.
[0060] In an optional embodiment, the method further includes: determining at least two of the depth parameter, length parameter, and area parameter of the defect region based on surface topography gradient data; determining the defect level corresponding to the defect region based on at least two of the depth parameter, length parameter, and area parameter; and the defect identification result includes the location information and defect level of the defect region.
[0061] Since surface topography gradient data characterizes the microscopic geometric changes on the inner wall surface of the pipe, the three-dimensional topography of the defect region can be recovered by integrating its gradient magnitude and direction. The depth parameter can be obtained by calculating the height difference between the bottom of the defect region and the surrounding normal pipe wall surface; the length and area parameters can be obtained by statistically analyzing the pixel span of the defect's connected domain in the axial and circumferential directions and combining it with the physical resolution.
[0062] After obtaining these physical parameters, the system determines the defect level according to preset grading rules. For example, for municipal drainage pipes, when the depth parameter is greater than 1.5 mm or the length parameter is greater than 50 mm, the defect level is determined to be unrepairable; when the depth parameter is less than 1.0 mm and the defect is localized and point-like, the defect level is determined to be repairable; when the depth parameter is less than 0.2 mm, it is determined to be a qualified product. It should be understood that the above specific thresholds are only examples, and in actual applications, they can be adaptively adjusted according to the pipe specifications, wall thickness, material, and usage scenario.
[0063] By directly calculating physical parameters using topographic gradient data, compared to traditional estimation based on the pixel area of two-dimensional images, accurate depth information can be obtained, thereby significantly improving the accuracy of defect classification and providing reliable data support for subsequent flexible transfer control.
[0064] In an optional embodiment, the method further includes: generating flexible transfer control instructions based on the location information of the defect area and the defect level, the flexible transfer control instructions including gripping posture instructions and placement posture instructions; acquiring the pose data and conveying speed of the inspected pipe on the conveying path, the pose data including the yaw angle, pitch angle and roll angle of the inspected pipe; predicting the target spatial position of the inspected pipe to reach the target transfer station based on the pose data and conveying speed; controlling the actuator to approach the inspected pipe in a state of relative stillness or speed difference less than a preset speed difference according to the target spatial position; determining the gripping contact area of the actuator based on the location information of the defect area, and controlling the actuator to grip the inspected pipe in a posture where the gripping contact area avoids the defect area; when the defect level indicates a repairable defect, adjusting the placement posture of the inspected pipe according to the location information of the defect area so that the defect area faces a preset avoidance direction; when the defect level indicates an unrepairable defect, transferring the inspected pipe to the scrap carrying position.
[0065] In high-speed production lines, traditional pneumatic push rods forcibly remove pipes, which can easily cause secondary damage, especially when the pipes themselves have cracks. A hard impact can lead to crack propagation or even pipe breakage. This embodiment achieves non-destructive sorting by generating flexible transfer control commands. The system first uses a three-dimensional contour sensor positioned above the conveyor path to scan the inspected pipe in real time, acquiring its yaw angle, pitch angle, and roll angle, etc., and combines this with the conveyor speed feedback from the encoder to predict the target spatial position of the inspected pipe at the target transfer station in the future. The actuator plans its trajectory in advance based on this predicted position, approaching the pipe in a state of relative stillness or minimal speed difference, achieving dynamic synchronous gripping and eliminating the impact force caused by relative speed.
[0066] During the gripping process, the actuator determines the gripping contact area based on the location information of the defect area. For example, if the defect identification result shows that the crack is located in the circumferential 0-30 degree region of the pipe, the actuator controls the matrix vacuum suction cup or gripper to avoid this region and selects the healthy pipe wall near 180 degrees circumferentially as the gripping contact area. This attitude control logic ensures that the gripping force is not directly applied to the defect area, preventing the crack from propagating under pressure.
[0067] In terms of placement strategy, the system executes different actions based on the defect level. When the defect level indicates a repairable defect, the actuator adjusts the placement posture of the inspected pipe to align the defective area with a preset avoidance direction, allowing the subsequent repair robot to directly perform grinding or repair operations without needing to readjust the pipe's posture again. When the defect level indicates an unrepairable defect, the actuator directly moves the inspected pipe to the waste collection position. This embodiment establishes a strict causal mapping between the detection results and execution control. By avoiding defective areas through posture control and synchronous follow-up gripping, secondary damage during the sorting process is effectively avoided, significantly improving the production yield.
[0068] Taking a municipal drainage pipe production line as an example, the morphological gradient data acquisition, closed-loop topology recognition, and defect classification and flexible transfer control method chain of the aforementioned embodiments are connected in a specific production scenario to demonstrate the complete workflow from pipe feeding, structured light imaging, closed-loop topology recognition, defect classification to flexible sorting.
[0069] During the pipe conveying and imaging stage, the pipe is carried by the conveying mechanism and moves at a constant speed. Upon reaching the inspection station, the imaging component is triggered. Specifically, taking a municipal drainage pipe with a diameter of 300 mm as an example, the conveying speed is set to 0.2 meters per second. When the front end of the pipe reaches the inspection station, the photoelectric sensor triggers the stripe projection system to project structured light stripes onto the inner wall of the pipe. The structured light stripes are refracted by the central conical mirror, covering a complete circumferential area of the inner wall of the pipe. During the relative movement of the pipe and the linear array camera, the encoder outputs trigger pulses according to the pipe's movement distance, and the linear array camera acquires multiple deformed stripe images line by line according to the encoder trigger signal. For example, each pulse output by the encoder corresponds to a pipe movement of 0.1 mm. The line frequency of the linear array camera is strictly matched with the encoder pulses to ensure the reflection intensity of the same circumferential position on the inner wall of the pipe corresponding to each deformed stripe image under different phase shift patterns, avoiding motion blur caused by high-speed movement.
[0070] In the morphology gradient data acquisition and pseudo-defect suppression stage, the system performs phase calculation on the acquired deformed stripe images. Specifically, a four-step phase-shifting method is used to perform phase calculation on the grayscale values of multiple deformed stripe images corresponding to the same circumferential and axial positions to obtain the encapsulated phase; the encapsulated phase is then unwrapped to obtain the continuous phase; based on the mapping relationship between the continuous phase and the calibrated phase gradient, the normal gradient component of the inner wall surface is determined, generating surface morphology gradient data. In actual working conditions, the inner wall of the pipe is often accompanied by water stains and rust spots. These deposits will change the reflectivity in ordinary grayscale imaging, forming bright or dark spots, which are easily misidentified as defects. Since water stains and rust spots only change the surface reflectivity without changing the microscopic geometry of the pipe wall, the surface morphology gradient data obtained based on phase calculation can suppress such pseudo-defect interference caused only by changes in surface reflectivity, filtering out artifact interference caused by water stains and rust spots from a physical level.
[0071] In the closed-loop topology recognition and cross-boundary defect continuous segmentation stage, the system unfolds the surface topography gradient data along the circumferential direction to obtain an initial circumferential unfolded image, and inputs it into the geometric distortion correction module to perform coordinate resampling, correcting the nonlinear stretching distortion caused by the circumferential unfolding imaging. Subsequently, the corrected detection data is divided into multiple feature nodes, node adjacency relationships are constructed, and cross-boundary connections are set between the boundary nodes of the first boundary data and the boundary nodes of the last boundary data. Based on this closed-loop topology relationship, multiple rounds of feature transfer are performed on each feature node, and feature nodes with the same defect response are determined as a defect connected region. In a practical scenario, if there is a circumferential crack across the zero-degree position of the pipe, the crack will be cut into two independent features by the first and last boundaries in the unfolded image. After restoring the continuous representation through the closed-loop topology relationship, the nodes on the first boundary side and the nodes on the last boundary side are aggregated through the cross-boundary connection relationship, and the system outputs it as a complete defect segmentation region spanning the first and last boundaries, thereby avoiding missed detection of cross-boundary defects.
[0072] In the defect classification and flexible sorting stage, the system calculates the depth, length, and area parameters of the defect area based on surface topography gradient data and determines the defect level. For example, when the depth parameter is greater than 1.5 mm or the length parameter is greater than 50 mm, the defect level is determined to be unrepairable; when the depth parameter is less than 1 mm and is a localized point, the defect level is determined to be repairable. Based on the location information and defect level of the defect area, the system generates flexible transfer control commands. After acquiring the pose data and conveying speed of the inspected pipe on the conveying path, the system predicts the target spatial position of the inspected pipe at the target transfer station and controls the actuator to approach the pipe in a relatively stationary state relative to the inspected pipe. Based on the location information of the defect area, the system determines the gripping contact area of the actuator and controls the actuator to grip the pipe in an attitude that avoids the defect area. When the defect level indicates a repairable defect, the pipe placement posture is adjusted so that the defect area faces the preset avoidance direction, facilitating subsequent repair; when the defect level indicates an unrepairable defect, the pipe is transferred to the scrap receiving position. This flexible transfer control avoids secondary damage to the pipe caused by the hard rejection of traditional pneumatic push rods.
[0073] By combining topology gradient imaging, closed-loop topology recognition, and flexible transfer control, a complete technical closed loop was achieved on the municipal drainage pipe production line. This loop suppresses reflectivity artifacts at the physical optics level, stitches up fractures at the algorithmic topology level, and realizes non-destructive flexible sorting at the mechanical control level. This significantly reduces the false detection rate, minimizes cross-boundary missed detections, and avoids secondary damage during the sorting process.
[0074] The above describes the pipe inner wall defect detection method in the embodiments of this application. The following describes the pipe inner wall defect detection device in the embodiments of this application. Please refer to [link / reference]. Figure 2 One embodiment of the pipe inner wall defect detection device in this application includes: a data acquisition module for acquiring surface morphology gradient data of the pipe inner wall, wherein the surface morphology gradient data characterizes the geometric morphology changes of the pipe inner wall surface; a detection module for determining detection data distributed circumferentially along the pipe inner wall based on the surface morphology gradient data; a closed-loop topology module for forming a closed-loop topology relationship at the beginning and end boundaries of the detection data, wherein the closed-loop topology relationship is used to maintain the continuity of defect features across the beginning and end boundaries; and a defect identification module for performing defect feature aggregation on the detection data based on the closed-loop topology relationship and outputting defect identification results.
[0075] The pipe inner wall defect detection device, through functional module division, achieves a collaborative detection closed loop that suppresses reflectivity artifacts at the physical optics level and stitches together fracture cracks at the algorithmic topology level. The data acquisition module, as the front-end module for data collection, has the core function of acquiring surface morphology gradient data characterizing the microscopic geometric changes of the pipe inner wall surface.
[0076] It should be understood that the data acquisition module is not limited to a specific hardware form, as long as it can output gradient data reflecting changes in geometric morphology. For example, the data acquisition module may include a structured light projector and a linear array camera, which calculate the phase gradient by projecting light fringes and acquiring deformed fringes; it may also be a three-dimensional contour sensor based on the time-of-flight method, which directly measures the depth change of the pipe wall surface and converts it into a normal gradient; or it may be a laser speckle interferometry imaging module, which extracts the surface morphology gradient by the correlation changes of the speckle field.
[0077] By acquiring geometric shape change data instead of simple grayscale images, the data acquisition module filters out interference from adhering objects such as water stains and dirt that only change reflectivity at the physical source, reducing the computational load and false detection rate of subsequent detection modules, closed-loop topology modules, and defect identification modules.
[0078] The detection module, acting as the data processing module of the device, establishes a data transmission channel with the data acquisition module. The detection module receives surface topography gradient data output by the data acquisition module and maps or unfolds the gradient data of the three-dimensional pipe wall surface into two-dimensional detection data distributed along the circumferential direction, facilitating subsequent feature extraction. The closed-loop topology module forms a closed-loop topology relationship at the beginning and end boundaries of the detection data. Specifically, the closed-loop topology module establishes an adjacency relationship between the beginning and end boundary data of the circumferentially unfolded data, logically restoring the continuity of the inner wall of the pipe in the circumferential direction. The defect identification module performs defect feature aggregation on the detection data based on this closed-loop topology relationship. For example, it divides the detection data into multiple feature nodes and constructs a graph topology structure containing cross-boundary connections. Through multiple rounds of feature transfer, it aggregates defect features crossing the beginning and end boundaries into a complete defect connected domain, ultimately outputting a defect identification result containing information such as defect location, size, and type. The above functional modules can be implemented using hardware entities with logic operation capabilities, such as central processing units, graphics processing units, field-programmable gate arrays, or application-specific integrated circuits.
[0079] By leveraging the data flow and collaborative relationships among the data acquisition module, detection module, closed-loop topology module, and defect identification module, the physical anti-interference characteristics of surface morphology gradient data are combined with the cross-boundary continuous identification characteristics of closed-loop topology relationships. The data acquisition module ensures the purity of the input data, while the detection, closed-loop topology, and defect identification modules ensure the integrity of defect identification. The collaborative work of these modules enables the device to accurately identify defects on the inner wall of pipes, especially cracks crossing circumferential boundaries, in complex industrial environments, effectively reducing false detection and false negative rates.
[0080] above Figure 2 The pipe inner wall defect detection device in this application embodiment is described in detail from the perspective of modular functional entities. The computer equipment in this application embodiment is described in detail from the perspective of hardware processing.
[0081] like Figure 2 As shown, this embodiment provides a pipe inner wall inspection device. The device includes: a conveying mechanism 10, configured to carry the inspected pipe 50 and move it along the inspection path; an imaging component 20, disposed at an inspection station on the inspection path, configured to acquire surface morphology gradient data of the inner wall of the inspected pipe 50; a processor 30, configured to determine the inspection data distributed circumferentially along the inner wall of the pipe based on the surface morphology gradient data, form a closed-loop topology relationship at the beginning and end boundaries of the inspection data, perform defect feature aggregation on the inspection data based on the closed-loop topology relationship, and output defect identification results, including defect location and defect level; and a flexible transfer mechanism 40, configured to control the gripping contact area to avoid the defect location based on the defect identification results, and transfer the inspected pipe 50 in an attitude corresponding to the defect level.
[0082] The pipe wall inspection equipment, through the physical layout and coordinated connection of the conveying mechanism, imaging component, processor, and flexible transfer mechanism, forms a complete physical closed loop from data acquisition and defect identification to non-destructive sorting. The conveying mechanism, as the supporting foundation of the entire machine, can include a servo motor-driven roller conveyor, chain conveyor, or V-shaped idler roller conveyor with clamping wheel sets. Its function is to carry the inspected pipe material along a preset inspection path at a uniform speed. Inspection stations are set at specific locations within the conveying mechanism, and the imaging component is deployed at these inspection stations.
[0083] It should be understood that the specific form of the conveying mechanism is not limited to the above-listed examples, as long as it can ensure the stability and speed uniformity of the pipe during the movement process.
[0084] As the front end for physical data acquisition, the imaging component's core function is to acquire surface morphology gradient data characterizing changes in the geometric morphology of the pipe's inner wall surface. The imaging component can include a structured light projector and a linear array camera, achieving full-circumference imaging by reversing the optical path through a central conical mirror; it can also be a laser 3D contour scanner based on the time-of-flight method, directly measuring changes in pipe wall depth and converting them into a normal gradient; or it can be a laser speckle interferometry imaging module. The imaging component is physically connected to the conveying mechanism via a signal trigger connection. When the pipe being inspected is moved to the inspection station by the conveying mechanism, a photoelectric sensor or encoder is triggered to emit a trigger signal. The imaging component responds to this trigger signal and begins acquiring data, ensuring strict synchronization between the imaging action and the pipe's movement position, avoiding motion blur or data omissions caused by high-speed movement.
[0085] The processor, acting as the central hub for data processing and logic control of the entire system, establishes a high-speed data communication bus connection with the imaging component. The processor receives surface topology gradient data output by the imaging component and executes a closed-loop topology recognition algorithm. The processor maps the gradient data of the three-dimensional pipe wall surface into two-dimensional detection data distributed along the circumferential direction, forming a closed-loop topology relationship at the beginning and end boundaries of the detection data. Based on this closed-loop topology relationship, the processor performs defect feature aggregation on the detection data, ultimately outputting a defect identification result containing the defect location and defect level. The processor can be an industrial control computer, a digital signal processor, a field-programmable gate array (FPGA), or a dedicated artificial intelligence acceleration chip with tensor computing capabilities. At the hardware level, the processor connects to the encoder of the conveying mechanism and the motion controller of the flexible transfer mechanism through input / output interfaces to achieve time synchronization of the entire system's signals.
[0086] The flexible transfer mechanism is located at a transfer station downstream of the inspection path and establishes a control command transmission channel with the processor. The flexible transfer mechanism is configured to control the gripping contact area to avoid the defect location based on the defect identification results output by the processor, and transfer the inspected pipe in an attitude corresponding to the defect level. The flexible transfer mechanism may include a six-axis multi-joint robotic arm, a Cartesian coordinate robot, or a gantry manipulator, and its end effector may be equipped with a matrix vacuum suction cup or a flexible pneumatic gripper.
[0087] In terms of timing, the processor generates flexible transfer control commands based on the defect location and level, and predicts the target spatial position of the inspected pipe at the transfer station by combining the speed feedback of the conveying mechanism. The flexible transfer mechanism plans its trajectory in advance based on this predicted position, approaching the pipe in a state of relative stillness or minimal speed difference for dynamic grasping. During grasping, the flexible transfer mechanism adjusts the attitude of the end effector based on the defect location information, ensuring the grasping contact area avoids the defect area to prevent crack propagation under pressure. When the defect level indicates a repairable defect, the flexible transfer mechanism adjusts the pipe's placement attitude so that the defect area faces the preset avoidance direction; when the defect level indicates an unrepairable defect, the flexible transfer mechanism transfers the pipe to the scrap receiving position.
[0088] By triggering the imaging component to acquire data through the conveying mechanism and controlling the flexible transfer mechanism to perform avoidance and grasping through the signal triggering and coordinated timing, the physical anti-interference characteristics of surface topology gradient data, the cross-boundary continuous identification characteristics of closed-loop topology relationships, and the non-destructive control characteristics of flexible transfer are deeply integrated at the hardware level of the whole machine. This achieves full automation of online detection and non-destructive sorting of pipe wall defects in complex industrial environments, significantly reducing the false detection rate and missed detection rate, and effectively avoiding secondary damage during the sorting process.
[0089] This application also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the pipe inner wall defect detection method.
[0090] Unlike existing technologies, this application uses surface morphology gradient data to replace traditional reflectivity images. Through structured light projection and phase calculation, it extracts the geometric morphology changes of the inner wall of the pipe from a physical level, directly suppressing the interference of false defects caused by water stains, dirt, and other deposits, thus reducing the false detection rate. A closed-loop topological relationship is constructed at the beginning and end boundaries of the circumferentially unfolded detection data. By establishing adjacency relationships, the circumferential continuity of the pipe wall is restored, allowing defect features crossing boundaries to aggregate, avoiding the segmentation and missed detection of cross-boundary defects, and improving the completeness of identification. Based on the closed-loop topological relationship, topological feature aggregation is performed, dividing the detection data into nodes and setting cross-boundary connections. Through multiple rounds of feature transfer, continuous segmentation and accurate output of defect features are achieved. Flexible transfer control commands are generated based on defect levels, dynamically predicting the pipe pose and controlling the actuator to avoid grasping defect areas. The placement posture is adjusted according to the defect level to achieve non-destructive sorting. This achieves a complete improvement from physical anti-interference and continuous algorithmic identification to non-destructive control, significantly solving the problems of false defect detection, missed cross-boundary detection, and secondary damage during sorting in existing technologies.
[0091] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. In particular, the storage medium embodiments and computer device embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0092] This application can be used in a wide range of general-purpose or special-purpose computing system environments or configurations. For example: personal computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, network PCs, minicomputers, distributed computing environments including any of the above systems or devices, etc.
[0093] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative; multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed.
[0094] The units described as separate components may or may not be physically separate. 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. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0095] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0096] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for detecting defects in the inner wall of a pipe, characterized in that, include: Acquire surface topography gradient data of the inner wall of the pipe, wherein the surface topography gradient data characterizes the geometric topography changes of the inner wall surface of the pipe. Based on the surface topography gradient data, the detection data distributed circumferentially along the inner wall of the pipe is determined; A closed-loop topology is formed at the beginning and end boundaries of the detection data, and the closed-loop topology is used to maintain the continuity of defect features across the beginning and end boundaries; Based on the closed-loop topology, defect feature aggregation is performed on the detection data, and defect identification results are output.
2. The method for detecting defects in the inner wall of a pipe according to claim 1, characterized in that, The acquisition of surface topography gradient data of the inner wall of the pipe includes: Structured light stripes are projected onto the inner wall of the tube; Collect deformed stripes modulated by the surface morphology of the inner wall of the tube; Based on the phase change of the deformed stripes, the surface normal gradient data of the inner wall of the tube is calculated to obtain the surface topography gradient data. The surface morphology gradient data is generated based on the geometric morphology changes of the inner wall surface of the pipe, and is used to suppress interference from pseudo-defects caused solely by changes in surface reflectivity.
3. The method for detecting defects in the inner wall of a pipe according to claim 2, characterized in that, The projection of structured light stripes onto the inner wall of the tube includes: sequentially projecting multiple stripe patterns with different preset phase shifts along the axial direction of the inner wall of the tube, wherein the multiple stripe patterns have the same stripe period in the circumferential direction of the inner wall of the tube. The acquisition of deformed stripes modulated by the surface morphology of the inner wall of the tube includes: refracting the stripe light path reflected from the inner wall surface of the tube to a linear array camera through a central conical mirror, so that the imaging field of view of the linear array camera covers a complete circumferential region of the inner wall of the tube; during the relative movement of the inner wall of the tube and the linear array camera, controlling the linear array camera to acquire multiple deformed stripe images row by row based on encoder trigger signals, so that each deformed stripe image corresponds to the reflection intensity of the same circumferential position of the inner wall of the tube under different phase shift patterns; The step of calculating the surface normal gradient data of the inner wall of the pipe based on the phase change of the deformed stripes includes: performing phase calculation on the gray values of multiple deformed stripe images corresponding to the same circumferential and axial positions to obtain a wrapped phase; performing phase unwrapping on the wrapped phase to obtain a continuous phase; determining the normal gradient components of the inner wall surface of the pipe based on the mapping relationship between the continuous phase and the calibrated phase gradient; and arranging the normal gradient components according to the axial and circumferential positions to generate the surface topography gradient data.
4. The method for detecting defects in the inner wall of a pipe according to claim 1, characterized in that, The process of forming a closed-loop topology at the beginning and end boundaries of the detection data includes: The detection data obtained by unfolding along the inner wall of the tube in a circumferential direction are determined as the first boundary data and the last boundary data. An adjacency relationship is established between the first boundary data and the last boundary data, so that defect features located on one side of the first boundary data and defect features located on the one side of the last boundary data can be aggregated with each other through the adjacency relationship. The closed-loop topology is formed based on the adjacency relationship.
5. The method for detecting defects in the inner wall of a pipe according to claim 4, characterized in that, The defect feature aggregation performed on the detection data based on the closed-loop topology, and the output defect identification results include: The detection data is divided into multiple feature nodes, which are arranged along the circumferential and axial directions of the inner wall of the pipe. Each feature node corresponds to a local region in the detection data, and the local region includes the gradient magnitude feature and gradient direction feature in the surface topography gradient data. Node adjacency relationships are constructed based on the spatial adjacency relationships between adjacent feature nodes, and cross-boundary connection relationships are set between the boundary nodes corresponding to the first boundary data and the boundary nodes corresponding to the tail boundary data, so that the boundary node at the maximum circumferential angle and the boundary node at the minimum circumferential angle are adjacent nodes to each other. Based on the node adjacency relationship and the cross-boundary connection relationship, multiple rounds of feature transfer are performed on each feature node, so that each feature node updates its own features according to the features of its neighboring nodes; After the multiple rounds of feature transfer are completed, feature nodes with the same defect response are identified as a defective connected domain. When the defect connected region contains nodes on both the first boundary data side and the last boundary data side, a complete defect segmentation region spanning the first and last boundaries is output, and the complete defect segmentation region is used as the defect identification result.
6. The method for detecting defects in the inner wall of a pipe according to claim 1, characterized in that, The method further includes: Based on the surface topography gradient data, at least two of the depth parameter, length parameter, and area parameter of the defect region are determined. The defect level corresponding to the defect region is determined based on at least two of the depth parameter, the length parameter, and the area parameter. The defect identification result includes the location information of the defect area and the defect level.
7. The method for detecting defects in the inner wall of a pipe according to claim 6, characterized in that, The method further includes: Based on the location information of the defect area and the defect level, a flexible transfer control command is generated, which includes a grasping posture command and a placement posture command. Acquire the position and orientation data and conveying speed of the inspected pipe on the conveying path, wherein the position and orientation data includes the yaw angle, pitch angle and roll angle of the inspected pipe; Based on the pose data and the conveying speed, the target spatial position of the inspected pipe is predicted to reach the target transfer station. According to the target spatial position, the actuator is controlled to approach the inspected pipe in a state where it is relatively stationary or the speed difference is less than the preset speed difference; The gripping contact area of the actuator is determined based on the location information of the defect area, and the actuator is controlled to grip the inspected pipe in an attitude in which the gripping contact area avoids the defect area. When the defect level indicates a repairable defect, the placement posture of the inspected pipe is adjusted according to the location information of the defect area, so that the defect area is oriented towards a preset avoidance direction. When the defect level indicates an unrepairable defect, the inspected pipe is transferred to the scrap container.
8. A device for detecting defects in the inner wall of a pipe, characterized in that, include: The data acquisition module is used to acquire surface morphology gradient data of the inner wall of the pipe, wherein the surface morphology gradient data characterizes the geometric morphology changes of the inner wall surface of the pipe. The detection module is used to determine the detection data distributed circumferentially along the inner wall of the pipe based on the surface topography gradient data. A closed-loop topology module is used to form a closed-loop topology relationship at the beginning and end boundaries of the detection data, wherein the closed-loop topology relationship is used to maintain the continuity of defect features across the beginning and end boundaries. The defect identification module is used to perform defect feature aggregation on the detection data based on the closed-loop topology relationship and output the defect identification result.
9. A pipe inner wall inspection device, characterized in that, include: The conveying mechanism is configured to carry the inspected pipe material along the inspection path; An imaging component, located at a detection station on the detection path, is configured to acquire surface morphology gradient data of the inner wall of the inspected pipe. The processor is configured to determine detection data distributed circumferentially along the inner wall of the pipe based on the surface topography gradient data, form a closed-loop topology relationship at the beginning and end boundaries of the detection data, perform defect feature aggregation on the detection data based on the closed-loop topology relationship, and output defect identification results, the defect identification results including defect location and defect level; The flexible transfer mechanism is configured to control the gripping contact area to avoid the defect location based on the defect identification result, and transfer the inspected pipe in an attitude corresponding to the defect level.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the pipe inner wall defect detection method as described in any one of claims 1-7.
