An image recognition-based cable surface defect monitoring method
By using image recognition technology and employing a spatiotemporal crystal model and the Poisson equation to invert the three-dimensional morphology and depth distribution of cable surface defects, the problems of insufficient defect detection accuracy and noise interference in existing technologies are solved, and high-precision defect monitoring is achieved.
Patent Information
- Application Number
- CN202511122278.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-08-12
AI Technical Summary
Existing technologies cannot effectively quantify depth distribution in cable surface defect detection, nor can they suppress environmental noise interference, leading to inaccurate determination of defect size and type, which affects detection accuracy and robustness.
An image recognition-based method is used to extract the main peak of the spectrum as the lattice basis vector through two-dimensional Fourier transform, establish a spatiotemporal crystal model, locate the boundary points of the Brillouin zone, analyze the eigenvalues of the group representation matrix, calculate the equivalent divergence distribution map, invert the three-dimensional defect morphology and depth distribution, and filter out transient interferences through the Poisson equation to generate a monitoring report.
It achieves high-precision three-dimensional morphology and depth distribution inversion of cable surface defects, accurately characterizes the curvature changes of pits and crack propagation morphology, provides high-precision defect parameter extraction, and improves the reliability and accuracy of detection.
Smart Images

Figure CN120635077B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial nondestructive testing technology, and in particular to a method for monitoring cable surface defects based on image recognition. Background Technology
[0002] With the rapid development of industrial automation technology, methods based on machine vision and image processing have been widely adopted in the field of cable surface defect detection. These technologies include high-resolution optical imaging systems, edge detection algorithms, and deep learning methods, enabling preliminary identification of common defects such as cracks, pits, and scratches on cable surfaces. In particular, the application of Fourier transform and frequency domain analysis has significantly improved the efficiency of defect feature extraction; for example, spatial frequency analysis enhances the anomaly detection capability of periodic textures. Simultaneously, 3D reconstruction technologies such as structured light scanning and stereo vision have been integrated for the quantification of partial surface morphology, promoting the standardization of nondestructive testing in industries such as power and communications.
[0003] However, existing technologies have significant limitations in the accurate inversion of the three-dimensional morphology of defects. The main problem lies in the inability to effectively quantify depth distribution and suppress transient interference. When traditional methods rely on gradient or texture features, environmental noise (such as changes in lighting or mechanical vibration) often leads to inaccurate divergence value mapping, increasing depth estimation errors and affecting the reliable determination of defect size and type. For example, depth inversion based on simple thresholds or empirical models lacks mathematical rigor, and the boundary conditions for solving the Poisson equation are coarse, failing to capture curvature changes in minute defects. This can easily lead to false alarms or missed alarms in high-speed production line inspection, limiting the accuracy and robustness of industrial applications. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a cable surface defect monitoring method based on image recognition to solve the problem of insufficient accuracy of three-dimensional morphological inversion in cable surface defect detection.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] This invention provides a method for monitoring cable surface defects based on image recognition, which includes: performing a two-dimensional Fourier transform on a visible light image of the cable surface, extracting the spatial frequency corresponding to the main peak of the spectrum as the lattice basis vector, and establishing a spacetime crystal model; performing spatial frequency mapping in the reciprocal space of the spacetime crystal model to locate the boundary points of the Brillouin zone; analyzing the eigenvalue distribution of the group representation matrix at the boundary points of the Brillouin zone to identify the spatial coordinate position of the symmetry-breaking defects and marking them as potential defect areas;
[0008] For image data of potential defect areas, the partial derivative of the gray-level gradient in a two-dimensional plane is calculated, and an equivalent divergence distribution map representing the defect characteristics is output. Based on the Poisson equation, a mapping relationship is established between the divergence values in the equivalent divergence distribution map and the defect depth, and the three-dimensional defect morphology and depth distribution of the potential defect area are inverted. Based on the equivalent divergence distribution map, the three-dimensional defect morphology and depth distribution, spatial trajectory tracking is performed on the identified symmetric defects, isolated anomalies caused by transient interference are screened out, and a monitoring report is output.
[0009] As a preferred embodiment of the image recognition-based cable surface defect monitoring method of the present invention, the specific steps for establishing the spatiotemporal crystal model are as follows:
[0010] A two-dimensional Fourier transform is performed on the visible light image of the cable surface to obtain spectral data, and the spatial frequency component corresponding to the main peak of the spectrum is extracted from the spectral data.
[0011] The spatial frequency components are used as lattice basis vectors to define the hexagonal lattice structure;
[0012] A spacetime crystal model incorporating symmetry group operations is constructed based on a hexagonal lattice structure.
[0013] As a preferred embodiment of the image recognition-based cable surface defect monitoring method of the present invention, the specific steps for locating the Brillouin zone boundary points are as follows:
[0014] Calculate the reciprocal lattice basis vectors based on the lattice basis vectors of the spacetime crystal model, and draw the polygonal boundary of the first Brillouin zone in reciprocal lattice space;
[0015] Determine the vertex coordinates of the polygon boundary as point Γ, and calculate the height-symmetric path connecting point Γ and its adjacent reciprocal grid points;
[0016] Mark points K and M on the high-symmetric path as the boundary points of the Brillouin zone.
[0017] In a preferred embodiment of the image recognition-based cable surface defect monitoring method of the present invention, the marking is for potential defect areas, and the specific steps are as follows:
[0018] Extract the group representation matrix of the spacetime crystal model at the boundary points of the Brillouin zone, solve for the eigenvalues of the group representation matrix, and calculate the standard deviation of the eigenvalues.
[0019] The statistical threshold is obtained by fitting the probability density of the standard deviation of the eigenvalues using the kernel density estimation method.
[0020] Compare the standard deviation of the feature values with the statistical threshold, and mark the abnormal spatial coordinates of feature values whose standard deviation exceeds the statistical threshold;
[0021] Topological connectivity analysis is performed on continuous anomalous spatial coordinates to generate closed boundary regions as potential defect regions.
[0022] As a preferred embodiment of the image recognition-based cable surface defect monitoring method of the present invention, the specific steps for outputting the equivalent divergence distribution map representing the defect features are as follows:
[0023] Calculate the horizontal and vertical partial derivative matrices of the grayscale image within the potential defect region;
[0024] The horizontal and vertical partial derivative matrices are merged to form a gradient vector field. The two-dimensional divergence value of the gradient vector field is calculated, and a mapping distribution map of spatial coordinates and divergence values is generated as an equivalent divergence distribution map.
[0025] As a preferred embodiment of the image recognition-based cable surface defect monitoring method of the present invention, the specific steps for retrieving the three-dimensional defect morphology and depth distribution of the potential defect region are as follows:
[0026] Obtain depth measurement data and divergence values at corresponding locations for defect samples in the potential defect region;
[0027] Establish a mapping relationship between divergence values and depth measurement data, and generate a calibration relationship curve;
[0028] Based on the calibration relationship curve, the divergence value of the current detected target is mapped to the depth estimate, and the Poisson equation is established with the depth estimate as the boundary condition.
[0029] The three-dimensional depth field is obtained by iteratively solving the Poisson equation using the finite difference method, and the three-dimensional defect morphology and depth distribution corresponding to the three-dimensional depth field are output.
[0030] As a preferred embodiment of the cable surface defect monitoring method based on image recognition described in this invention, the spatial trajectory tracking refers to filtering out abnormal coordinate points by analyzing the displacement changes of defects based on the symmetry between continuous image frames.
[0031] As a preferred embodiment of the image recognition-based cable surface defect monitoring method of the present invention, the specific steps for outputting the monitoring report are as follows:
[0032] Integrate the 3D defect morphology verified through spatial trajectory tracking;
[0033] The depth distribution is matched with a pre-defined defect feature template library to identify the defect type;
[0034] Based on the defect type, an orthogonal projection plane is selected, and convex hull detection is performed on the spatial point cloud of the three-dimensional defect morphology to extract the boundary point coordinates.
[0035] Calculate the maximum projection distance between boundary points on the orthogonal projection plane, obtain the length and width parameters, and extract the extreme values of the depth distribution as the depth parameters.
[0036] The defect type, boundary point coordinates, length parameters, width parameters, and depth parameters are bound to timestamps to generate a structured data report.
[0037] The beneficial effects of this invention are as follows: By establishing a mapping relationship between divergence values and defect depth in an equivalent divergence distribution map using the Poisson equation, the three-dimensional morphology and depth distribution of potential defect regions can be inverted. A calibration curve is used to convert divergence values into depth estimates, and the solution is obtained by discretization based on the Poisson equation, ensuring that the depth field distribution meets the requirements of physical continuity. The generated three-dimensional depth field can accurately characterize the microscopic geometric features of defects, including changes in pit curvature, crack propagation morphology, and local depth extremum distribution. By setting a convergence threshold to control the iteration accuracy, spatial point cloud data can be stably output, providing a high-precision foundation for defect parameter extraction and achieving complete reconstruction and quantitative analysis of the three-dimensional morphology of defects. Attached Figure Description
[0038] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a flowchart of an image recognition-based cable surface defect monitoring method.
[0040] Figure 2 Flowchart for spacetime crystal modeling and Brillouin zone analysis.
[0041] Figure 3 This is a flowchart for the 3D inversion and verification of defects.
[0042] Figure 4 Flowchart for monitoring report generation and parameter extraction. Detailed Implementation
[0043] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0044] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0045] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0046] Reference Figures 1-4 This is one embodiment of the present invention, which provides a cable surface defect monitoring method based on image recognition, including the following steps:
[0047] S1: Perform a two-dimensional Fourier transform on the visible light image of the cable surface, extract the spatial frequency corresponding to the main peak of the spectrum as the lattice basis vector, and establish a spacetime crystal model.
[0048] S1.1: Perform a two-dimensional Fourier transform on the visible light image of the cable surface to obtain spectral data, and extract the spatial frequency component corresponding to the main peak of the spectrum from the spectral data.
[0049] Specifically, a visible light image of the cable surface is acquired. This visible light image is a two-dimensional grayscale image that represents the light intensity distribution on the cable surface.
[0050] A two-dimensional fast Fourier transform algorithm is applied to process the visible light image of the cable surface, and the spatial frequency domain representation of the visible light image of the cable surface is calculated to obtain the spectrum data. The spectrum data includes the amplitude spectrum and the phase spectrum, where the amplitude spectrum represents the intensity of each spatial frequency component.
[0051] In the amplitude spectrum, scan all frequency coordinate points and identify the point with the largest amplitude value as the main peak of the spectrum;
[0052] Record the spatial frequency coordinates of the main peak of the spectrum. The spatial frequency coordinates consist of two components, representing the spatial frequencies in the horizontal and vertical directions, respectively, which serve as the spatial frequency components corresponding to the main peak of the spectrum.
[0053] S1.2: Define a hexagonal lattice structure using spatial frequency components as lattice basis vectors.
[0054] Specifically, the spatial frequency components are taken as lattice basis vectors;
[0055] It should be noted that lattice basis vectors are the fundamental vectors that define the periodicity of crystals;
[0056] Based on lattice basis vectors, a hexagonal lattice structure is defined. The hexagonal lattice structure requires that the lengths of the lattice basis vectors be equal and that the included angle between the basis vectors be set to a fixed degree (such as 120 degrees) to form a hexagonal symmetric periodic grid.
[0057] Using the values of the spatial frequency components, the basis vector lengths and angles are adjusted to satisfy the hexagonal symmetry condition; specifically, the modulus and angle difference of the spatial frequency components are calculated, normalized to equal lengths, and the included angle is set to a fixed degree to generate a hexagonal lattice structure.
[0058] S1.3: Construct a spacetime crystal model containing symmetry group operations based on a hexagonal lattice structure.
[0059] Specifically, a hexagonal lattice structure is used as the basic framework;
[0060] Add symmetry group operations to the hexagonal lattice structure; the symmetry group operations include six-fold rotational symmetry operations and reflection symmetry operations, where the six-fold rotational symmetry operation means that the lattice remains unchanged after every 60 degrees of rotation, and the reflection symmetry operation means that the mirror symmetry is along a specific axis.
[0061] By integrating hexagonal lattice structure and reflection symmetry operations, the periodic spatial structure and symmetry characteristics of cable surface images are described, forming a mathematical representation that can be used for defect analysis.
[0062] S2: Perform spatial frequency mapping in the reciprocal space of the spacetime crystal model to locate the boundary points of the Brillouin zone.
[0063] S2.1: Calculate the reciprocal lattice basis vectors based on the lattice basis vectors of the spacetime crystal model, and draw the polygonal boundary of the first Brillouin zone in reciprocal space.
[0064] Specifically, the lattice basis vectors of the spacetime crystal model are used as input; the lattice basis vectors include the first basis vector. Second basis This defines a hexagonal lattice structure;
[0065] Calculate the reciprocal lattice basis vectors using crystallographic reciprocal lattice calculation formulas;
[0066] Specifically, for the first basis vector Second basis First reciprocal lattice basis vector Second inverse lattice basis vectors They must satisfy an orthogonal relation, expressed as:
[0067] ;
[0068] In the formula, This represents the normalization coefficient between reciprocal lattice basis vectors and positive lattice basis vectors. The numbering of the positive lattice basis vectors, Indicates the numbering of the reciprocal lattice basis vectors. Indicates the first Positive grid base vector, Indicates the first Reciprocal lattice basis vectors, The Kronecker delta function is used to force the reciprocal lattice basis vectors to be orthogonal to the normal lattice basis vectors.
[0069] The Kronecker delta function is specifically calculated by solving a system of linear equations, with the lattice basis vectors set as follows: and The reciprocal lattice basis vectors are then calculated using the matrix inversion formula:
[0070] ;
[0071] In the formula, The component representing the horizontal axis direction. Indicates the component in the vertical axis direction. This represents the inverse of a matrix. This represents the component of the first positive lattice basis vectors along the horizontal axis. This represents the component of the second positive lattice basis vectors along the vertical axis. This represents the component of the first reciprocal lattice basis vector along the horizontal axis. This represents the component of the second reciprocal lattice basis vector in the vertical axis direction;
[0072] Reciprocal lattice points are generated using the first and second reciprocal lattice basis vectors, where the positions of the reciprocal lattice points are defined by integer combinations of reciprocal lattice basis vectors, expressed as:
[0073] ;
[0074] In the formula, Representing reciprocal lattice basis vectors Integer multiples of these coefficients are used to control the amount of translation along the direction of the first reciprocal lattice basis vector. Representing reciprocal lattice basis vectors Integer multiples of the coefficients are used to control the amount of translation along the direction of the second reciprocal lattice basis vector;
[0075] Example: Assume the lattice basis vectors are and Then the reciprocal lattice basis vectors are calculated as follows: and The first Brillouin zone is hexagonal, and the polygon boundary is formed by points such as... Connections are formed.
[0076] S2.2: Determine the vertex coordinates of the polygon boundary as Γ point, and calculate the height symmetric path connecting Γ point and the adjacent reciprocal grid point.
[0077] Identify the boundary vertices from the polygon boundary of the first Brillouin zone; all boundary vertices share a common coordinate in reciprocal space; the common coordinate is defined as the Γ point, i.e., the origin of reciprocal space;
[0078] Calculate the high-symmetry path connecting the Γ point and its adjacent reciprocal lattice points; the adjacent reciprocal lattice point refers to the reciprocal lattice point closest to the Γ point (based on the reciprocal lattice points generated in S2.1), and the high-symmetry path is a straight path in reciprocal lattice space along the crystallographic high-symmetry direction (such as the Γ-K or Γ-M direction in a hexagonal lattice); specifically, this includes selecting the Γ point and its adjacent reciprocal lattice points (such as those located in...). and (Points in the direction), and calculate the equation of the line between the two points;
[0079] Example: In the first Brillouin zone of a hexagonal lattice, the Γ point is located at (0,0), and the adjacent reciprocal lattice points include those located at... The point, the high-symmetric path includes Γ to The straight path.
[0080] S2.3: Mark points K and M on the high-symmetric path as the boundary points of the Brillouin zone.
[0081] On a highly symmetric path, point K is defined as the corner point of the first Brillouin zone hexagon, and point M is defined as the midpoint of the side of the first Brillouin zone hexagon. Specifically, this involves analyzing the equation of the highly symmetric path (such as the Γ-K or Γ-M path) and calculating the coordinates corresponding to the corner point or midpoint of the hexagon on the highly symmetric path.
[0082] The spatial coordinates of points K and M are marked as the boundary points of the Brillouin zone.
[0083] S3: Analyze the eigenvalue distribution of the group representation matrix at the boundary points of the Brillouin zone, identify the spatial coordinates of symmetry-breaking defects, and mark them as potential defect areas.
[0084] S3.1: Extract the group representation matrix of the spacetime crystal model at the boundary point of the Brillouin zone, solve for the eigenvalues of the group representation matrix, and calculate the standard deviation of the eigenvalues.
[0085] Specifically, all Brillouin zone boundary points (including K and M points) are used as input;
[0086] For each Brillouin zone boundary point, obtain the group representation matrix of the spacetime crystal model at the Brillouin zone boundary point; the group representation matrix is defined by the lattice symmetry of the spacetime crystal model (such as C6 rotational symmetry of a hexagonal lattice).
[0087] Solve for the eigenvalues of each group representation matrix: Let the group representation matrix be... The characteristic equation is expressed as:
[0088] ;
[0089] In the formula, Let the determinant of the matrix be a group. Indicates and Identity matrices of the same dimension The eigenvalues of a group are represented by the eigenvalues of the matrix.
[0090] Calculate the standard deviation of each set of eigenvalues :
[0091] ;
[0092] ;
[0093] In the formula, Indicates the first 1 eigenvalue, The index variable for the eigenvalues, This represents the mean of the eigenvalues. The total number of eigenvalues is represented by a group-represented matrix. The dimension determines, Indicates to Calculate the normalization coefficient of the average of the statistics of each eigenvalue.
[0094] S3.2: Obtain the statistical threshold by fitting the probability density of the standard deviation of the eigenvalues using the kernel density estimation method.
[0095] Specifically, the standard deviations of all Brillouin zone boundary points are collected as the standard deviation dataset.
[0096] The probability density estimation of the standard deviation dataset is performed using the Gaussian kernel function, expressed as follows:
[0097] ;
[0098] ;
[0099] In the formula, Standard deviation The probability density function value, Indicates the first The standard deviation of the eigenvalues at the boundary points of the Brillouin zone The index variable representing the boundary points of the Brillouin zone. This represents the total number of boundary points of the Brillouin zone (e.g., the number of K and M points in a hexagonal lattice). The bandwidth of the kernel function is calculated using the Silverman criterion. This represents the normalization coefficient in kernel density estimation. This represents the Gaussian kernel function, with normalized variables as input. , This represents the normalization constant, ensuring that the integral of the Gaussian function is 1. This represents the exponential part of the Gaussian function, indicating how the weights change. The increase in decreases;
[0100] Example: If (Right now ),but , indicating the current data point The maximum contribution to the probability density;
[0101] probability density function The peak position corresponding to Value as statistical threshold .
[0102] S3.3: Compare the standard deviation of the feature values with the statistical threshold, and mark the abnormal spatial coordinates of the feature values whose standard deviation exceeds the statistical threshold.
[0103] Specifically, iterate through each Brillouin zone boundary point, and if the standard deviation of the eigenvalues at the Brillouin zone boundary points is... Then the coordinates of the boundary points of the Brillouin zone are marked as anomaly space coordinates;
[0104] Output the set of all anomaly spatial coordinates: .
[0105] in, These are outlier spatial coordinates, indicating that the standard deviation of the boundary points of the Brillouin zone exceeds the statistical threshold. point, Represents the horizontal direction in reciprocal space Spatial frequency components, Represents the vertical direction in reciprocal space Spatial frequency components.
[0106] S3.4: Perform topological connectivity analysis on continuous anomalous spatial coordinates to generate closed boundary regions as potential defect regions.
[0107] Specifically, the coordinates of the anomaly space are mapped to the reciprocal lattice space two-dimensional plane, and the coordinate connectivity is determined based on Euclidean distance. If the distance between two points is... If , then it is determined to be a connected region;
[0108] in, The connectivity threshold is expressed as:
[0109] ;
[0110] In the formula, Denotes the modulus of the first reciprocal lattice basis vector. This is an empirical coefficient;
[0111] It should be noted that the empirical coefficient It is a theoretical value optimized to balance detection sensitivity and false alarm rate after Fourier analysis of the ratio between the typical defect size distribution and the reciprocal lattice basis mode length in the hexagonal lattice system.
[0112] For each connected region, calculate the convex hull to form a closed polygon boundary;
[0113] Mark the spatial extent covered by each closed polygon as a potential defect area.
[0114] S4: For image data of potential defect areas, calculate the partial derivative of the gray-level gradient in a two-dimensional plane and output an equivalent divergence distribution map representing the defect features.
[0115] S4.1: Calculate the horizontal and vertical partial derivative matrices of the grayscale image within the potential defect region.
[0116] Specifically, the potential defect region (closed boundary region) and the corresponding visible light grayscale image of the cable surface are obtained; within the pixel range covered by the potential defect region, the visible light grayscale image of the cable surface is convolved using the horizontal Sobel operator;
[0117] By traversing each pixel within the region, the grayscale gradient value in the horizontal direction of each pixel is calculated, and the horizontal partial derivative matrix is output.
[0118] Furthermore, the vertical Sobel operator is used to perform convolution operations on the same potential defect region image;
[0119] Using the same traversal method as the horizontal partial derivative matrix, the grayscale gradient value in the vertical direction of each pixel is calculated, and the vertical partial derivative matrix is output.
[0120] S4.2: Combine the partial derivatives in the horizontal direction and the partial derivatives in the vertical direction to form a gradient vector field, calculate the two-dimensional divergence value of the gradient vector field, and generate a mapping distribution map of spatial coordinates and divergence values as an equivalent divergence distribution map.
[0121] Specifically, the horizontal and vertical partial derivative matrices are combined to form a two-dimensional gradient vector field. ;
[0122] For each pixel in the two-dimensional gradient vector field, calculate the rate of change in the horizontal and vertical directions to obtain the divergence value of the pixel.
[0123] Traverse the entire potential defect area, calculate the divergence value of all pixels, establish a mapping relationship between the spatial coordinates of each pixel and its corresponding divergence value, and generate an equivalent divergence distribution map:
[0124] ;
[0125] in, This represents the horizontal coordinate of a pixel in the defect area image. This represents the vertical coordinate of a pixel in the defect area image. Represents a two-dimensional gradient vector field At point The divergence value (scalar) at that point. Define a separator for a set, indicating Need to meet Conditions in the potential defect area It is a universal quantifier, meaning "for all". The "potential defect area" condition means that only the coordinates of pixels belonging to the potential defect area are calculated.
[0126] S5: Based on the Poisson equation, establish a mapping relationship between the divergence values in the equivalent divergence distribution map and the defect depth, and inversely deduce the three-dimensional defect morphology and depth distribution of the potential defect area.
[0127] S5.1: Obtain depth measurement data and divergence values of defect samples in the potential defect region.
[0128] Specifically, the actual depth of the defect sample on the cable surface is measured and recorded as depth measurement data;
[0129] Perform steps S1-S4 on the same defect samples to obtain the equivalent divergence distribution map of the samples and extract the divergence value at the corresponding position of the defect;
[0130] Record each sample point as a data pair of (divergence value, depth measurement data) to build a mapping dataset.
[0131] S5.2: Establish the mapping relationship between divergence values and depth measurement data, and generate calibration relationship curves.
[0132] Specifically, using the mapped dataset, a quadratic polynomial function is fitted using the least squares method, with the expression:
[0133] ;
[0134] In the formula, This is the measured value of the defect depth. , and All are polynomial fitting coefficients, determined by minimizing the sum of squared residuals, used to establish a quantitative relationship between divergence and depth;
[0135] Verify the goodness of fit to ensure that the calibration relationship curve can effectively characterize the correlation between the divergence value and the depth measurement data, and output the calibration relationship curve.
[0136] Specifically, after fitting the divergence values and depth measurement data using a quadratic polynomial with the least squares method, the goodness of fit is verified by calculating the coefficient of determination. A coefficient of determination greater than a preset goodness-of-fit threshold confirms a valid fit. The fitted quadratic polynomial function is then used as a calibration curve. The entire verification process utilizes standard regression analysis in statistics to calculate the coefficient of determination, ensuring the reliable and repeatable mapping relationship between divergence values and depth.
[0137] It should be noted that the preset goodness-of-fit threshold is set by the empirical value method. The empirical value is based on the statistical results of historical calibration data, and the example value range is 0.85 to 0.95 (0.9 is commonly used in industrial testing). Historical calibration data refers to the dataset of the divergence values and the actual depth measurement values recorded in multiple past calibrations under the same testing conditions.
[0138] S5.3: Based on the calibration relationship curve, the divergence value of the current detected target is mapped to the depth estimate, and the Poisson equation is established with the depth estimate as the boundary condition.
[0139] Specifically, for the current cable inspection target, obtain the equivalent divergence distribution map.
[0140] The divergence value of each pixel in the equivalent divergence distribution map Substitute the values into the calibration curve to calculate the depth estimate. ;
[0141] With depth estimate For the boundary conditions, we establish the Poisson equation, which is expressed as:
[0142] ;
[0143] In the formula, This represents the depth field to be solved. express The two-dimensional Laplacian operator describes the curvature variation of depth in space. Represents the source term of the Poisson equation. Represents partial derivatives;
[0144] It should be noted that in the Poisson equation, the source term is a physical quantity generated by the second-order differential operation of the depth estimate. Specifically, the relationship is as follows: the depth estimate serves as the boundary condition constraining the value of the solution to the Poisson equation at the region boundary, while the source term drives the reconstruction of the depth field at points inside the Poisson equation by reflecting the curvature distribution of the depth estimate field. Together, they achieve the physical constraint inversion from two-dimensional divergence distribution to three-dimensional defect morphology.
[0145] S5.4: Obtain the three-dimensional depth field by iteratively solving the Poisson equation using the finite difference method, and output the three-dimensional defect morphology and depth distribution corresponding to the three-dimensional depth field.
[0146] Specifically, in the grid points of the potential defect area The discrete Poisson equation is expressed as:
[0147] ;
[0148] In the formula, For grid points The depth value at that location is used as the objective variable in the iterative solution. This represents the horizontal distance between adjacent grid points after discretization. Indicates the grid point number in the horizontal direction. Indicates the grid point number in the vertical direction. This represents the perpendicular distance between adjacent grid points after discretization. Represents the discretized source term value, This indicates the index of the discretized grid in the horizontal direction. Indicates the index of the discretized grid in the vertical direction;
[0149] The Gauss-Seidel iterative method is used to solve the problem. Iteration continues until the maximum difference between adjacent solutions is less than the depth convergence threshold, outputting a 3D depth field. ;
[0150] It should be noted that the depth convergence threshold is set according to the accuracy of the measuring instrument, and is usually taken as 1 / 2 to 1 / 5 of the minimum resolution of the instrument. The example value range is 0.01-0.05 mm.
[0151] Among them, the three-dimensional defect morphology: Coordinates represent surface topography; depth distribution: in , Mapping on the plane Heatmap of values.
[0152] S6: Based on the equivalent divergence distribution map, three-dimensional defect morphology and depth distribution, perform spatial trajectory tracking on the identified symmetrical defects, screen out isolated anomalies caused by transient interference, and output a monitoring report.
[0153] Among them, spatial trajectory tracking refers to the displacement changes based on the symmetry defects between continuous image frames, and the filtering out of abnormal coordinate points through motion consistency analysis.
[0154] S6.1: Integrate the three-dimensional defect morphology verified through spatial trajectory tracking.
[0155] Specifically, the coordinate data (i.e., three-dimensional coordinate data) of symmetric defects in three-dimensional space are obtained in the image frames of a continuous time series, and the displacement change of symmetric defects at the same position in adjacent frames is calculated.
[0156] When the displacement change exceeds the preset motion threshold, the corresponding symmetrical defect is marked as an isolated anomaly caused by transient interference, and symmetrical defects with displacement changes within the preset motion threshold are retained as valid detection points.
[0157] From the three-dimensional defect morphology, extract the three-dimensional coordinate data corresponding to the effective detection points, merge all the three-dimensional coordinate data, and form a spatial point cloud of the three-dimensional defect morphology.
[0158] It should be noted that the preset motion threshold is calculated by adding three times the standard deviation to the mean of the displacement change of the background region between consecutive image frames. The example value range is 0.1-0.5 mm (based on the vibration level of typical environments in industrial visual inspection).
[0159] S6.2: Match the depth distribution with the preset defect feature template library based on similarity and label the defect type.
[0160] Specifically, prepare a pre-set defect feature template library: containing depth distribution feature templates of typical defects (such as cracks, pits and scratches);
[0161] Calculate the cosine similarity value between the depth distribution and each depth distribution feature template, and select the typical defect name corresponding to the depth distribution feature template with the highest similarity as the defect type labeling result.
[0162] S6.3: Select an orthogonal projection plane based on the defect type, perform convex hull detection on the spatial point cloud of the 3D defect morphology, and extract the coordinates of the boundary points.
[0163] Specifically, when a defect is labeled as a crack or scratch, a vertical plane parallel to the length direction is selected as the orthogonal projection plane; when a defect is labeled as a pit, a horizontal plane is selected as the orthogonal projection plane.
[0164] The spatial point cloud of the three-dimensional defect morphology is orthogonally projected along the normal direction of the selected plane. On the two-dimensional plane after projection, the Graham scan algorithm is used to calculate the convex hull boundary polygon of the point set.
[0165] Record the coordinates of all vertices of the convex hull polygon as the coordinates of the boundary points.
[0166] S6.4: Calculate the maximum projected distance between boundary points on the orthogonal projection plane, obtain the length and width parameters, and extract the extreme values of the depth distribution as the depth parameters.
[0167] Specifically, on the projected two-dimensional plane, the Euclidean distance between the coordinates of all boundary points is calculated, and the maximum distance value is selected as the length parameter.
[0168] Select the second largest distance value perpendicular to the length direction as the width parameter;
[0169] Extract the global maximum value from the depth distribution as the depth parameter.
[0170] S6.5: Bind the defect type, boundary point coordinates, length parameter, width parameter, and depth parameter to the timestamp to generate a structured data report.
[0171] Specifically, obtain the timestamp information of the current detection time;
[0172] Create data fields: defect type, boundary point coordinate set, length parameter, width parameter, and depth parameter;
[0173] The created data fields are combined with timestamps to form a single data record. All single data records are sorted in ascending order by timestamp, and the output is a report document in tabular format, with each row corresponding to a defect record.
[0174] This embodiment also provides a computer device applicable to the cable surface defect monitoring method based on image recognition, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the cable surface defect monitoring method based on image recognition as proposed in the above embodiment.
[0175] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0176] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the cable surface defect monitoring method based on image recognition as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0177] In summary, this invention establishes a mapping relationship between divergence values and defect depth in an equivalent divergence distribution map using the Poisson equation, thereby inverting the three-dimensional morphology and depth distribution of potential defect regions. A calibration curve is used to convert divergence values into depth estimates, and the solution is obtained by discretization based on the Poisson equation, ensuring that the depth field distribution meets the physical continuity requirements. The generated three-dimensional depth field can accurately characterize the microscopic geometric features of defects, including changes in pit curvature, crack propagation morphology, and local depth extremum distribution. By setting a convergence threshold to control the iteration accuracy, stable output of spatial point cloud data can be achieved, providing a high-precision foundation for defect parameter extraction and realizing the complete reconstruction and quantitative analysis of the three-dimensional morphology of defects.
[0178] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for monitoring cable surface defects based on image recognition, characterized in that: include, A two-dimensional Fourier transform is performed on the visible light image of the cable surface, and the spatial frequency corresponding to the main peak of the spectrum is extracted as the lattice basis vector to establish a spacetime crystal model. Spatial frequency mapping is performed in the reciprocal space of the spacetime crystal model to locate the boundary points of the Brillouin zone; Analyze the eigenvalue distribution of the group representation matrix at the boundary points of the Brillouin zone to identify the spatial coordinates of symmetry-breaking defects and mark them as potential defect regions; For image data of potential defect areas, the partial derivative of the gray-level gradient in a two-dimensional plane is calculated, and an equivalent divergence distribution map representing the defect features is output. Based on the Poisson equation, a mapping relationship is established between the divergence values in the equivalent divergence distribution map and the defect depth, thereby retrieving the three-dimensional defect morphology and depth distribution of the potential defect region. Based on the equivalent divergence distribution map, three-dimensional defect morphology and depth distribution, spatial trajectory tracking is performed on the identified symmetrical defects to screen out isolated anomalies caused by transient interference and output a monitoring report.
2. The cable surface defect monitoring method based on image recognition as described in claim 1, characterized in that: The specific steps for establishing the spacetime crystal model are as follows. A two-dimensional Fourier transform is performed on the visible light image of the cable surface to obtain spectral data, and the spatial frequency component corresponding to the main peak of the spectrum is extracted from the spectral data. The spatial frequency components are used as lattice basis vectors to define the hexagonal lattice structure; A spacetime crystal model incorporating symmetry group operations is constructed based on a hexagonal lattice structure.
3. The cable surface defect monitoring method based on image recognition as described in claim 2, characterized in that: The specific steps for locating the boundary points of the Brillouin zone are as follows. Calculate the reciprocal lattice basis vectors based on the lattice basis vectors of the spacetime crystal model, and draw the polygonal boundary of the first Brillouin zone in reciprocal lattice space; Determine the vertex coordinates of the polygon boundary as point Γ, and calculate the height-symmetric path connecting point Γ and its adjacent reciprocal grid points; Mark points K and M on the high-symmetric path as the boundary points of the Brillouin zone.
4. The cable surface defect monitoring method based on image recognition as described in claim 3, characterized in that: The marking of potential defect areas follows these steps. Extract the group representation matrix of the spacetime crystal model at the boundary points of the Brillouin zone, solve for the eigenvalues of the group representation matrix, and calculate the standard deviation of the eigenvalues. The statistical threshold is obtained by fitting the probability density of the standard deviation of the eigenvalues using the kernel density estimation method. Compare the standard deviation of the feature values with the statistical threshold, and mark the abnormal spatial coordinates of feature values whose standard deviation exceeds the statistical threshold; Topological connectivity analysis is performed on continuous anomalous spatial coordinates to generate closed boundary regions as potential defect regions.
5. The cable surface defect monitoring method based on image recognition as described in claim 4, characterized in that: The specific steps for generating the equivalent divergence distribution map representing the defect features are as follows. Calculate the horizontal and vertical partial derivative matrices of the grayscale image within the potential defect region; The horizontal and vertical partial derivative matrices are merged to form a gradient vector field. The two-dimensional divergence value of the gradient vector field is calculated, and a mapping distribution map of spatial coordinates and divergence values is generated as an equivalent divergence distribution map.
6. The cable surface defect monitoring method based on image recognition as described in claim 5, characterized in that: The specific steps for retrieving the three-dimensional defect morphology and depth distribution of the potential defect region are as follows. Obtain depth measurement data and divergence values at corresponding locations for defect samples in the potential defect region; Establish a mapping relationship between divergence values and depth measurement data, and generate a calibration relationship curve; Based on the calibration relationship curve, the divergence value of the current detected target is mapped to the depth estimate, and the Poisson equation is established with the depth estimate as the boundary condition. The three-dimensional depth field is obtained by iteratively solving the Poisson equation using the finite difference method, and the three-dimensional defect morphology and depth distribution corresponding to the three-dimensional depth field are output.
7. The cable surface defect monitoring method based on image recognition as described in claim 6, characterized in that: The spatial trajectory tracking refers to the displacement changes based on the symmetry defects between continuous image frames, and the filtering out of abnormal coordinate points through motion consistency analysis.
8. The cable surface defect monitoring method based on image recognition as described in claim 7, characterized in that: The specific steps for outputting the monitoring report are as follows: Integrate the 3D defect morphology verified through spatial trajectory tracking; The depth distribution is matched with a pre-defined defect feature template library to identify the defect type; Based on the defect type, an orthogonal projection plane is selected, and convex hull detection is performed on the spatial point cloud of the three-dimensional defect morphology to extract the boundary point coordinates. Calculate the maximum projection distance between boundary points on the orthogonal projection plane, obtain the length and width parameters, and extract the extreme values of the depth distribution as the depth parameters. The defect type, boundary point coordinates, length parameters, width parameters, and depth parameters are bound to timestamps to generate a structured data report.
Citation Information
Patent Citations
Multi-spectral fusion high-voltage cable defect detection method and system
CN117309885A
Wafer detection method based on Brillouin spectrum and related equipment
CN119643584A