Cable pipeline inner wall detection method and system for cable installation
By integrating the energy response, phase consistency, and directional purity of Gabor filters, the problem of distinguishing between real cracks and background textures in the inner wall detection of cable ducts was solved, achieving high-precision detection with low false alarms and improving the safety of cable installation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-12
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, Gabor filters cannot effectively distinguish between real micro-cracks and complex background textures when detecting the inner wall of cable ducts, resulting in artifacts in the detection results and affecting the reliability and accuracy of the detection.
By fusing the energy response of Gabor filtering, phase consistency at multiple scales, and directional purity at multiple directions, a new defect discrimination index is constructed. Combined with multi-frame image processing and morphological operations, high-precision detection of the inner wall of cable ducts is achieved.
It significantly reduced the false alarm rate, improved the detection accuracy and reliability of micro-cracks in the inner wall of cable ducts, and enhanced detection efficiency and practicality.
Smart Images

Figure CN121810702A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing. More specifically, the present invention relates to a method and system for detecting the inner wall of a cable duct used for cable installation. Background Art
[0002] In modern urban infrastructure construction, cable ducts are the underground arteries that ensure the safe operation of power and communication networks. As a key link, the quality of cable installation projects directly affects the long-term stability of the power grid. Before a cable is pulled through a duct, it is necessary to detect the integrity of the inner wall of the duct. If there are tiny cracks on the inner wall of the duct, the sharp edges of the cracks can easily scratch the insulation sheath of the cable during the pulling process, posing a safety hazard and potentially leading to short circuits, leakage, and even fire accidents during later operation. To achieve automated detection, existing technologies often use pipeline robots equipped with cameras to capture images of the inner wall and analyze them using image processing algorithms. As an excellent multi-scale and multi-directional texture analysis tool, the Gabor filter is commonly used to extract directional features in images. The Gabor filter can effectively respond to tiny cracks with linear features on the inner wall of the cable duct, providing technical support for automated detection.
[0003] The problems with the existing technologies are as follows: When the standard Gabor filter is applied to the detection of the inner wall of a cable duct, it mainly relies on the amplitude response of the Gabor filter to judge the significance of features. The amplitude response essentially only quantifies the local energy intensity of an image in a specific direction and frequency. However, in the complex inner wall environment of a cable duct, not only do real tiny cracks present as high-energy linear features, but a large number of non-defect background textures (such as the pouring marks of concrete aggregates, water stain imprints) also have strong directionality and energy. While the standard Gabor filter extracts a high amplitude response for cracks, it also generates an equally strong high amplitude response for these background textures. This causes the algorithm to be unable to distinguish real cracks from harmless background textures, and the output saliency map is filled with a large number of artifacts, seriously interfering with subsequent defect discrimination and rendering it useless for high-reliability detection before cable installation. Summary of the Invention
[0004] The present invention provides a method and system for detecting the inner wall of a cable duct used for cable installation, aiming to solve the problem in the related technologies that while the Gabor filter extracts a high amplitude response for cracks, it also generates an equally strong high amplitude response for these background textures, resulting in the algorithm being unable to distinguish real cracks from harmless background textures, and the output saliency map being filled with a large number of artifacts, seriously interfering with subsequent defect discrimination.
[0005] In a first aspect, the present invention provides a method for detecting the inner wall of a cable duct for cable installation, comprising: acquiring a grayscale image of the inner wall of the cable duct; performing multi-scale, multi-directional Gabor filtering on the grayscale image to obtain the complex response of each pixel at each scale and in each direction, and calculating the preliminary energy response level of each pixel based on the amplitude of the complex response; for any pixel, performing vector summation on the complex response at all scales in any direction to obtain the corresponding vector sum amplitude, and performing scalar summation on the amplitude of the complex response at all scales in any direction to obtain the corresponding vector sum amplitude. The ratio of the vector sum and amplitude to the scalar sum and amplitude is used as the phase consistency factor in the corresponding direction. The largest phase consistency factor in all directions is taken as the phase consistency degree of each pixel. The ratio of the second largest value to the largest value of the phase consistency factor in all directions for any pixel is calculated to obtain the directional purity of that pixel. The product of the preliminary energy response degree, the phase consistency degree, and the directional purity is taken as the final defect degree of each pixel. Crack defects are detected on the inner wall of the cable duct based on the final defect degree. By creatively fusing the energy response of Gabor filtering, phase consistency at multiple scales, and directional purity in multiple directions, a new defect discrimination index is constructed. This multi-dimensional feature fusion method can effectively suppress the interference of background texture and significantly reduce the false alarm rate, thereby achieving high-precision and high-reliability detection of micro-cracks in the inner wall of cable ducts.
[0006] Furthermore, acquiring a grayscale image of the inner wall of the cable duct includes: acquiring a video stream of the inner wall of the cable duct, decoding the video stream into multiple frames of images, and performing grayscale processing on the multiple frames of images to obtain the grayscale image. By acquiring a video stream and decoding it into multiple frames for processing, the detection method of the present invention can be applied to mobile detection equipment such as pipeline robots, realizing continuous, dynamic, and full-coverage detection of the inner wall of the pipeline, thus improving detection efficiency and practicality.
[0007] Furthermore, the preliminary energy response level of any given pixel is calculated, including taking the maximum value among the amplitudes of the complex responses of any given pixel at all scales and in all directions as the preliminary energy response level. By taking the maximum amplitude among the Gabor filter responses at all scales and in all directions, it is ensured that even the weakest crack can have its energy response effectively captured as long as its features match the filter at a certain scale and in a certain direction, thereby improving the algorithm's detection sensitivity for cracks of different widths and orientations.
[0008] Furthermore, obtaining the directional purity of any given pixel includes: subtracting the ratio of the second largest to the largest phase consistency factor of the given pixel across all directions from 1, and using the result as the directional purity. By calculating the ratio of 1 to the second largest phase consistency factor to the largest value, a clear and effective quantification method is provided for the directional purity concept proposed above. This allows the algorithm to stably measure the linear concentration of a pixel's features, ensuring accurate identification of linear cracks.
[0009] Furthermore, based on the final defect level, crack defect detection is performed on the inner wall of the cable duct, including: binarizing the final defect level to obtain a binary image; performing connected component analysis on the binary image to extract connected regions as candidate crack defects; and removing candidate crack defects with a length less than a preset length threshold to obtain the final crack defect detection result. Through binarization, connected component analysis, and length threshold filtering, the pixel-level defect response map is transformed into target-level candidate cracks, and isolated small regions generated by random noise are effectively removed, making the final detection result more regular and consistent with the actual crack morphology, thus improving the signal-to-noise ratio and usability of the detection result.
[0010] Furthermore, before performing connected component analysis on the binary image, the method further includes performing a morphological closing operation on the binary image. In existing detection methods, real cracks may appear as discontinuous breaks in the detection results due to image noise or uneven brightness. The closing operation can effectively connect these adjacent broken parts, making the detected crack lines more complete and continuous, which is beneficial for the subsequent accurate assessment of crack length and severity.
[0011] Furthermore, the grayscale image is subjected to multi-scale, multi-directional Gabor filtering, including: constructing a filter bank containing multiple Gabor filters, wherein the multiple Gabor filters have 4 to 8 directions and 3 to 6 scales.
[0012] Furthermore, the final defect level is binarized, including: setting a global defect threshold, and determining pixels with a final defect level greater than the global defect threshold as defect points, wherein the global defect threshold ranges from 0.6 to 0.8.
[0013] Furthermore, the method also includes: applying a Gaussian low-pass filter to smooth the grayscale image.
[0014] In a second aspect, the present invention also provides a cable duct inner wall inspection system for cable installation, comprising a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement the cable duct inner wall inspection method for cable installation as described in any of the above claims.
[0015] Beneficial effects: By calculating the phase consistency of Gabor filtering at multiple scales, it is possible to effectively distinguish between structured real edges (such as cracks) and unstructured background textures. By calculating the purity of phase consistency in multiple directions, it is possible to further confirm whether the feature is a linear feature in a single direction. Finally, multiplying the initial energy, phase consistency, and directional purity yields the final defect level, which greatly suppresses the interference of complex background textures, significantly reduces the false alarm rate, and thus achieves more accurate and reliable detection of cracks in the inner wall of pipelines. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the inspection of the inner wall of a cable duct according to an embodiment of the present invention. Detailed Implementation
[0017] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0018] like Figure 1 As shown, S101: Acquire images of the inner wall of the cable duct and perform preprocessing.
[0019] First, visual data of the inner wall of the cable duct is acquired using specialized inspection equipment. Specifically, a pipeline robot equipped with a surround-view camera moves at a constant speed inside the duct, capturing video streams of the inner wall in real time. The acquired video streams are then decoded into a series of continuous image frames.
[0020] To facilitate subsequent image analysis and feature extraction, each frame of the original image needs to undergo standardization preprocessing. This preprocessing includes: grayscale conversion: converting the original color image frame into a single-channel grayscale image to reduce data dimensionality and eliminate interference from color information on texture analysis; and smoothing filtering: applying a Gaussian low-pass filter to slightly smooth the grayscale image. This aims to suppress high-frequency random noise introduced during image acquisition while preserving edge information of structural features such as cracks as much as possible. In this embodiment, the kernel size of the Gaussian filter is set to 3×3, and the standard deviation σ is preferably 0.5.
[0021] S102: Analyze the Gabor amplitude and phase characteristics to calculate the final defect level of any pixel.
[0022] This step aims to assign a quantitative index to each pixel that accurately reflects its probability of being a crack defect by performing multi-scale, multi-directional feature analysis on the image. Specifically, this process is broken down into two sub-steps: the first sub-step involves analyzing the multi-scale, multi-directional Gabor amplitude features to obtain the preliminary energy response level of any pixel; the second sub-step involves fusing Gabor phase features to obtain the final defect level of any pixel.
[0023] The first sub-step involves constructing a Gabor filter bank to comprehensively capture all possible linear texture features in the inner wall image. Cracks in the inner wall of cable ducts can point in any direction and vary in width; therefore, the filter bank needs to cover multiple directions and multiple scales, i.e., frequencies. Specifically, a filter bank containing M×N Gabor filters is constructed. Here, M is the number of directions, and N is the number of scales. In this embodiment, M is exemplarily set to 6, corresponding to directions of 0°, 30°, 60°, 90°, 120°, and 150°, to cover the main directions within 180°. N is set to 4, with corresponding center frequencies preset to 0.1, 0.2, 0.3, and 0.4 cycles / pixel, respectively. These frequencies can effectively respond to cracks of different widths.
[0024] The preprocessed grayscale image is then compared with any filter from the Gabor filter bank. Perform a convolution operation. The result of the convolution is a complex number. ;in, The response is real (even-symmetric). The response is an imaginary (odd-symmetric) response. The imaginary unit, Based on the above logic, calculate the initial energy response level of any pixel: In the formula, Indicates the first The initial energy response level of each pixel. Represents pixels In the The direction, the first The real part of the Gabor amplitude at each scale Represents pixels In the The direction, the first The imaginary part of the Gabor amplitude at each scale. and These represent the total number of directions and the total number of scales, respectively. This is the function that maximizes the value. As can be seen from the formula, The higher the value, the better the number of... The stronger the texture energy of a pixel in a specific direction and scale, the better. However, based solely on... It is impossible to distinguish whether the energy originates from the actual crack edge or from the equally directional background texture.
[0025] The second sub-step involves analyzing the preceding steps to obtain the preliminary energy response level of any pixel. However, this value is based on Gabor amplitude feature analysis, which means it still cannot distinguish between background texture regions and potential crack / defect regions. To address this issue, this step analyzes the multi-scale Gabor phase alignment of any pixel and combines this with the preliminary energy response level to determine the final defect level of that pixel. According to phase consistency theory, the Fourier components of a real physical edge, i.e., the edge of a potential crack / defect region, tend to have consistent phases across multiple scales, i.e., high alignment. In contrast, the phase of an unstructured background texture, such as water stains or casting marks, is random and chaotic across different scales. Therefore, in this specific analysis, the more consistent the phase of a pixel across all scales in one direction, the greater the likelihood that it belongs to the edge of a potential crack / defect region and the smaller the likelihood that it belongs to the edge of a background texture region, resulting in a higher final defect level for that pixel. Meanwhile, since cracks generally exhibit linear characteristics, we can further analyze whether a pixel possesses phase consistency in multiple directions. This allows for a more precise determination of whether a pixel belongs to a potential crack defect. Therefore, the purer the phase performance of a pixel across all scales in multiple directions—meaning it possesses strong phase consistency only in one principal direction—the greater the likelihood that it belongs to the edge of a potential crack defect region, and the greater the final defect degree of any pixel corresponding to it. This step introduces phase consistency theory, which states that for real physical edges, their Fourier components exhibit highly aligned phases across multiple scales; while for unstructured background textures, their phases exhibit a random and disordered state across different scales. This step aims to quantify this phase alignment degree and combine it with the energy response.
[0026] First, in the steps above, the pixels have already been obtained. exist One direction, Real part at each scale and the virtual part For each direction m, calculate its cumulative response information across all N scales. Specifically, calculate the response information at all N scales in the direction m. Total energy on Calculate in direction The total amount of real parts above: And the total imaginary part: .
[0027] Subsequently, based on the above accumulated information, the first... Phase consistency of individual pixels and the The final defect level of each pixel .
[0028] Phase consistency The construction is based on the principle of taking the maximum phase alignment degree of the pixel across all directions. The calculation formula is: In the formula, Indicates the first Phase consistency of each pixel Represents pixels In direction Total energy on Represents pixels In direction The total amount of the above, Represents pixels In direction The total imaginary part of the above. Indicates that the i-th pixel is in The magnitude of the vector sum of the complex responses at each scale. It is a very small positive number, such as This is used to prevent the denominator from being zero.
[0029] It is understandable that when pixels When the phase is highly consistent across N scales in direction m, the complex response vector will point in the same direction, and the magnitude of the vector sum will be... It will approach scalar and This causes the ratio to approach 1. Conversely, if the phase is random, the vector sum will cancel each other out, resulting in a ratio much smaller than the scalar sum, and the ratio will approach 0. Therefore, The value range is [0,1]. The larger the value, the more likely the pixel is to belong to a structural edge in a certain main direction.
[0030] Final Defect Level The basis for this construction is that the probability of a pixel belonging to a real crack depends not only on its initial energy response intensity and phase consistency, but also on the directional purity of its phase features. Directional purity refers to whether the phase consistency is significantly concentrated in a single principal direction, which conforms to the linear geometry of a crack. Its calculation formula is as follows: In the formula, This indicates the final defect level of the i-th pixel. Indicates the first Phase consistency of each pixel Indicates the first The initial energy response level of each pixel This represents the second largest value of the phase consistency factor calculated for the i-th pixel in all directions. Represents the normalization function. It is a very small positive number, such as This is used to prevent the denominator from being zero.
[0031] The formula shows the final defect level. It is the product of three parts. The increase in size means that the pixel energy is more significant, which will improve... . The increase in size means that the pixel structure is stronger, which will also increase the degree of final defects. The key lies in the third item. It represents phase purity. When Much larger When this occurs, it indicates that the phase coherence is highly concentrated in one principal direction, and the ratio... Approaching 0 makes the term approach 1, thus determining the final defect level. Achieve a larger value. Conversely, if and If the pixel is close to zero, it means that the pixel exhibits a certain structure in multiple directions, such as cross-texture. This value will then approach zero, thus suppressing the final defect level. The value of . This mechanism enables this method to effectively distinguish between linear cracks in one direction and complex background textures in multiple directions.
[0032] S103: Inspect the inner wall of cable ducts based on the optimized final defect level.
[0033] After calculating the final defect level of any pixel in the image, the precise extraction of potential cracks in the inner wall of the cable duct can be achieved through the following operations: Binarization: Set a global defect threshold. Based on empirical data, the preferred range for the global defect threshold is 0.6-0.8. In this embodiment, the global defect threshold is 0.7. Traverse any pixel in the image. If its final defect level is greater than the global defect threshold, the pixel is identified as a defect point, and its binarization value is 1; otherwise, it is identified as a background point, and its value is 0. This yields a binarized defect image. Morphological post-processing: Since real cracks have physical continuity, and during the detection process, small breaks may occur on the crack path due to noise and other factors. To solve this problem, a morphological closing operation is applied to the binarized defect image. The closing operation can effectively connect adjacent defect breaks, making the crack lines more complete. Connected component analysis: Perform connected component analysis on the morphologically processed defect image to identify all independent white regions (i.e., candidate defects). Calculate the length of each connected component and remove isolated lines that are too short. As a preferred approach, connected components with a length of less than 10 pixels are considered noise and discarded. The remaining connected components are the final identified cracks in the inner wall of the cable duct.
[0034] The present invention also provides a cable duct inner wall inspection system for cable installation. The system includes a processor and a memory, the memory storing computer program instructions. When the processor executes the computer program instructions, it implements the cable duct inner wall inspection method for cable installation according to the first aspect of the present invention.
[0035] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and therefore will not be described in detail here.
[0036] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this invention can be implemented using computer-readable / executable instructions stored or otherwise maintained on such a computer-readable medium.
[0037] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A method for inspecting the inner wall of a cable duct used for cable installation, characterized in that, include: Obtain a grayscale image of the inner wall of the cable duct; The grayscale image is subjected to multi-scale and multi-directional Gabor filtering to obtain the complex response of each pixel at each scale and in each direction. The preliminary energy response level of each pixel is calculated based on the amplitude of the complex response. For any pixel, the complex response at all scales is vector summed in any direction to obtain the corresponding vector sum magnitude. The magnitude of the complex response at all scales is scalar summed in any direction to obtain the corresponding scalar sum magnitude. The ratio of the vector sum magnitude to the scalar sum magnitude is used as the phase consistency factor in the corresponding direction. The largest phase consistency factor in all directions is taken as the phase consistency degree of each pixel. The ratio of the second largest to the largest value of the phase consistency factor of any pixel in all directions is calculated to obtain the directional purity of any pixel. The product of the preliminary energy response degree, the phase consistency degree, and the directional purity is taken as the final defect degree of each pixel. Crack defects are detected on the inner wall of the cable duct based on the final defect degree.
2. The method for inspecting the inner wall of cable ducts for cable installation according to claim 1, characterized in that, Obtaining a grayscale image of the inner wall of the cable duct includes: The video stream inside the cable duct is acquired, the video stream is decoded into multiple frames, and the multiple frames are converted to grayscale to obtain the grayscale image.
3. The method for inspecting the inner wall of cable ducts for cable installation according to claim 1, characterized in that, The preliminary energy response level of any pixel is calculated, including: The maximum value of the complex response amplitude of any pixel at all scales and in all directions is taken as the preliminary energy response level.
4. The method for inspecting the inner wall of cable ducts for cable installation according to claim 1, characterized in that, Obtaining the directional purity of any given pixel includes: The ratio of the second largest to the largest value of the phase consistency factor of any pixel in all directions to 1 is used as the directional purity.
5. The method for inspecting the inner wall of a cable duct for cable installation according to claim 1, characterized in that, Based on the final defect level, crack defect detection is performed on the inner wall of the cable duct, including: The final defect level is binarized to obtain a binary image; Connectivity analysis is performed on the binary image to extract connected regions as candidate crack defects. Candidate crack defects with a length less than a preset length threshold are removed to obtain the final crack defect detection result.
6. The method for inspecting the inner wall of a cable duct for cable installation according to claim 5, characterized in that, Before performing connected component analysis on the binary image, the method further includes performing a morphological closing operation on the binary image.
7. The method for inspecting the inner wall of cable ducts for cable installation according to claim 1, characterized in that, Performing multi-scale, multi-directional Gabor filtering on the grayscale image includes: Construct a filter bank containing multiple Gabor filters, wherein the number of directions of the multiple Gabor filters is 4 to 8 and the number of scales is 3 to 6.
8. The method for inspecting the inner wall of a cable duct for cable installation according to claim 1, characterized in that, The final defect level is binarized, including: A global defect threshold is set, and pixels whose final defect level is greater than the global defect threshold are identified as defect points. The global defect threshold ranges from 0.6 to 0.
8.
9. The method for inspecting the inner wall of a cable duct for cable installation according to claim 1, characterized in that, The method further includes: applying a Gaussian low-pass filter to the grayscale image for smoothing filtering.
10. A cable duct inner wall inspection system for cable installation, comprising a processor and a memory, characterized in that, The memory stores a computer program, and the processor executes the computer program to implement the cable duct inner wall inspection method for cable installation as described in any one of claims 1-9.
Citation Information
Patent Citations
Large shaft forging blank center forging method and system based on machine vision
CN121213668A
Screw fastening quality evaluation method and system based on image features
CN121366164A
Ghost artifact detection and removal in HDR image processing using multi-scale normalized cross-correlation
US20150002704A1