Defect detection method for insulating cylinder
By simultaneously acquiring two-dimensional texture images and three-dimensional point cloud data, generating a depth deviation map and performing adaptive block division, and using a lightweight Transformer model to achieve defect detection of insulating cylinders, the problem of inaccurate acquisition of three-dimensional parameters and misjudgment in traditional methods is solved, and efficient and accurate defect detection is achieved.
Patent Information
- Application Number
- CN202511579498.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-02-03
AI Technical Summary
Existing insulation cylinder defect detection technologies cannot accurately acquire three-dimensional geometric features, resulting in inaccurate crack depth assessment and difficulty in distinguishing between real defects and dynamic pseudo-defects. Furthermore, high-precision detection algorithms have high computational complexity and are difficult to process in real time, while lightweight algorithms may miss small defects.
By simultaneously acquiring two-dimensional texture images and three-dimensional point cloud data of the insulating cylinder, a depth deviation map is generated. Combined with dynamic pseudo-defect suppression and adaptive block segmentation, and using an attention-enhanced lightweight Transformer model for feature fusion, accurate distinction between real defects and pseudo-defects and quantization of three-dimensional parameters are achieved.
It enables rapid and accurate detection of insulation cylinder defects on embedded devices, can acquire three-dimensional parameters online, reduces the false judgment rate, balances detection accuracy and real-time performance, and meets the inspection needs of the production line.
Smart Images

