Rectangular tube defect detection method based on image processing

CN122966595APending Publication Date: 2026-10-23TIANJIN YIYOU SHANGJI TECHNOLOGY DEVELOPMENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611164385.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0006]为此,本发明提供基于图像处理的矩管缺陷检测方法,用以克服现有技术未针对光伏支架矩管棱边应力集中、裂纹易沿棱边贯通扩展的失效特征构建适配检测框架,难以预判裂纹后续演化贯通倾向,不能为矩管结构安全评估提供有效的预判分析的问题

Benefits of technology

[0017]本申请所示的技术方案带来的有益效果包括:通过在矩管的两个端面分别划定识别子域,将两识别子域以矩管棱边为分隔边界构建识别单元,根据各识别子域内裂纹轨迹的端点生成轨迹表征向量,计算轨迹表征向量的拟合度;针对拟合度大于或等于预设阈值的裂纹,确定其与棱边的第一预测贯通点;针对拟合度小于预设阈值的裂纹,确定其与棱边的第二预测贯通点;比对第一预测贯通点与第二预测贯通点的空间偏差,判定识别单元内的裂纹具有演化贯通倾向,并记录贯通预测点位;最后,通过统计全部识别单元内贯通预测点位的端面分布偏聚特性,输出矩管缺陷定位识别结果。进而,利用光伏支架矩管棱边应力集中、裂纹易沿棱边贯通扩展的失效特征,预判裂纹后续的演化贯通倾向,对矩管结构的缺陷进行有效分析。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122966595A_ABST
    Figure CN122966595A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image recognition, and more particularly to a method for detecting defects of a rectangular tube based on image processing, which constructs a recognition unit by taking the edge of the rectangular tube as a separating boundary for recognition sub-domains distributed on two end faces of the rectangular tube, generates a trajectory feature vector according to an end point of a crack trajectory in each recognition sub-domain, and calculates a fitting degree of the trajectory feature vector; for cracks with different comparison results of the fitting degree and a preset threshold, determines first and second predicted penetration points of the cracks with the edge; determines that the cracks in the recognition unit have an evolution penetration tendency according to a spatial deviation between the predicted intersection points, and records the penetration predicted points; finally, outputs a positioning recognition result of defects of the rectangular tube through an end face distribution aggregation characteristic of the penetration predicted points. Furthermore, the evolution penetration tendency of the cracks is predicted by using the failure characteristics of the photovoltaic support rectangular tube, such as stress concentration of the edge of the rectangular tube and easy penetration and expansion of the cracks along the edge, so that the defects of the rectangular tube structure are effectively evaluated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to a method for detecting defects in rectangular tubes based on image processing. Background Technology

[0002] As the core load-bearing component supporting photovoltaic modules and ensuring the overall structural stability of the power station, the structural integrity and mechanical reliability of photovoltaic support structures directly determine the operational safety and service life of the photovoltaic power station. Currently, photovoltaic support structures mostly use rectangular steel tube profiles, which are widely used in various photovoltaic power station scenarios, including ground-mounted centralized and distributed systems, due to their advantages of high strength, light weight, good assembly, and adaptability to complex outdoor installation scenarios. However, the rectangular tubes of photovoltaic support structures are exposed to complex outdoor conditions for extended periods, making them highly susceptible to micro-cracks on the tube ends, edges, and stress concentration areas. These cracks can continue to expand over time, gradually evolving into through cracks, leading to tube deformation, reduced load-bearing capacity, structural loosening, and even support collapse, seriously threatening the long-term stable operation of the photovoltaic power station and significantly increasing the power station's operation and maintenance costs and safety risks.

[0003] Currently, there are still significant technical shortcomings in the defect detection methods for photovoltaic bracket rectangular tubes. Traditional detection methods mostly rely on manual visual sampling, caliper measurement, or conventional ultrasonic or ordinary machine vision inspection methods. The adaptability and detection accuracy are difficult to meet the needs of large-scale quality inspection and in-service operation and maintenance of photovoltaic brackets.

[0004] For example, Chinese invention patent CN119338824A discloses a visual detection method for surface crack defects in metal pipes based on image processing. This method acquires images of the metal pipe surface, combines them with a region growing algorithm, and divides the surface into high-incidence and low-incidence areas based on crack distribution patterns. It then analyzes the temporal trend of high-incidence areas to assess crack propagation risk; evaluates crack saliency through image texture feature analysis; and determines the crack severity level by combining propagation risk and saliency. The method also analyzes the impact of the working environment of high-incidence areas on the structural integrity of the metal pipes. Finally, through a comprehensive analysis of the impact on crack propagation risk, saliency, and structural integrity, the detection sensitivity of the region growing algorithm is dynamically adjusted.

[0005] Existing technologies have not developed a suitable detection framework for the failure characteristics of photovoltaic support rectangular tubes, such as stress concentration at the edges and the tendency of cracks to propagate along the edges. This makes it difficult to predict the subsequent evolution and propagation tendency of cracks and cannot provide effective predictive analysis for the safety assessment of rectangular tube structures. Summary of the Invention

[0006] To address this, the present invention provides a rectangular tube defect detection method based on image processing, which overcomes the problem that existing technologies have not constructed an adapted detection framework for the failure characteristics of photovoltaic support rectangular tubes, such as stress concentration at the edges and easy crack propagation along the edges, making it difficult to predict the subsequent evolution and propagation tendency of cracks, and thus failing to provide effective predictive analysis for the safety assessment of rectangular tube structures.

[0007] To achieve the above objectives, the present invention provides a rectangular tube defect detection method based on image processing, comprising: A recognition sub-domain is defined on each of the two end faces of the rectangular tube. The two recognition sub-domains are constructed with the edges of the rectangular tube as the dividing boundary to form a recognition unit. The target to be detected in each recognition sub-domain is constrained to a single crack. The endpoints of the crack trajectory within each identification subdomain are extracted to generate a trajectory representation vector, and the fit between the magnitude of the trajectory representation vector and the actual length of the crack trajectory is calculated. Based on the fit degree, a graded intersection point prediction is performed, including determining the first predicted connection point between the crack and the edge based on the trajectory representation vector for cracks with a fit degree greater than or equal to a preset threshold; and determining the second predicted connection point between the crack and the edge based on the trajectory representation vector for cracks with a fit degree less than a preset threshold by statistically analyzing the angle intervals of the segmented trajectory vectors and synthesizing the target representation vector with the dominant vector cluster. Compare the spatial deviation between the first predicted penetration point and the second predicted penetration point. If the deviation meets the preset convergence condition, it is determined that the crack in the identification unit has the tendency to evolve and penetrate, and the penetration prediction point is recorded. The distribution and clustering characteristics of the end faces of the predicted points within all identification units are statistically analyzed, and the results of the rectangular tube defect location identification are output.

[0008] Furthermore, the process of extracting the endpoints of the crack trajectory within each identification subdomain includes: A grid with a single pixel width is used as the reference. The number of grids connected to the 8-neighborhood of a pixel is determined based on each grid. Pixels with 2 grid points that are connected to 8 neighbors are marked as trajectory endpoints, and the intersection of the crack trajectory and the boundary of the identification subdomain is marked as trajectory endpoints.

[0009] Furthermore, the process of generating trajectory representation vectors includes: The two trajectory endpoints that are furthest apart along the crack extension direction are selected as the start and end points of the vector to generate the trajectory representation vector.

[0010] Furthermore, the fitting degree is the ratio of the magnitude of the trajectory representation vector to the actual trajectory length of the crack.

[0011] Furthermore, the process of determining the first predicted connection point between the trajectory representation vector and the edge includes: The starting point is the endpoint of the trajectory representation vector; Draw a ray extension line along the trajectory characterization vector direction, and determine the intersection of the ray extension line and the edge as the first predicted connection point.

[0012] Furthermore, the process of synthesizing the target representation vector includes: The curvature change of pixels on the crack trajectory is calculated, and the crack trajectory is divided into several trajectory segments by using pixels whose curvature change rate exceeds the preset curvature change reference value as segmentation nodes. For each trajectory segment, determine the segmented trajectory vector and calculate the angle between the vectors of each segmented trajectory vector; The segmented trajectory vectors whose included angles fall into the same included angle interval are grouped into the same vector cluster, and the vector sum of each segmented trajectory vector in the vector cluster containing the most vectors is used as the target representation vector.

[0013] Furthermore, the process of determining the second predicted connection point between the target representation vector and the edge includes: Starting from the endpoint of the trajectory closest to the edge, extend the ray along the direction of the target representation vector; The intersection of the ray extension and the edge is determined as the second predicted penetration point.

[0014] Furthermore, the process of comparing the spatial deviation between the first predicted connection point and the second predicted connection point includes: Calculate the Euclidean distance between the first predicted breakthrough point and the second predicted breakthrough point; The Euclidean distance is compared with a preset distance threshold. If the Euclidean distance is less than or equal to the distance threshold, the spatial deviation is determined to meet the preset convergence condition.

[0015] Furthermore, the process of recording the predicted connection points includes: In response to the determination result that the crack in the identification unit has the tendency to evolve and penetrate, the coordinates of the first predicted penetration point and the second predicted penetration point are obtained; Based on the coordinates of the first predicted connection point and the second predicted connection point, the point determined by the average of the coordinate values ​​is recorded as the connection prediction point.

[0016] Furthermore, based on the end-face distribution clustering characteristics of the predicted points within all identification units, the process of outputting the rectangular tube defect location identification results includes: The edges are divided into different sections based on the midpoint of the rectangular tube's length. Calculate the proportion of predicted points in each segment. If the proportion of such points in any segment exceeds a preset threshold for the proportion of clustered points, then the segment is determined to be a clustered segment. The coordinates of the first and last points of the clustered section are output as the defect location and identification results.