Figure CN121458656A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power equipment detection, in particular to a defect detection method of an insulating cylinder. BACKGROUND
[0002] The existing insulating cylinder defect detection technology is facing severe challenges in key fields such as power equipment manufacturing and aerospace. The traditional method mainly relies on two-dimensional image analysis, which can only identify surface texture abnormalities and cannot obtain the three-dimensional geometric features of defects. This limitation leads to two serious consequences: on the one hand, it is impossible to accurately assess key parameters such as crack depth, which significantly affects the insulation performance when the crack depth exceeds 0.5mm in actual applications; on the other hand, it is difficult to distinguish between real defects and dynamic pseudo-defects generated during the production process, such as surface deformation caused by transmission vibration. These interference factors are similar to real defects in two-dimensional images, causing the detection system to have a high misjudgment rate.
[0003] At the same time, the existing technology system has the contradiction between detection accuracy and real-time performance. High-precision detection usually requires complex deep learning models, but these models require high computing resources and are difficult to implement real-time processing on production line embedded devices. While using lightweight algorithms will lead to missed detection of small defects, which cannot meet the strict requirements of industrial sites for comprehensive detection. Power equipment manufacturers urgently need a solution that can complete the comprehensive detection of a single insulating cylinder within 2 seconds, ensuring both detection speed and accurate identification of defect types and quantification of three-dimensional parameters to provide reliable basis for product quality assessment.
[0004] In view of the above problems, the existing technology needs to be improved. SUMMARY
[0005] (I) Technical problems to be solved To solve the above problems, the present application proposes a defect detection method of an insulating cylinder, which has the advantages of improving detection accuracy and real-time performance, accurately distinguishing between real defects and dynamic pseudo-defects, and quantifying three-dimensional parameters of defects.
[0006] (II) Technical solutions The application provides a kind of insulating cylinder defect detection method, technical scheme as follows: the two-dimensional texture image and three-dimensional point cloud data of insulating cylinder are synchronously collected;Image preprocessing is carried out on the two-dimensional texture image, and point cloud preprocessing is carried out on the three-dimensional point cloud data, and depth deviation map is generated, wherein the depth deviation map represents the deviation of the insulating cylinder surface point from the standard surface;Based on the spatial continuity feature of the depth deviation map, dynamic false defect suppression is carried out, and the discrete deviation area is filtered;Based on the two-dimensional texture image and the depth deviation map, adaptive blocking is carried out, and a plurality of sub-blocks are obtained, wherein the blocking size is dynamically adjusted based on the composite index of two-dimensional edge density and three-dimensional depth deviation gradient;For each sub-block, two-dimensional texture features and three-dimensional depth features are extracted to form a fusion feature vector;The fusion feature vector is input into the attention-enhanced lightweight Transformer model, and the three-dimensional parameters of the defect type and the defect are output, wherein the model uses spatial attention and depth attention to work cooperatively, and the depth attention constrains the spatial attention based on three-dimensional depth information;Based on the output defect type and three-dimensional parameters, defect decision is made to judge whether the insulating cylinder is qualified.
[0007] Further, the application also provides that the two-dimensional texture image and three-dimensional point cloud data of the insulating cylinder are synchronously collected, including: using a high-frame-rate industrial camera to collect the two-dimensional texture image, and using a laser triangulation module to collect the three-dimensional point cloud data;The two-dimensional texture image and the three-dimensional point cloud data are synchronized by timestamp alignment algorithm to form a multi-modal data pair, wherein the synchronization error is controlled within a preset threshold.
[0008] Further, the application also provides that the image preprocessing of the two-dimensional texture image includes: using anisotropic diffusion filtering to suppress noise, and using CLAHE algorithm to enhance the contrast of subtle defects.
[0009] Further, the application also provides that the point cloud preprocessing of the three-dimensional point cloud data includes: using straight-through filtering to remove environmental noise points, and using RANSAC algorithm to fit the standard cylindrical surface of the insulating cylinder, calculating the depth deviation value of the actual point cloud from the standard surface, and generating the depth deviation map.
[0010] Further, the application also provides that the dynamic false defect suppression based on the spatial continuity feature of the depth deviation map includes: identifying the area with continuous depth deviation distribution as a real defect, and filtering the area with discrete and isolated depth deviation as a false defect.
[0011] Further, the application also provides that adaptive blocking includes: calculating the two-dimensional edge density and three-dimensional depth deviation gradient of each initial sub-block;The composite threshold is calculated based on the linear combination of two-dimensional edge density and three-dimensional depth deviation gradient;According to the comparison of composite threshold and preset threshold, the sub-block size is dynamically adjusted: when the composite threshold is greater than or equal to the preset threshold, small-size sub-block is adopted;When the composite threshold is less than the preset threshold, large-size sub-block is adopted.
[0012] Further, the application also proposes that the linear combination is wherein and is a weight coefficient, is a two-dimensional edge density, is a three-dimensional depth deviation gradient.
[0013] Further, the application also proposes that, for each sub-block, the two-dimensional texture feature extraction includes a multi-scale LBP entropy value, and the three-dimensional depth feature extraction includes a depth deviation mean value, a depth gradient peak value and a defect volume ratio.
[0014] Further, the application also proposes that the attention-enhanced lightweight Transformer model adopts a depth separable convolution and a hierarchical attention architecture, and the spatial attention and the depth attention dynamically allocate weights: in the defect area, the depth attention weight is improved; in the pseudo-defect area, the depth attention weight is reduced.
[0015] Further, the application also proposes that the three-dimensional parameters of the output defect include, for a crack type defect, fitting a three-dimensional point cloud of a defect area by a least square method to obtain a maximum depth, a length and a width.
[0016] (Three) beneficial effects Compared with the prior art, the beneficial effects of the application are: The application synchronously collects two-dimensional texture images and three-dimensional point cloud data, constructs a depth deviation map, combines dynamic pseudo-defect suppression and adaptive blocking technology, uses an attention-enhanced lightweight Transformer model to realize multi-modal feature fusion, solves the problems that traditional methods cannot quantify three-dimensional parameters and misjudge pseudo-defects, and has the advantages of improving detection accuracy and real-time performance, accurately distinguishing real defects from dynamic pseudo-defects, and quantifying three-dimensional parameters of defects. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only constitute some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0018] Figure 1 It is a schematic diagram of the logic structure of the insulating cylinder defect detection method. DETAILED DESCRIPTION
[0019] The technical solutions in the present application will be clearly and completely described below with reference to the drawings in the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. The components of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work belong to the scope of protection of the present application. It should be noted that: similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. Meanwhile, in the description of the present application, the terms "first", "second", etc. are only used for differentiation, and cannot be understood as indicating or implying relative importance.
[0020] In the prior art, insulation cylinder defect detection mainly relies on two-dimensional image analysis, which cannot obtain three-dimensional parameters such as crack depth and defect volume, resulting in a lack of data support for equipment life evaluation. When the production line is detected online, the surface undulations caused by vibration or deformation are easy to be misjudged as real defects, resulting in a high false detection rate. The traditional high-precision detection algorithm has high computational complexity, and it is difficult to realize real-time detection in embedded devices, while the lightweight algorithm has the problem of missing small defects, which restricts the balance between detection efficiency and accuracy.
[0021] In order to solve the above problems, the inventors found that three-dimensional depth information and two-dimensional texture features have complementarity, and the spatial continuity of the depth deviation map can be used as a key basis for distinguishing real defects from false defects. By establishing a composite block strategy of two-dimensional edge density and three-dimensional depth deviation gradient, the detail features can be preserved in complex areas and the calculation redundancy can be reduced in flat areas. It is further found that the spatial attention in the attention mechanism is easily disturbed by false defects, and depth information needs to be introduced as a physical constraint to form a bidirectional collaborative mechanism. Based on this, a technical framework is proposed, which integrates multi-modal data acquisition, dynamic false defect suppression, adaptive blocking and lightweight model collaboration.
[0022] Embodiment 1
[0023] Therefore, as Figure 1 shown, the present application proposes a defect detection method for an insulation cylinder, specifically including the following steps: S100, synchronously collecting a two-dimensional texture image and three-dimensional point cloud data of the insulation cylinder; S200, performing image preprocessing on the two-dimensional texture image and performing point cloud preprocessing on the three-dimensional point cloud data to generate a depth deviation map; S300, performing dynamic false defect suppression based on the spatial continuity feature of the depth deviation map; S400, adaptive blocking based on the two-dimensional texture image and the depth deviation map; S500, extracting two-dimensional texture features and three-dimensional depth features for each sub-block to form a fusion feature vector; S600, inputting the fusion feature vector into an attention-enhanced lightweight Transformer model to output a defect type and three-dimensional parameters; S700, making a defect decision based on the output result.
[0024] Synchronization acquisition refers to time synchronization of two-dimensional images and three-dimensional point cloud data through a timestamp alignment algorithm. Specifically, a high-frame-rate industrial camera and a laser triangulation module can be used for parallel acquisition to ensure spatial consistency of multi-modal data.
[0025] The depth deviation map refers to a visualization map of surface point depth deviation calculated by fitting a standard surface. Specifically, after removing noise points using a straight-through filter, a RANSAC algorithm is used to fit a standard cylindrical surface to quantify the degree of surface deformation.
[0026] Dynamic pseudo-defect suppression refers to filtering discrete interference regions based on the continuity of depth deviation distribution. Specifically, by identifying continuous depth change regions as real defects, the influence of isolated deviation points on the detection result can be eliminated. Adaptive blocking refers to dynamically adjusting the detection region granularity based on texture complexity and depth variation degree. Specifically, a composite threshold can be calculated based on the linear combination of edge density and depth deviation gradient to control the sub-block segmentation size.
[0027] The fusion feature vector refers to a multi-dimensional data representation integrating two-dimensional texture features and three-dimensional depth features. Specifically, multi-scale LBP entropy values can be extracted to represent texture complexity, and depth deviation mean and gradient peak values can be combined to reflect deformation degree. The attention-enhanced lightweight Transformer model refers to a lightweight network using depth separable convolution and hierarchical attention architecture. Specifically, spatial attention can be used to focus on defect regions, and depth attention can be used to strengthen three-dimensional feature constraints to balance detection accuracy and efficiency.
[0028] Specifically, by synchronously acquiring two-dimensional images and three-dimensional point clouds, the spatial correspondence between surface texture and deformation is established. In the preprocessing stage, a depth deviation map is generated to quantify the deviation degree of surface points from the standard surface. Using the spatial continuity feature of depth deviation, discrete distributed vibration interference regions are filtered, and real defects with continuous depth variation are retained.
[0029] The adaptive block strategy dynamically adjusts the sub-block size according to the two-dimensional edge density and three-dimensional depth gradient, and small-size blocks are used in complex texture areas to capture details, and large-size blocks are combined in flat areas to reduce the calculation amount. In the feature extraction stage, two-dimensional texture entropy and three-dimensional depth parameters are fused to construct a multi-dimensional feature vector. The attention-enhanced lightweight model constrains the spatial attention weight distribution through depth information, strengthens three-dimensional feature learning in real defect areas, and suppresses false defect interference. Finally, the insulating cylinder is judged for eligibility based on the defect type and three-dimensional parameters.
[0030] The existing method only uses single modal data, resulting in the lack of three-dimensional parameters. The present application realizes the quantitative measurement of crack depth and volume through multi-modal data fusion. Traditional detection algorithms cannot distinguish between vibration interference and real defects. The present application effectively suppresses dynamic false defects by using the spatial continuity feature of depth deviation. The existing deep learning model cannot balance accuracy and efficiency. The present application realizes real-time high-precision detection on embedded devices through adaptive block and lightweight network architecture.
[0031] The present application can obtain the three-dimensional parameters of the insulating cylinder defects online, accurately distinguish real defects from false defects caused by production vibration, and realize fast detection under limited computing power. This method solves the technical bottleneck of two-dimensional detection that cannot quantify crack depth, overcomes the false detection problem caused by dynamic interference, balances the detection accuracy and real-time requirements, and meets the engineering application requirements of online detection on the production line.
[0032] The present application further proposes a method for synchronously collecting two-dimensional texture images and three-dimensional point cloud data of the insulating cylinder, including using a high-frame-rate industrial camera to collect two-dimensional texture images, and using a laser triangulation module to collect three-dimensional point cloud data, and synchronously forming a multi-modal data pair by time stamp alignment algorithm, wherein the synchronization error is controlled within a preset threshold.
[0033] The high-frame-rate industrial camera refers to an image sensor with high acquisition rate, which can be implemented by using an industrial camera with a frame rate not less than 30 fps, for example, with a resolution of 1920x1080, to ensure that the two-dimensional texture images captured in a dynamic transmission scene have no motion blur and can clearly present small cracks.
[0034] The laser triangulation module refers to a three-dimensional scanning device based on the principle of laser triangulation, which can be implemented by using a laser sensor with a sampling rate not less than 500 Hz, for example, with a measurement accuracy of ±0.01 mm, to obtain high-precision three-dimensional coordinate data in a high-speed motion scene.
[0035] The timestamp alignment algorithm refers to a data matching method based on hardware clock synchronization. Specifically, the IEEE 1588 precision time protocol can be used to achieve clock synchronization between sensors, and an interpolation algorithm can be used to compensate for the timing differences of devices with different sampling rates, so that the time error of two-dimensional image and three-dimensional point cloud collection is controlled within the millisecond level.
[0036] Specifically, during the dynamic transmission of the insulating cylinder, the high-frame-rate industrial camera continuously captures surface texture images at fixed intervals, while the laser triangulation module collects three-dimensional point cloud data at a higher frequency. Due to the difference in sampling rate between the two sensors, the timestamp alignment algorithm first performs downsampling on the high-frequency point cloud data of the laser module to align the time sequence with the image acquisition time of the camera.
[0037] Further, by comparing the hardware clock deviation of the two devices, the collection time is fine-tuned and compensated to eliminate timing disturbances caused by mechanical vibration. The multi-modal data pair formed in this way realizes spatial matching between each two-dimensional image pixel and the corresponding three-dimensional point cloud coordinates, providing an accurate alignment data basis for subsequent fusion analysis.
[0038] The traditional method uses a low-frame-rate camera combined with a low-sampling-rate laser module, which is prone to data misalignment during dynamic detection, and the synchronization algorithm does not consider vibration interference in industrial scenarios. This scheme solves the problem of multi-modal data space-time misalignment in dynamic scenes by combining a high-frame-rate camera with a high-sampling-rate laser module and using an anti-interference timestamp alignment algorithm, avoiding the feature matching errors caused by data asynchronization in traditional methods.
[0039] The present application effectively eliminates the space-time misalignment of two-dimensional images and three-dimensional point clouds during dynamic acquisition, ensuring the accuracy of subsequent feature fusion analysis. Through the collaborative design of hardware performance and algorithm optimization, the problem of insufficient data synchronization accuracy in traditional methods in industrial dynamic scenes is solved, providing a reliable data basis for accurate detection of insulating cylinder surface defects.
[0040] The present application further proposes image preprocessing for two-dimensional texture images, including using anisotropic diffusion filtering to suppress noise and using a CLAHE algorithm to enhance the contrast of subtle defects.
[0041] Anisotropic diffusion filtering refers to an image processing method that selectively smooths noise based on image gradient direction. Specifically, it can be implemented by adjusting the diffusion coefficient to reduce the diffusion intensity in the edge area to preserve the defect profile and enhance the diffusion intensity in the flat area to eliminate noise. The CLAHE algorithm refers to a contrast-limited adaptive histogram equalization method. Specifically, it can be implemented by dividing the image into local blocks and independently performing histogram equalization. By limiting the contrast gain of each block, it avoids over-enhancing the surface texture.
[0042] Specifically, the anisotropic diffusion filtering eliminates ambient light noise and sensor noise while preserving the crack edge structure by analyzing the gradient distribution of the insulating cylinder surface image, avoiding the edge blurring problem caused by traditional filtering methods.
[0043] The CLAHE algorithm divides the image into multiple local regions, calculates the histogram in each region and performs equalization processing, and prevents surface textures such as mold indentation marks from being misenhanced as defects by limiting the contrast gain threshold. The cooperative processing of the two makes noise suppression and defect enhancement complementary, eliminating interference signals and strengthening real defect features, providing high-quality image input for subsequent edge detection and texture feature extraction.
[0044] The traditional method uses Gaussian filtering combined with global histogram equalization, which can easily blur the edges of small cracks when smoothing noise, and global enhancement can amplify the gray difference in unevenly illuminated areas. The present scheme uses the directional smoothing characteristics of anisotropic diffusion filtering to maintain the integrity of the defect geometric features during denoising; through the local adaptive enhancement mechanism of the CLAHE algorithm, only the contrast difference between the defect area and the background is improved, avoiding interference from non-defect textures.
[0045] The present application can effectively suppress noise interference in the insulating cylinder surface image, while enhancing the contrast difference between the fine defects and the background, avoiding false positives or missed real defects due to noise, and providing reliable two-dimensional texture feature input for subsequent defect detection processes.
[0046] The present application further proposes a point cloud preprocessing method for three-dimensional point cloud data, including using a pass-through filter to remove environmental noise points, and using a RANSAC algorithm to fit an insulating cylinder standard cylindrical surface, calculating the depth deviation value of the actual point cloud and the standard surface, and generating a depth deviation map.
[0047] The pass-through filter is a point cloud filtering method that quickly removes discrete noise points that deviate from the insulating cylinder body based on a preset axial threshold range. Specifically, it can be implemented by setting a length threshold range along the cylindrical axis direction and a radius threshold range along the radial direction. This method is designed for the cylindrical structure characteristics and can efficiently remove interference points such as dust and equipment reflections in the production line environment.
[0048] The RANSAC algorithm refers to a robust fitting method for selecting an inner point set and estimating optimal cylindrical surface parameters through iteration. Specifically, the method can be implemented by setting a cylindrical surface distance threshold and performing multiple rounds of iteration, which can still accurately establish an ideal geometric model of the insulating cylinder in the presence of residual noise. The depth deviation map refers to a quantitative representation of the radial distance between the three-dimensional point cloud and the standard cylindrical surface, which can be implemented by converting the spatial distance into a gray value using a linear correspondence. This method provides accurate three-dimensional geometric deviation data for subsequent processing steps.
[0049] Specifically, the straight-through filter defines the effective point cloud area through axial and radial double threshold ranges, quickly filters out abnormal points that deviate significantly from the actual size of the insulating cylinder, and retains the surface effective point cloud data. The RANSAC algorithm performs cylindrical surface fitting on the filtered point cloud data, selects the inner points by setting a distance threshold, and selects the cylindrical surface parameters with the most inner points after multiple iterations as the standard surface model.
[0050] Based on the standard surface, the deviation value of each actual point cloud along the radial direction is calculated and mapped to the pixel intensity of the two-dimensional image to form a depth deviation map. This preprocessing procedure ensures the accuracy of subsequent depth deviation calculation through structured noise filtering and high-precision surface modeling.
[0051] The traditional method uses statistical filtering or radius filtering for general denoising, without considering the cylindrical structure characteristics of the insulating cylinder, resulting in low denoising efficiency or accidental deletion of effective points. The surface fitting method mostly uses the least squares method for direct calculation, which is easily disturbed by noise points and results in large modeling errors. The present scheme uses axial and radial double threshold design of the straight-through filter to achieve fast and accurate denoising for cylindrical structures. The anti-noise iteration mechanism of the RANSAC algorithm can still accurately fit the standard surface while retaining residual noise, significantly improving the modeling accuracy.
[0052] The present application effectively eliminates the interference of environmental noise on three-dimensional point cloud data and accurately quantifies the three-dimensional geometric deviation between the surface of the insulating cylinder and the standard surface, providing high-reliability depth deviation data for subsequent dynamic pseudo-defect suppression and feature fusion, and solving the problem of inaccurate depth deviation calculation caused by noise interference and modeling errors in traditional methods.
[0053] The present application further proposes dynamic pseudo-defect suppression based on the spatial continuity feature of the depth deviation map, including identifying regions with continuous depth deviation distribution as real defects and filtering regions with discrete and isolated depth deviation as pseudo-defects.
[0054] The depth deviation map refers to an image generated by calculating the deviation of the actual point cloud from the standard surface. Specifically, it can be generated after removing environmental noise points and fitting a standard cylindrical surface using a straight-through filter, and is used to represent the deviation of each point on the surface of the insulating cylinder from the ideal surface.
[0055] The spatial continuity feature refers to the continuous distribution characteristics of the depth deviation in three-dimensional space, which can be quantitatively analyzed by calculating the connected domain area, morphological parameters and deviation value standard deviation, and is used to distinguish the physical damage of real defects from the isolated anomalies of dynamic interference.
[0056] The dynamic pseudo-defect suppression refers to filtering the interference signals in real time according to the spatial continuity discrimination result, which can be adaptively adjusted by setting the connected domain area threshold and the aspect ratio threshold, and is used to eliminate the influence of transient interference caused by vibration or deformation on the detection result.
[0057] Specifically, the deviation value of each suspected defect region in the depth deviation map needs to be compared with the preset threshold, and when the deviation value exceeds the threshold, it enters the spatial continuity discrimination process. The connected area and aspect ratio of the region are calculated by morphological analysis, and the distribution standard deviation of the deviation value in the region is also calculated.
[0058] For the region that meets the area threshold and the aspect ratio conforms to the morphological characteristics of real defects, combined with the continuous gradient characteristics of the deviation value, it is determined as a real defect; for the region that is insufficient in area or morphologically discrete, it is determined as a pseudo-defect caused by dynamic interference and is filtered. For example, when the connected area of a region reaches the preset pixel number and the aspect ratio conforms to the linear distribution characteristics, the corresponding three-dimensional space deviation is identified as a real crack, and the isolated distributed abnormal points are excluded.
[0059] The traditional method usually relies on two-dimensional image texture difference or single modal three-dimensional distance threshold to judge pseudo-defects, and cannot effectively distinguish the three-dimensional space distribution difference between surface fluctuation interference and real defects. The present scheme establishes a mechanism for distinguishing the nature of physical damage and dynamic interference by fusing the continuity feature of three-dimensional depth deviation, solving the technical bottleneck of high false judgment rate of traditional methods in complex working conditions.
[0060] The present application can effectively suppress the pseudo-defect false detection caused by dynamic interference on the production line, reduce the false judgment risk while maintaining the detection accuracy of micro-defects. Through the quantitative discrimination of three-dimensional spatial continuity feature, the false judgment problem caused by texture similarity in traditional two-dimensional image processing is avoided, and the extraction of three-dimensional parameters of real defects is not affected by interference signals.
[0061] The present application further proposes adaptive blocking, including: calculating the two-dimensional edge density and three-dimensional depth deviation gradient of each initial sub-block; calculating a composite threshold based on the linear combination of the two-dimensional edge density and the three-dimensional depth deviation gradient; dynamically adjusting the sub-block size according to the comparison of the composite threshold and the preset threshold: when the composite threshold is greater than or equal to the preset threshold, a small size sub-block is used; when the composite threshold is less than the preset threshold, a large size sub-block is used.
[0062] The two-dimensional edge density refers to the distribution density of two-dimensional image edge pixel points in a unit area, which can be realized by calculating the ratio of the number of edge points in the region to the total number of pixels after extracting the edge pixels by using the Canny edge detection algorithm, and is used to represent the complexity of the surface texture. The three-dimensional depth deviation gradient refers to the depth deviation change rate between adjacent points in the three-dimensional point cloud data, which can be realized by calculating the gradient amplitude mean value of adjacent pixels in the depth deviation graph, and is used to reflect the intensity of geometric deformation.
[0063] The composite threshold refers to a comprehensive evaluation index formed by linearly combining the two-dimensional edge density and the three-dimensional depth deviation gradient, which can be calculated by using the weighted summation method, for example, it can be , which is used to comprehensively evaluate the complexity of the region features. The dynamic adjustment of the sub-block size refers to selecting detection units of different sizes according to the comparison result of the composite threshold and the preset threshold, which can be realized by using the recursive segmentation or merging algorithm, for example, when the composite threshold is high, a 16×16 pixel sub-block is used, and when it is low, a 64×64 pixel sub-block is merged.
[0064] Specifically, in the process of detecting the surface of the insulating cylinder, the size of the initial sub-block can be, for example, 32×32 pixels. By calculating the two-dimensional edge density of each sub-block, the surface texture mutation area can be effectively identified; at the same time, the three-dimensional depth deviation gradient is calculated, which can capture the significant area of geometric deformation. After linear combination of the two according to the preset weight, the composite threshold is formed as a quantitative index of the region complexity.
[0065] When the index exceeds the preset threshold, it indicates that there is a high probability of defects or complex deformation features in the region, at which time the sub-block is split into smaller size units to improve the positioning accuracy of the micro-cracks; when the index is lower than the threshold, it indicates that the features of the region are relatively simple, at which time the adjacent sub-blocks are merged to reduce the calculation amount. This dynamic adjustment mechanism cooperatively analyzes the two-dimensional texture and the three-dimensional depth, and prioritizes detection accuracy in texture complex areas and actively reduces the calculation load in flat areas.
[0066] The traditional fixed block method divides the detection region with a uniform size, which causes waste of calculation resources in the region with complex texture but no actual defects, and leads to a decrease in detection accuracy in the region with significant three-dimensional deformation but blurred two-dimensional texture. The block strategy relying on only a single feature, such as adjusting the block only according to the edge density, cannot effectively distinguish between surface scratches and real cracks. The present scheme dynamically blocks through the composite threshold, which not only overcomes the calculation redundancy problem of fixed block, but also avoids the misjudgment risk of single modal block, and realizes the balance between detection accuracy and calculation efficiency.
[0067] The application can automatically identify high complexity areas and implement fine detection in insulating cylinder surface detection, while reducing the amount of calculation in low complexity areas, effectively solving the contradiction between the insufficient detection accuracy and the waste of computing resources caused by fixed block strategy. In the production line online detection scene, this scheme not only guarantees the detection rate of 0.1mm level micro-cracks, but also meets the real-time processing requirements of embedded devices, avoiding the problem of missed detection or delay caused by unreasonable blocking.
[0068] The application further proposes a method of adaptive blocking based on linear combination of two-dimensional edge density and three-dimensional depth deviation gradient, wherein the linear combination is , wherein and is a weight coefficient, is a two-dimensional edge density, is a three-dimensional depth deviation gradient.
[0069] Wherein, the two-dimensional edge density refers to the distribution density of edge pixels in the two-dimensional texture image per unit area, which can be realized by detecting the edge through Sobel operator and then counting the proportion of edge pixels. This parameter is used to represent the complexity of the surface texture. The three-dimensional depth deviation gradient refers to the depth deviation change rate between adjacent points in the three-dimensional point cloud data, which can be realized by calculating the gradient amplitude of the depth deviation graph in the spatial neighborhood. This parameter is used to quantify the severity of surface deformation. The weight coefficients α and β are used to adjust the contribution proportion of two-dimensional texture features and three-dimensional geometric features in the blocking decision. The specific implementation can be realized by calibrating the reference value through actual measurement data and supporting dynamic adjustment of working conditions. This design makes the blocking strategy adapt to the feature reliability changes of different detection scenes.
[0070] Specifically, in the adaptive blocking process, first, calculate the two-dimensional edge density and three-dimensional depth deviation gradient for each initial sub-block respectively. After normalizing the two parameters to the same dimension range, the composite threshold index is generated by substituting the linear combination formula.
[0071] After comparing the composite threshold value with the preset threshold value, the sub-block size is dynamically selected: when the composite threshold value is higher than the preset value, small size sub-blocks are used to capture subtle defect features; when the composite threshold value is lower than the preset value, large size sub-blocks are used to reduce calculation redundancy. The weight coefficients in the linear combination are set according to the special needs of the insulating cylinder detection scene, and the three-dimensional depth deviation gradient is given a higher weight to respond to key defects that affect the insulation performance first, while the two-dimensional edge density weight is retained to assist in identifying surface texture abnormalities.
[0072] The traditional method adopts single feature segmentation or equal weight fusion mode, and is easy to be disturbed by the environment under complex working conditions, resulting in inaccurate segmentation. The scheme introduces a heterogeneous feature fusion mechanism with adjustable weight, strengthens the anti-interference ability of three-dimensional geometric features in segmentation decision, and retains the auxiliary discrimination of two-dimensional texture features, solving the problem of insufficient segmentation accuracy caused by unbalanced feature contribution.
[0073] The application effectively improves the segmentation accuracy of the surface defect detection of the insulating cylinder, and can accurately distinguish between real defect areas and dynamic false defect areas under the condition of vibration interference or complex surface texture, providing a high-quality sub-block division basis for subsequent feature extraction and classification, and balancing the detection accuracy and calculation efficiency by dynamically adjusting the sub-block size.
[0074] The application further provides a defect detection method of an insulating cylinder. For each sub-block, the two-dimensional texture feature includes a multi-scale LBP entropy value, and the three-dimensional depth feature includes a depth deviation mean value, a depth gradient peak value, and a defect volume proportion.
[0075] The multi-scale LBP entropy value refers to the calculation of texture complexity through different sizes of local binary pattern windows. Specifically, 3x3, 5x5, and 7x7 pixel windows can be used to extract LBP histogram entropy values at different scales, which are used to distinguish real defects from surface interference. The depth deviation mean value refers to the average value of the depth deviation of all point clouds in the sub-block from the standard surface, which can be calculated by arithmetic mean, and is used to reflect the overall deviation degree of the sub-block. The depth gradient peak value refers to the maximum value of the first derivative of the depth deviation in the sub-block, which can be calculated by the Sobel operator, and is used to locate the geometric mutation of the defect edge. The defect volume proportion refers to the proportion of the point cloud volume in the sub-block that exceeds the standard surface deviation threshold, which can be calculated by the ratio of the point cloud density to the sub-block volume, and is used to quantify the spatial distribution range of the defect.
[0076] Specifically, when extracting the two-dimensional texture feature, the multi-scale LBP entropy value is used to analyze the complexity of the surface texture. Windows of different sizes capture local texture changes of small cracks, bubbles and scratches, and convert the texture complexity into numerical features through entropy calculation, thereby effectively distinguishing real defects from mold pressing marks and other interference.
[0077] When extracting the three-dimensional depth feature, the depth deviation mean value reflects the deviation of the sub-block as a whole from the standard surface, the depth gradient peak value identifies the steep region of the defect edge, and the defect volume proportion calculates the volume proportion of the abnormal region. These features jointly construct a fusion vector to provide multi-dimensional data for subsequent models, so that parameters such as crack depth and volume can be directly calculated through the correlation between features. For example, the continuous distribution region of the depth gradient peak value can be mapped to the crack length, and the product of the defect volume proportion and the depth deviation mean value can be used to estimate the total volume of the defect.
[0078] The conventional method only relies on a single two-dimensional texture feature or isolated three-dimensional depth value, and cannot establish a mapping relationship between the feature and the three-dimensional parameter. For example, the conventional LBP feature can only determine the existence of defects, and the single-point depth measurement cannot calculate the volume ratio. The scheme cooperatively designs the multi-scale LBP entropy value and three types of three-dimensional features, combines two-dimensional morphological analysis and three-dimensional quantitative indicators, so that the feature vector directly supports the accurate calculation of the crack depth, length and volume, and avoids the intervention of offline measurement equipment.
[0079] The application realizes online quantification of the three-dimensional parameters of the insulating cylinder defects, solves the problem that the traditional method cannot obtain crack depth and volume information. By fusing two-dimensional texture entropy and three-dimensional depth features, the three-dimensional geometric parameters of defects can be calculated in real time on an embedded device, providing key data support for equipment life evaluation, while meeting the dual needs of detection efficiency and accuracy of the production line.
[0080] The application further proposes an attention-enhanced lightweight Transformer model that adopts a depth separable convolution and a hierarchical attention architecture, dynamically allocating weights for spatial attention and depth attention: in the defect area, the depth attention weight is increased; in the pseudo-defect area, the depth attention weight is reduced.
[0081] The depth separable convolution refers to the composite operation of decomposing the standard convolution into the per-channel convolution and the 1x1 point convolution, which can be implemented by configuring a convolution kernel with a group number of 8, thereby adapting to the computing power limit of the embedded device by reducing the number of parameters. The hierarchical attention architecture refers to dividing the feature processing flow into a feature separation extraction layer and a dynamic weight fusion layer, which can be implemented by independently processing two-dimensional texture features and three-dimensional depth features in separate branches, thereby avoiding feature interference and establishing the basis for attention adjustment. The spatial attention refers to a mechanism for focusing on the edge continuity in the two-dimensional texture feature, which can be implemented by using multi-scale LBP entropy values as input features to capture the linear distribution characteristics of surface cracks.
[0082] The depth attention refers to a mechanism for identifying the continuous distribution of three-dimensional depth deviation, which can be implemented by using the mean value and gradient peak value of the depth deviation as input features to quantify the three-dimensional geometric distortion of the defect. The dynamic weight allocation refers to a mechanism for adjusting the proportion of the two types of attention according to the characteristics of the detection area, which can be implemented by using a threshold judgment method based on the connected domain area of the depth deviation map to strengthen the three-dimensional feature discrimination ability in the real defect area and suppress the interference signal in the pseudo-defect area.
[0083] Specifically, the depth separable convolution significantly reduces the model parameter quantity by splitting the standard convolution operation while maintaining the feature extraction capability, so that the model can be deployed on embedded devices with limited computing power. The hierarchical attention architecture separates the processing of two-dimensional texture and three-dimensional depth features, establishes independent branch extraction paths, and provides an interference-free feature basis for subsequent attention weight adjustment.
[0084] The dynamic weight distribution mechanism adjusts the proportion of spatial attention and depth attention in real time during model inference according to the depth bias map and pseudo-defect suppression results generated in the preprocessing stage: when the detection area is judged to be a real defect, the depth attention weight is increased to enhance the discrimination of three-dimensional geometric features; when the detection area is judged to be a pseudo-defect, the depth attention weight is reduced to reduce the influence of three-dimensional interference signals on model decision-making.
[0085] This three-dimensional information constraint-based attention coordination mechanism enables the model to maintain high sensitivity to real defects while effectively filtering dynamic pseudo-defects under a lightweight architecture.
[0086] Traditional lightweight models only achieve computational efficiency improvement by compressing network size, but do not consider the constraint of three-dimensional depth information on attention mechanism, resulting in high false detection rate under complex working conditions. Although existing three-dimensional defect detection methods introduce depth features, the fixed weight fusion method cannot dynamically adapt to feature differences in different regions, causing waste of computing resources and loss of accuracy. This scheme cooperatively designs depth separable convolution and hierarchical attention architecture, establishes a dynamic adjustment mechanism of three-dimensional features on attention weight while reducing model complexity, and realizes synchronous optimization of computational efficiency and anti-interference ability.
[0087] The present application solves the contradiction between high computational complexity and real-time requirements of traditional deep learning models running on embedded devices, while avoiding the problem of model misjudgment caused by pseudo-defect interference. The model adapts to low-power devices through lightweight architecture, and suppresses interference factors such as surface undulation through dynamic attention mechanism, significantly improving the accuracy of defect recognition while ensuring detection speed.
[0088] The present application further proposes that the three-dimensional parameters of the output defect include, for crack defects, fitting the three-dimensional point cloud of the defect area by least squares method to obtain the maximum depth, length and width.
[0089] Among them, the least squares fitting of the three-dimensional point cloud of the defect area means to establish a mathematical model based on the three-dimensional point cloud data of the crack area to eliminate noise interference. Specifically, a quadratic function model can be used to fit the depth distribution curve, and a joint contour fitting of two-dimensional texture edges and three-dimensional point cloud edges can be used to realize it, which is used to balance the continuity of discrete point cloud and real topography.
[0090] The maximum depth refers to the maximum deviation value of the crack area point cloud in the depth direction, which can be determined by fitting the peak value of the depth distribution curve, and is used to reflect the risk degree of the crack penetrating the insulating cylinder wall thickness.
[0091] The length refers to the extension distance of the crack in the two-dimensional plane, which can be calculated by joint projection of the contour fitting curve in the two-dimensional plane, and is used to evaluate the crack propagation range. The width refers to the transverse span of the crack perpendicular to the length direction, which can be calculated by mean fitting of the point cloud with a depth deviation exceeding a critical value, and is used to quantify the transverse size of the crack.
[0092] Specifically, the three-dimensional point cloud of the crack area forms a continuous deviation region after pseudo-defect suppression, and a quadratic function model is constructed with the crack length direction as the X axis to eliminate local point cloud anomalies and extract the peak value as the maximum depth.
[0093] At the same time, the two-dimensional texture edge and the three-dimensional point cloud edge generate a smooth curve through joint contour fitting, project to the two-dimensional plane to calculate the crack length, and the transverse span is screened by mean fitting of the point cloud with a depth deviation exceeding a critical value to determine the width. The two-step fitting process respectively targets the depth gradient characteristics and edge continuity characteristics of the crack, and realizes complete quantification of three-dimensional parameters.
[0094] The traditional method relies on offline CT scanning to obtain three-dimensional parameters, which cannot meet the real-time detection needs of the production line, while the present scheme reuses synchronous multi-modal data and depth deviation map to realize online quantification on an embedded device; the existing technology uses a single fitting method, resulting in incomplete parameters or insufficient precision, while the present scheme uses joint fitting of depth curve and edge contour to completely extract maximum depth, length and width, and accurately match the physical form of the crack.
[0095] The present application solves the technical problem that existing methods cannot quantize three-dimensional parameters of cracks online, realizes real-time and accurate measurement of the maximum depth, length and width of cracks in a production line environment, provides key data support for insulating cylinder qualification and life assessment, and avoids efficiency loss caused by offline detection.
[0096] The above only describes the embodiments of the present application and does not limit the protection scope of the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for defect detection of an insulating cylinder, comprising: synchronously acquiring a two-dimensional texture image and a three-dimensional point cloud data of the insulating cylinder; performing image preprocessing on the two-dimensional texture image and point cloud preprocessing on the three-dimensional point cloud data to generate a depth deviation map, wherein the depth deviation map represents the deviation of the insulating cylinder surface point from a standard surface; based on the spatial continuity feature of the depth deviation map, performing dynamic pseudo-defect suppression to filter discrete deviation areas; based on the two-dimensional texture image and the depth deviation map, performing adaptive blocking to obtain a plurality of sub-blocks, wherein the blocking size is dynamically adjusted based on a composite index of two-dimensional edge density and three-dimensional depth deviation gradient; for each sub-block, extracting two-dimensional texture features and three-dimensional depth features to form a fusion feature vector; inputting the fusion feature vector into an attention-enhanced lightweight Transformer model to output a defect type and a three-dimensional parameter of the defect, wherein the model uses spatial attention and depth attention to work together, and the depth attention constrains the spatial attention based on three-dimensional depth information; based on the output defect type and three-dimensional parameter, performing defect decision to determine whether the insulating cylinder is qualified.
2. The method of claim 1, wherein The synchronous acquisition of the two-dimensional texture image and the three-dimensional point cloud data of the insulating cylinder comprises: using a high-frame-rate industrial camera to acquire the two-dimensional texture image and using a laser triangulation module to acquire the three-dimensional point cloud data; synchronizing the two-dimensional texture image and the three-dimensional point cloud data through a timestamp alignment algorithm to form a multi-modal data pair, wherein the synchronization error is controlled within a preset threshold.
3. The method of claim 1, wherein The image preprocessing of the two-dimensional texture image comprises: using anisotropic diffusion filtering to suppress noise and using CLAHE algorithm to enhance the contrast of subtle defects.
4. The method of claim 1, wherein The point cloud preprocessing of the three-dimensional point cloud data comprises: using straight-through filtering to remove environmental noise points and using RANSAC algorithm to fit the standard cylindrical surface of the insulating cylinder to calculate the depth deviation value of the actual point cloud from the standard surface and generate the depth deviation map.
5. The method of claim 1, wherein The dynamic pseudo-defect suppression based on the spatial continuity feature of the depth deviation map comprises: identifying areas with continuous depth deviation distribution as real defects and filtering areas with discrete and isolated depth deviation as pseudo-defects.
6. The method of claim 1, wherein The adaptive blocking comprises: calculating the two-dimensional edge density and three-dimensional depth deviation gradient of each initial sub-block; calculating a composite threshold based on the linear combination of the two-dimensional edge density and the three-dimensional depth deviation gradient; dynamically adjusting the sub-block size according to the comparison of the composite threshold and the preset threshold: when the composite threshold is greater than or equal to the preset threshold, a small-size sub-block is adopted; when the composite threshold is less than the preset threshold, a large-size sub-block is adopted.
7. The method of claim 6, wherein The linear combination is wherein and are weight coefficients, is a two-dimensional edge density, is a three-dimensional depth bias gradient.
8. The method of claim 1, wherein For each sub-block, the extraction of two-dimensional texture features includes multi-scale LBP entropy value, and the extraction of three-dimensional depth features includes depth deviation mean value, depth gradient peak value and defect volume proportion.
9. The method of claim 1, wherein The attention-enhanced lightweight Transformer model adopts depth separable convolution and hierarchical attention architecture, and the spatial attention and depth attention dynamically allocate weights: in the defect area, the depth attention weight is increased; in the pseudo-defect area, the depth attention weight is reduced.
10. The method of claim 1, wherein The three-dimensional parameters of the output defects include, for crack-type defects, maximum depth, length, and width obtained by fitting a three-dimensional point cloud of a defect area by least squares.
Citation Information
Cited By
Metal pipeline anchor pattern degree detection method and system based on image analysis
CN121998980A