[0017] The beneficial effects of the technical solution presented in this application include: defining identification sub-domains on both end faces of the rectangular tube, constructing identification units by separating the two identification sub-domains with the edges of the rectangular tube as the dividing boundary, generating trajectory representation vectors based on the endpoints of the crack trajectories in each identification sub-domain, and calculating the fitting degree of the trajectory representation vectors; for cracks with a fitting degree greater than or equal to a preset threshold, determining their first predicted penetration point with the edge; for cracks with a fitting degree less than the preset threshold, determining their second predicted penetration point with the edge; comparing the spatial deviation between the first and second predicted penetration points, determining that the cracks in the identification unit have a tendency to evolve and penetrate, and recording the predicted penetration points; finally, by statistically analyzing the end face distribution clustering characteristics of the predicted penetration points in all identification units, outputting the rectangular tube defect location identification result. Furthermore, by utilizing the failure characteristics of stress concentration at the edges of the photovoltaic support rectangular tube and the tendency of cracks to penetrate and propagate along the edges, the subsequent evolution and penetration tendency of cracks can be predicted, and the defects of the rectangular tube structure can be effectively analyzed.

[0018] In particular, this invention defines identification sub-domains on both ends of the rectangular tube and constructs identification units using the edges as dividing boundaries. By constraining the detection target in each identification sub-domain to a single crack, it can effectively decouple the cross-interference of multiple cracks that may exist simultaneously on both ends of the rectangular tube edge. At the same time, constructing identification units using the edges as natural dividing boundaries fully utilizes the geometric structural features of the rectangular tube edge as a stress concentration area and a high-incidence area for crack propagation, laying a data foundation for the accurate prediction of crack evolution and penetration tendency.

[0019] In particular, this invention selects the two trajectory endpoints that are furthest apart along the crack extension direction to generate trajectory representation vectors, and constructs a fitting degree based on the actual crack trajectory length, so as to realize the degree of linearity of the crack trajectory reflected by a single quantitative index.

[0020] In particular, this invention targets curved or polygonal cracks with fitting degrees below the threshold. By calculating the curvature change of the crack trajectory and adaptively segmenting it, the segmented trajectory vectors of each trajectory segment are statistically clustered according to the included angle interval. The vector of the dominant vector cluster is combined with the target representation vector to effectively identify the main trend direction of the curved crack during its extension process. Non-representative directional components caused by local micro-bending or image noise are eliminated, so that the target representation vector truly reflects the macroscopic evolution direction of the crack, significantly improving the prediction accuracy of the intersection of curved cracks and edges.

[0021] In particular, this invention statistically analyzes the distribution and clustering characteristics of the end faces of the predicted crack penetration points within all identification units. By dividing the edges into different sections based on the midpoint of the rectangular tube length and calculating the proportion of predicted crack penetration points in each region, it can identify the spatial clustering pattern of crack penetration tendency across the entire length of the rectangular tube from a macroscopic perspective, accurately pinpointing high-risk sections for crack evolution and penetration. This statistical strategy ensures that the final defect location and identification results not only include local penetration information of single cracks but also reveal the spatial distribution characteristics of crack penetration tendency in the overall rectangular tube structure, providing a global decision-making basis for targeted reinforcement and maintenance and fatigue life assessment of photovoltaic support rectangular tubes. Attached Figure Description

[0022] Figure 1 This is a flowchart illustrating the steps of the rectangular tube defect detection method based on image processing according to an embodiment of the present invention; Figure 2 This is a step diagram illustrating the process of extracting the endpoints of crack trajectories within each identification subdomain according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the grid connectivity of trajectory endpoints and trajectory connection nodes according to an embodiment of the present invention; Figure 4 This is a diagram illustrating the steps involved in synthesizing the target representation vector according to an embodiment of the present invention. Detailed Implementation

[0023] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0024] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0025] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in the embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0026] Those skilled in the art should understand that the rectangular tubes used in photovoltaic brackets bear multiple complex loads during service, including wind loads, snow loads, temperature stress, and alternating torque generated by the rotation of the bracket tracking system. The rectangular tubes have rectangular or square cross-sections, with their edges being the locations where the cross-sectional geometry abruptly changes. According to the principles of mechanics of materials, square tubes experience severe stress concentration at their corners during torsion, with a much higher degree of stress concentration than in planar areas.

[0027] Based on the above physical mechanism, this invention uses the edge of the rectangular tube as a natural dividing boundary, delineates two adjacent end faces as independent identification subdomains, and constructs identification units with the edge as the boundary. It follows the structural mechanical characteristics of the edge of the rectangular tube as a stress concentration area and a high-incidence area of ​​cracks, and includes the cracks on both ends of the edge in the same identification unit for correlation analysis, effectively capturing the physical trend of crack propagation along the edge, which is highly consistent with the actual failure mode of the rectangular tube.

[0028] Those skilled in the art will understand that, from a mechanical perspective, the physical premise for a crack to propagate along its edge is that a certain geometric relationship exists between the crack tip direction and the edge normal direction, and that the crack propagation direction is stable. When the crack trajectory is regular, direct propagation along the current direction is the path with the lowest energy release rate; in this case, the trajectory characterization vector direction is the most likely propagation direction. When the crack trajectory is curved, the propagation direction changes during the propagation process, and its subsequent propagation direction should be determined by the direction of the dominant trajectory segment. This corresponds to the reorientation of the crack's direction after being disturbed by the local stress field during propagation. When the intersection points given by both are spatially similar, it indicates that, whether from the overall crack trend or the segmental main trend, the crack propagation direction points to the same position on the edge. In this case, the probability of the crack propagating along the edge in this direction is significantly higher than in other directions, thus it can be determined that the crack has a tendency to evolve and propagate. This judgment logic is the same as the principle in mechanics that the crack propagation direction is dominated by the crack tip stress intensity factor and propagates along the path of minimum energy.

[0029] Please see Figure 1 The diagram illustrates the steps of the rectangular tube defect detection method based on image processing according to an embodiment of the present invention. The rectangular tube defect detection method based on image processing of the present invention includes: Step S100: Define recognition sub-domains on the two end faces of the rectangular tube respectively. The two recognition sub-domains are constructed with the edges of the rectangular tube as the dividing boundary to form recognition units. The detection target in each recognition sub-domain is constrained to a single crack. This invention does not specifically limit the crack identification process. Identifying crack trajectories or crack contours in images is a common technique in image processing. Crack contour recognition algorithms are well known to those skilled in the art and will not be elaborated here.

[0030] It is important to note that the detection logic of this invention does not require that every identification subdomain necessarily contains a crack. Instead, during the actual image acquisition and preprocessing stages, the images of both ends of the rectangular tube are first screened for cracks. This is achieved through binarization segmentation and morphological feature determination, directly eliminating identification subdomains that do not contain cracks or only contain non-crack defects, excluding them from subsequent endpoint extraction and trajectory representation vector calculations. Only subdomains confirmed to contain cracks through this initial screening are retained and subjected to hierarchical intersection prediction. Based on this, for the retained cracked subdomains, this invention uses pixel-level processing to ensure the complete presentation of the crack trajectory, making the topological identification of the endpoints accurate and reliable, thereby ensuring the effectiveness of subsequent fitting coefficient calculations and evolutionary continuity tendency determination. Furthermore, the size of each identification subdomain can be adapted and adjusted according to the camera resolution and the actual size of the rectangular tube end face during delineation. This ensures that even if the crack size is small or only extends to the subdomain boundary, its direction information can still be retained by incorporating the boundary intersection into the endpoint system, avoiding missed detections caused by crack truncation. If, after initial screening, a certain identification subdomain is found to be free of cracks, then that subdomain will not generate a breakthrough prediction point, nor will it affect the independent detection and analysis of other cracked subdomains. The final clustering characteristic statistics are based on valid samples that are determined to have an evolutionary breakthrough tendency from all cracked subdomains.

[0031] When multiple cracks exist within a subdomain, one of the following methods is used to implement single crack constraint: using crack length as a priority index, select the crack with the largest size within the subdomain as the detection target, and discard the remaining cracks.

[0032] This document provides an embodiment for defining a recognition subdomain. In this embodiment, using the edge of the rectangular tube end face as a reference boundary, a square region with a side length of W is defined as a recognition subdomain, extending inwards along a direction perpendicular to the edge. The value of the defined width W is determined based on the camera resolution and the actual size of the rectangular tube end face: W = α × L, where L is the length of the shorter side of the rectangular tube end face, and α is a scaling factor ranging from 0.25 to 0.5. Using the edge of the rectangular tube as a dividing boundary, recognition subdomains are defined on two adjacent end faces on both sides of the edge. Two recognition subdomains corresponding to the same edge together constitute a recognition unit, and each recognition unit contains two recognition subdomains. The end face region corresponding to the same edge can be divided into multiple continuous subdomains along the edge extension direction, with no overlap or gaps between the subdomains.

[0033] In practical rectangular tube crack recognition scenarios, the end face of the rectangular tube may present a complex situation of multiple interwoven or adjacent cracks during image acquisition. Without constraints on the detection target, the trajectory features of multiple cracks will interfere with each other during extraction and vectorization, causing the trajectory representation vector to fail to accurately reflect the propagation trend of a single crack. In fact, in the stress concentration area of ​​the rectangular tube's edge, the initiation and propagation of each crack are dominated by the local stress field; therefore, they should be processed as independent detection units to ensure the clear physical meaning of trajectory representation vector generation and intersection point prediction.

[0034] Step S200: Extract the endpoints of the crack trajectory in each identification subdomain to generate a trajectory representation vector, and calculate the fitting degree between the magnitude of the trajectory representation vector and the actual length of the crack trajectory. Step S300: Perform hierarchical intersection prediction based on the fitting degree, including determining the first predicted connection point between the crack and the edge based on the trajectory representation vector for cracks with a fitting degree greater than or equal to a preset threshold; and performing angle interval statistics on the segmented trajectory vectors for cracks with a fitting degree less than a preset threshold, synthesizing the target representation vector with the dominant vector cluster, and determining the second predicted connection point between the crack and the edge. In this invention, the preset threshold for the degree of fit can be set to 0.85.

[0035] Step S400: Compare the spatial deviation between the first predicted penetration point and the second predicted penetration point. If the deviation meets the preset convergence condition, it is determined that the crack in the identification unit has the tendency to evolve and penetrate, and the penetration prediction point is recorded. Step S500: Statistically analyze the end-face distribution clustering characteristics of the predicted points within all identification units, and output the rectangular tube defect location identification results.

[0036] Please see Figure 2 The diagram illustrates the steps for extracting the endpoints of crack trajectories within each identification subdomain according to an embodiment of the present invention. The process for extracting the endpoints of crack trajectories within each identification subdomain includes: Step S201: Use a grid with a single pixel width as a reference; Step S202: Determine the number of grids that are connected to the 8-neighborhood of a pixel, using each grid as a reference. Step S203: Mark the pixels with 2 grids connected in 8 neighborhoods as trajectory endpoints, and mark the intersection of the crack trajectory and the boundary of the identified subdomain as trajectory endpoints.

[0037] In the field of image recognition, cracks are identified by contour recognition algorithms. For any pixel on the path, the number of pixels belonging to the crack among its eight neighboring positions has a clear topological significance: a pixel with a connectivity of 1 means that the pixel is located at the end of the crack path, i.e., the endpoint of the crack. In a branchless connected path, the number of connected grids at the endpoint of the trajectory is exactly 2, while the number of connected grids in the 8-neighborhood of the trajectory connecting nodes is greater than 2. Identifying endpoints by counting the 8-neighborhood connectivity is essentially treating the crack trajectory as a path in a graph structure and performing topological analysis. In addition, marking the intersection of the crack trajectory with the boundary of the recognition subdomain as an endpoint is to handle the case where the crack extends beyond the image acquisition boundary. Such cracks do not truly terminate at the boundary but continue to extend outside the subdomain, and their intersection with the boundary physically represents the location where the crack exits the detection area.

[0038] Please see Figure 3 As shown, it is a schematic diagram of the grid connectivity of the trajectory endpoint and trajectory connection node in an embodiment of the present invention. In (a) and (b), the grid connectivity number is 2, which can be used to determine that the grid at the center position corresponds to the trajectory endpoint. In (c) and (d), the grid connectivity number is 3, which means that the grid at the center position is not the trajectory endpoint, but only a trajectory connection node. Therefore, by establishing an 8-neighborhood of the center position, the number of connected pixels through which the crack trajectory passes can be used to determine whether the center position is the trajectory endpoint.

[0039] Specifically, the process of generating trajectory representation vectors includes: The two trajectory endpoints that are furthest apart along the crack extension direction are selected as the start and end points of the vector to generate the trajectory representation vector.

[0040] Understandably, the direction of crack propagation is determined by its overall trajectory. Among the multiple endpoints of the crack trajectory, the two endpoints furthest along the crack propagation direction represent the two extreme positions of the crack's spatial distribution. The vector determined by these two endpoints can best characterize the macroscopic orientation of the crack. From the perspective of fracture mechanics, crack propagation manifests as a directional extension from the crack initiation point to the termination point. Selecting the two furthest endpoints generates a trajectory characterization vector, where the vector direction represents the overall propagation direction of the crack from the initiation point to the termination point.

[0041] Specifically, the fitting degree is the ratio of the magnitude of the trajectory representation vector to the actual trajectory length of the crack.

[0042] In this invention, the trajectory representation vector is a vector obtained by connecting the start and end points of the crack with straight line segments, and its magnitude represents the straight-line distance from the crack's start point to its end point. The actual crack trajectory length is the total path length obtained by accumulating pixel by pixel along the crack trajectory. It can be understood that for a completely straight crack, the straight-line distance equals the actual path length, and the fit is 1; for a curved or polygonal crack, the actual path length is greater than the straight-line distance, and the fit is less than 1. Therefore, the fit is essentially a quantitative measure of the straightness of the crack trajectory. The physical meaning of this index is that when the crack stably extends along a straight line, its trajectory is close to a straight line, and the fit approaches 1; when the crack trajectory exhibits a curved shape, the fit deviates from 1.

[0043] In this invention, the method for calculating the actual length of the crack trajectory is as follows: on a grid with a single pixel width, starting from one end of the crack trajectory, traverse the crack path pixel by pixel to the other end, calculate and accumulate the Euclidean distance between adjacent pixels, where the distance between horizontal or vertical adjacent pixels is 1 pixel unit, and the distance between diagonally adjacent pixels is √2 pixel units. The total accumulated distance value is taken as the actual length of the crack trajectory.

[0044] Specifically, the process of determining the first predicted connection point between the trajectory representation vector and the edge includes: The starting point is the endpoint of the trajectory representation vector; Draw a ray extension line along the trajectory characterization vector direction, and determine the intersection of the ray extension line and the edge as the first predicted connection point.

[0045] It is important to note that for cracks with a fit greater than or equal to a preset threshold, their trajectory is close to a straight line, indicating that the crack has not undergone a significant directional deflection during propagation. Continuing to propagate in the current direction is the most mechanically probable evolutionary path. The endpoint of the trajectory representation vector is the end point of the crack near the edge. Extending a ray along the direction of the trajectory representation vector from this point is essentially a kinematic extrapolation based on the current crack propagation direction. The intersection of this extrapolation with the edge is the predicted location where the crack penetrates the edge, which has a high prediction confidence for straight cracks.

[0046] Please see Figure 4 The diagram shown illustrates the steps involved in synthesizing the target representation vector according to an embodiment of the present invention. The process of synthesizing the target representation vector includes: Step S301: Calculate the curvature change of the pixels on the crack trajectory, and use the pixels whose curvature change rate exceeds the preset curvature change reference value as segmentation nodes to divide the crack trajectory into several trajectory segments. Here is a process for calculating curvature change: For each pixel P on the crack trajectory iLet i = 1, 2, ..., N, where N is the total number of pixels on the trajectory. A local window is formed by taking the k pixels before and after the trajectory, preferably k = 5. The least squares method is used to perform a quadratic polynomial fitting on the pixels within the window to obtain the fitted curve y = ax. 2 +bx+c; According to the standard calculus formula, P... i curvature k at the point i =|2a| / (1+(2ax) i +b) 2 ) (3 / 2) , where x i It is the current pixel P i The x-coordinate value; Calculate P i The rate of change of curvature at point Δk i =|k i+1 -k i | / d i , where d i For P i With P i+1 Pixel distance between; The preset curvature change reference value is 0.15, when Δk i When P > 0.05, P i Marked as a segment node; Using all segmented nodes as the dividing boundary, the pixel sequence between consecutive unmarked segmented nodes is taken as the same trajectory segment, thereby dividing the crack trajectory into several trajectory segments.

[0047] In this invention, the curvature of the crack trajectory is typically between 0 and 1, and a nearly straight crack has a curvature close to 0.

[0048] Step S302: Determine the segmented trajectory vector for each trajectory segment and calculate the vector angle between each segmented trajectory vector; Step S303: The segmented trajectory vectors whose included angles fall into the same included angle interval are grouped into the same vector cluster, and the vector sum of each segmented trajectory vector in the vector cluster containing the most vectors is used as the target representation vector.

[0049] Here is a method for dividing the included angle interval: starting from 0° and with an interval width of 15°, the angle range of 0° to 180° is divided into 12 equally wide included angle intervals, namely [0°, 15°), [15°, 30°), [30°, 45°), [45°, 60°), [60°, 75°), [75°, 90°), [90°, 105°), [105°, 120°), [120°, 135°), [135°, 150°), [150°, 165°), [165°, 180°]. For any segmented trajectory vector, calculate the angle θ between it and the edge. If θ falls within one of the above intervals, then the segmented trajectory vector is assigned to the same vector cluster.

[0050] It is important to note that for bending cracks where the fit does not reach the threshold, extrapolation using a single vector is not possible. This invention calculates the curvature of each pixel on the crack trajectory and identifies locations where significant abrupt changes in curvature occur as segmentation nodes. These locations correspond to inflection points where the crack propagation direction changes. Pixels where the rate of curvature change exceeds a preset reference value indicate that the crack has undergone a significant directional change at that point.

[0051] Different trajectory segments of a bending crack may exhibit different extension directions, but there is often a dominant directional cluster, which represents the macroscopic propagation direction maintained by the crack for most of its travel. By statistically analyzing and clustering the angle intervals of the trajectory vectors of each segment, segments with similar directions are grouped into the same vector cluster. The vector sum of the trajectory vectors of each segment in the cluster containing the most vectors is used as the target representation vector. The physical essence is that during crack propagation, a small number of segments in the non-dominant vector cluster are insufficient to change the macroscopic evolution trend of the crack; the overall propagation direction of the crack is determined by the dominant directional component during its travel. Using the vector sum of the dominant vector cluster as the target representation vector effectively filters out directional interference caused by local bending, ensuring that the target representation vector truly reflects the macroscopic direction of the crack.

[0052] Specifically, the process of determining the second predicted connection point between the target representation vector and the edge includes: Starting from the endpoint of the trajectory closest to the edge, extend the ray along the direction of the target representation vector; The intersection of the ray extension and the edge is determined as the second predicted penetration point.

[0053] Understandably, the endpoint of the trajectory near the edge is the actual location of the crack tip in the image, and also the location of the crack's front edge. Starting from this point and extending a ray along the direction of the target representation vector, the extrapolated direction of the second predicted penetration point is not a single vector determined by the overall crack initiation and termination points, but rather a target representation vector synthesized after piecewise statistics. This vector better reflects the macroscopic direction of the bending crack, thus providing higher prediction accuracy for bending cracks.

[0054] Specifically, the process of comparing the spatial deviation between the first predicted breakthrough point and the second predicted breakthrough point includes: Calculate the Euclidean distance between the first predicted breakthrough point and the second predicted breakthrough point; The Euclidean distance is compared with a preset distance threshold. If the Euclidean distance is less than or equal to the distance threshold, the spatial deviation is determined to meet the preset convergence condition.

[0055] In this invention, the preset distance threshold D is determined based on the camera resolution and the actual size of the rectangular tube end face: D = β × R, where R is the physical size corresponding to one pixel in the image, in mm / pixel, and β is a scaling factor, ranging from 5 to 15. When the camera resolution is 1920 × 1080 pixels and the field of view is 50 mm × 30 mm, R = 0.026 mm / pixel, and the distance threshold D ranges from 0.13 mm to 0.39 mm. Preferably, β = 10, i.e., D = 10 × R. When the Euclidean distance between the first predicted connection point and the second predicted connection point is less than or equal to D, the spatial deviation is determined to meet the preset convergence condition.

[0056] It is understandable that the first and second predicted penetration points are two independent predictions of the same crack-edge intersection point. The former extrapolates from the trajectory representation vector determined by the overall start and end points of the crack, while the latter extrapolates from the target representation vector synthesized through piecewise statistical analysis. When the intersection points given by the two independent prediction methods are sufficiently close in space, the intersection point location has high reliability. Using the comparison between Euclidean distance and a distance threshold as a criterion provides a quantitative basis and statistical reliability for judging the evolutionary penetration tendency.

[0057] Specifically, the process of recording the predicted connection points includes: In response to the determination result that the crack in the identification unit has the tendency to evolve and penetrate, the coordinates of the first predicted penetration point and the second predicted penetration point are obtained; Based on the coordinates of the first predicted connection point and the second predicted connection point, the point determined by the average of the coordinate values ​​is recorded as the connection prediction point.

[0058] It is important to note that when the intersection points given by the two independent prediction methods meet the convergence condition, both the first and second predicted penetration points are valid estimates of the crack penetration edge position. However, each may carry a certain degree of error. The first predicted penetration point may ignore the influence of local directional fluctuations due to the assumption of overall crack straightening, while the second predicted penetration point may lose some directional information due to the discarding of non-dominant vector clusters in piecewise statistics. Taking the average of the two coordinates as the final penetration prediction point essentially fuses the two prediction results. By determining the geometric center, the potential bias errors of each method are offset, making the final recorded penetration prediction point statistically closer to the actual crack penetration location.

[0059] Specifically, the process of outputting the rectangular tube defect location and identification results based on the end-face distribution clustering characteristics of the predicted points within all identification units includes: The edges are divided into different sections based on the midpoint of the rectangular tube's length. Calculate the proportion of predicted points in each segment. If the proportion of such points in any segment exceeds a preset threshold for the proportion of clustered points, then the segment is determined to be a clustered segment. The coordinates of the first and last points of the clustered section are output as the defect location and identification results.

[0060] In this invention, the threshold value for the percentage of clustered points ranges from 30% to 50%. Preferably, the threshold value for the percentage of clustered points is 40%. Specifically, let n be the number of predicted penetration points recorded within a certain edge segment. i If the total number of predicted connection points within all sections is N, then the percentage of points in that section is p. i =n i / N×100%. When p i When the percentage of clustered elements exceeds the threshold, the segment is determined to be a clustered segment.

[0061] Here is an example of outputting the results of rectangular tube defect location and identification: Using the midpoint of the rectangular tube as a reference, the entire 3000mm length of the rectangular tube is divided into 6 segments of 500mm each. The percentage of predicted penetration points within each segment is calculated: if the percentage is 0 in segment 1 (0-500mm), 50% in segment 2 (500-1000mm), 0 in segment 3 (1000-1500mm), 12.5% ​​in segment 4 (1500-2000mm), 37.5% in segment 5 (2000-2500mm), and 0 in segment 6 (2500-3000mm), then segment 2 (50%) is considered a clustering segment as its percentage exceeds the 40% threshold. Segment 5 (37.5%) is not considered a clustering segment as its percentage does not exceed 40%. The final output shows the coordinates of the beginning and end points of the clustering section, that is, the section from 500mm to 1000mm on the left end of the rectangular tube is the high-risk section for crack evolution and penetration.

[0062] Specifically, the present invention can use an industrial camera to take vertical pictures of the end face of the rectangular tube. The camera resolution is not less than 1920×1080 pixels, and the optical axis of the lens is perpendicular to the end face of the rectangular tube, so as to ensure that the edges of the rectangular tube are clearly imaged in the picture.

[0063] Understandably, during the service life of a photovoltaic (PV) support's rectangular tube, different sections experience varying load types and stress levels. Statistical analysis of the crack penetration prediction points recorded by each identification unit along the entire length of the rectangular tube, based on their spatial location, and calculation of the proportion of penetration prediction points within each edge segment, allows for the identification of the spatial clustering characteristics of crack penetration tendency from a global perspective. When the proportion of penetration prediction points in a certain segment exceeds a preset threshold, it indicates that this segment is a high-risk area for crack evolution and penetration. The coordinates of the beginning and end points of the clustered segment are output as the defect location identification result, revealing the spatial distribution of high-risk segments and providing direct decision-making basis for targeted inspection, reinforcement maintenance, and life assessment of the PV support.

[0064] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements all the steps of the above-described image processing-based rectangular tube defect detection method.

[0065] The computer-readable storage medium includes, but is not limited to, various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. Preferably, the storage medium is a non-volatile readable storage medium.

[0066] In one specific embodiment, the computer program is integrated into an embedded industrial computer or industrial PC, which is installed at the inspection station or mobile inspection platform of the photovoltaic bracket production line. After the operator starts the inspection program, the system automatically performs image acquisition, preprocessing, identification sub-domain delineation, endpoint extraction, hierarchical intersection prediction, penetration tendency determination, and segregation characteristic statistics. Finally, the system outputs the rectangular tube defect location and identification results on the industrial computer display screen and generates an inspection report containing the coordinates of the beginning and end points of the segregation section and the distribution map of the predicted penetration points.

[0067] The detection system of this invention can be integrated into the automated production line of photovoltaic brackets as part of the online quality inspection station, enabling rapid screening of edge cracks after rectangular tube cutting; it can also perform periodic crack evolution risk assessments on existing brackets. The detection results can be uploaded to a cloud management platform via the network to form a crack defect database.

[0068] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.

[0069] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for detecting defects in rectangular tubes based on image processing, characterized in that, include: A recognition sub-domain is defined on each of the two end faces of the rectangular tube. The two recognition sub-domains are constructed with the edges of the rectangular tube as the dividing boundary to form a recognition unit. The target to be detected in each recognition sub-domain is constrained to a single crack. The endpoints of the crack trajectory within each identification subdomain are extracted to generate a trajectory representation vector, and the fit between the magnitude of the trajectory representation vector and the actual length of the crack trajectory is calculated. Based on the fit degree, a graded intersection point prediction is performed, including determining the first predicted connection point between the crack and the edge based on the trajectory representation vector for cracks with a fit degree greater than or equal to a preset threshold; and determining the second predicted connection point between the crack and the edge based on the trajectory representation vector for cracks with a fit degree less than a preset threshold by statistically analyzing the angle intervals of the segmented trajectory vectors and synthesizing the target representation vector with the dominant vector cluster. Compare the spatial deviation between the first predicted penetration point and the second predicted penetration point. If the deviation meets the preset convergence condition, it is determined that the crack in the identification unit has the tendency to evolve and penetrate, and the penetration prediction point is recorded. The distribution and clustering characteristics of the end faces of the predicted points within all identification units are statistically analyzed, and the results of the rectangular tube defect location identification are output.

2. The image processing-based rectangular tube defect detection method according to claim 1, characterized in that, The process of extracting the endpoints of the crack trajectory within each identification subdomain includes: A grid with a single pixel width is used as the reference. The number of grids connected to the 8-neighborhood of a pixel is determined based on each grid. Pixels with 2 grid points that are connected to 8 neighbors are marked as trajectory endpoints, and the intersection of the crack trajectory and the boundary of the identification subdomain is marked as trajectory endpoints.

3. The image processing-based rectangular tube defect detection method according to claim 2, characterized in that, The process of generating trajectory representation vectors includes: The two trajectory endpoints that are furthest apart along the crack extension direction are selected as the start and end points of the vector to generate the trajectory representation vector.

4. The image processing-based rectangular tube defect detection method according to claim 3, characterized in that, The fitting degree is the ratio of the magnitude of the trajectory representation vector to the actual length of the crack trajectory.

5. The image processing-based rectangular tube defect detection method according to claim 1, characterized in that, The process of determining the first predicted connection point between the trajectory representation vector and the edge includes: The starting point is the endpoint of the trajectory representation vector; Draw a ray extension line along the trajectory characterization vector direction, and determine the intersection of the ray extension line and the edge as the first predicted connection point.

6. The image processing-based rectangular tube defect detection method according to claim 1, characterized in that, The process of synthesizing the target representation vector includes: The curvature change of pixels on the crack trajectory is calculated, and the crack trajectory is divided into several trajectory segments by using pixels whose curvature change rate exceeds the preset curvature change reference value as segmentation nodes. For each trajectory segment, determine the segmented trajectory vector and calculate the angle between the vectors of each segmented trajectory vector; The segmented trajectory vectors whose included angles fall into the same included angle interval are grouped into the same vector cluster, and the vector sum of each segmented trajectory vector in the vector cluster containing the most vectors is used as the target representation vector.

7. The image processing-based rectangular tube defect detection method according to claim 6, characterized in that, The process of determining the second predicted connection point between the target representation vector and the edge includes: Starting from the endpoint of the trajectory closest to the edge, extend the ray along the direction of the target representation vector; The intersection of the ray extension and the edge is determined as the second predicted penetration point.

8. The image processing-based rectangular tube defect detection method according to claim 7, characterized in that, The process of comparing the spatial deviation between the first predicted breakthrough point and the second predicted breakthrough point includes: Calculate the Euclidean distance between the first predicted breakthrough point and the second predicted breakthrough point; The Euclidean distance is compared with a preset distance threshold. If the Euclidean distance is less than or equal to the distance threshold, the spatial deviation is determined to meet the preset convergence condition.

9. The image processing-based rectangular tube defect detection method according to claim 8, characterized in that, The process of recording the predicted connection points includes: In response to the determination result that the crack in the identification unit has the tendency to evolve and penetrate, the coordinates of the first predicted penetration point and the second predicted penetration point are obtained; Based on the coordinates of the first predicted connection point and the second predicted connection point, the point determined by the average of the coordinate values ​​is recorded as the connection prediction point.

10. The image processing-based rectangular tube defect detection method according to claim 9, characterized in that, Based on the end-face distribution clustering characteristics of the predicted points within all identification units, the process of outputting the rectangular tube defect location identification results includes: The edges are divided into different sections based on the midpoint of the rectangular tube's length. Calculate the proportion of predicted points in each segment. If the proportion of such points in any segment exceeds a preset threshold for the proportion of clustered points, then the segment is determined to be a clustered segment. The coordinates of the first and last points of the clustered section are output as the defect location and identification results.

Citation Information

Patent Citations

  • Metal pipe surface crack defect visual detection method based on image processing

    CN119338824A