Method for realizing carbon fiber defect detection by using image recognition
By reconstructing the three-dimensional morphology of carbon fiber material holes through multi-angle optical image processing and adaptive light intensity attenuation model, the problem of inaccurate hole volume measurement in traditional detection methods is solved, high-precision hole defect detection and evaluation is achieved, and material quality control capabilities are improved.
Patent Information
- Application Number
- CN202510780910.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-09-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional nondestructive testing methods find it difficult to accurately measure the three-dimensional morphology and volume parameters of pores inside carbon fiber materials. Especially when testing deep holes, optical detection methods face complex light intensity attenuation, which leads to a decrease in the reliability of pore volume measurement results.
By acquiring multi-angle optical images of the surface of carbon fiber composite materials, performing grayscale enhancement and noise filtering, identifying the reflected light intensity distribution in the hole area, simulating the beam propagation path, building an adaptive light intensity attenuation model, reconstructing the three-dimensional morphology of the hole, performing voxel processing and establishing a high-precision grid model, collecting internal hole data for correction and defect volume measurement, and evaluating measurement uncertainty.
It achieves accurate detection and evaluation of hole defects in carbon fiber composite materials, provides a reliable basis for evaluating the structural integrity of materials, and improves the quality control level of composite materials.
Smart Images

Figure CN120707490A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a method for realizing carbon fiber defect detection by utilizing image recognition. Background Art
[0002] Carbon fiber composites are core structural materials in high-end manufacturing sectors such as aerospace, automotive, and new energy. Internal defect detection is directly related to product safety and reliability. Voids are one of the most common and most detrimental internal defects in carbon fiber materials. Accurately measuring their three-dimensional morphology and volumetric parameters is crucial for material quality assessment. Traditional nondestructive testing methods generally suffer from insufficient resolution when dealing with internal pores in carbon fiber materials, making it difficult to accurately capture the complex geometry of pores. Ultrasonic testing is susceptible to interference from material anisotropy, while X-ray testing performs poorly in acquiring depth information. While optical testing offers the advantage of high resolution, it suffers from a sharp drop in light intensity when inspecting deep holes. The irregular shape of pores in carbon fiber materials results in complex curved surface features on the inner wall, with varying normal vectors and surface roughness at different locations. When light enters a hole for deep detection, the interaction between the beam and the inner wall becomes extremely complex, and the reflection angle on the inner wall changes dynamically with the changing shape of the hole. This variation in reflection angle directly affects the light propagation path and energy distribution, resulting in nonlinear variations in the intensity of the returned light signal at different depths. Crucially, the uncertainty of the reflection angle blurs the mapping relationship between light intensity and hole geometry. Traditional linear light intensity attenuation models cannot accurately describe this complex optical behavior. When this mapping relationship deviates, the three-dimensional hole topography reconstructed based on light intensity information will suffer from systematic errors, ultimately significantly reducing the reliability of the hole volume measurement results. Therefore, achieving accurate hole volume measurement has become a key issue in the development of carbon fiber material defect detection technology. Summary of the Invention
[0003] The present invention provides a method for detecting carbon fiber defects using image recognition, which mainly includes:
[0004] Acquire multi-angle optical images of the carbon fiber composite material surface, perform grayscale enhancement and noise filtering, identify the distribution of reflected light intensity in the hole area, obtain the spatial distribution characteristics and gradient changes of the light intensity signal through light intensity statistical analysis, and determine the hole boundary outline and initial depth information;
[0005] The hole boundary contour and initial depth information are geometrically reconstructed to obtain the surface normal vector of the hole inner wall, the angle between the incident light and the hole inner wall is calculated, the propagation path of the light beam inside the hole is simulated, the angle change is identified, and the angle change correction coefficient matrix is obtained;
[0006] The hole depth-to-diameter ratio is obtained based on the angle variation correction coefficient matrix. If the depth-to-diameter ratio is greater than a preset threshold, an angle-dependent attenuation parameter is introduced to obtain a corrected light intensity-to-depth mapping relationship.
[0007] The three-dimensional morphological data of the hole is constructed through the corrected light intensity-depth mapping relationship, the internal spatial structure of the hole is identified, voxel discretization is performed, the voxel unit and its light intensity response characteristics are obtained, and the internal geometric boundary of the hole is determined;
[0008] A three-dimensional mesh model is established based on the internal geometric boundaries of the hole, and the complex curvature areas of the hole wall are identified. The adaptive mesh refinement technology is used to locally encrypt the complex curvature areas to obtain a high-precision mesh structure and judge the mesh quality.
[0009] Randomly collect the voxel unit distribution density and defect area spatial coordinate information inside the hole, correct the collected data, and obtain the accurate volume measurement results of the hole defect and measurement uncertainty evaluation based on the difference in voxel unit material density;
[0010] Based on the volume measurement results and measurement uncertainty evaluation, a hole defect quality evaluation index is established. Combined with the grid quality evaluation, the structural integrity of carbon fiber composite materials is comprehensively evaluated, and a carbon fiber defect grade classification standard is established.
[0011] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:
[0012] The present invention discloses a method for carbon fiber defect detection using image recognition. The method obtains multi-angle optical images of the material surface, performs image processing and light intensity analysis, and identifies hole boundaries and initial depth information. The hole is then geometrically reconstructed, the light beam propagation path is simulated, and an adaptive light intensity attenuation model is constructed. The three-dimensional morphology of the hole is reconstructed using the corrected light intensity-depth mapping relationship, voxelized, and a high-precision grid model is established. Finally, internal hole data is collected, the defect volume is corrected and measured, the measurement uncertainty is evaluated, and defect quality evaluation indicators and classification standards are established. The present invention achieves accurate detection and evaluation of hole defects in carbon fiber composite materials, provides a reliable basis for evaluating the structural integrity of the material, and is of great significance to improving the quality control level of composite materials. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 The present invention is a flowchart of a method for realizing carbon fiber defect detection by using image recognition.
[0014] Figure 2 The figure is a schematic diagram of a method for detecting carbon fiber defects using image recognition according to the present invention. DETAILED DESCRIPTION
[0015] To further understand the content of the present invention, the present invention is described in detail with reference to the accompanying drawings and examples. The present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the invention are shown in the accompanying drawings.
[0016] like Figure 1-2 In this embodiment, a method for realizing carbon fiber defect detection by using image recognition may specifically include:
[0017] Step S101: Acquire multi-angle optical images of the carbon fiber composite material surface, perform grayscale enhancement and noise filtering, identify the distribution of reflected light intensity in the hole area, obtain the spatial distribution characteristics and gradient changes of the light intensity signal through light intensity statistical analysis, and determine the hole boundary contour and initial depth information.
[0018] Optical images of the carbon fiber composite material surface at three angles, 0°, 45°, and 90°, are acquired. Grayscale histogram equalization is performed on the optical images. The contrast parameter is adjusted according to the distribution range of pixel grayscale values to obtain a grayscale enhanced image. A Gaussian filter is then used to perform a convolution operation on the grayscale enhanced image. The center pixel is replaced with a weighted average value calculated based on the pixel values within a preset neighborhood to obtain a de-noised image. The de-noised image is then binarized and segmented. Pixels with grayscale values less than 70% of the average grayscale value of the material surface are marked as candidate holes. The reflected light intensity value of each pixel in the candidate hole area is calculated based on the linear relationship between pixel grayscale value and incident light intensity (I=k×G), where I is the reflected light intensity value, G is the grayscale value, and k is the calibration coefficient. The distribution frequency of the light intensity values in the x and y directions is then statistically analyzed to construct a two-dimensional distribution matrix of reflected light intensity, in which each element in the distribution matrix represents the mean light intensity value at the corresponding spatial position. The light intensity difference between adjacent pixels is calculated according to the two-dimensional distribution matrix of the reflected light intensity. The horizontal gradient component Gx is calculated using the Sobel operator in the x direction, and the vertical gradient component Gy is calculated using the Sobel operator in the y direction. The formula G=√(Gx 2 +Gy 2 ) synthesizes a gradient amplitude image, where pixels with gradient amplitudes greater than 1.5 times the mean gradient amplitude are connected to form the hole boundary contour line. A light intensity distribution sequence is extracted along the gradient direction of each pixel on the hole boundary contour line. A depth-intensity relationship z = h × ln(I0 / I) is established based on Lambert's cosine law, where z represents the depth value, h is the material correlation coefficient, I0 is the incident light intensity, and I is the reflected light intensity. This relationship is used to calculate the depth value of each point on the contour line and its normal extension point, and interpolation is used to generate three-dimensional topographic data of the hole area.
[0019] For example, in the non-destructive testing of carbon fiber composite materials, multi-angle optical imaging technology provides an important means for the accurate identification of hole defects.
[0020] It's important to note that selecting three angles for image acquisition, 0°, 45°, and 90°, is particularly significant: 0° vertical illumination captures reflections from the hole bottom, 45° oblique illumination captures light and shadow variations on the hole sidewalls, and 90° parallel illumination identifies the contours of the hole edge. This multi-angle acquisition eliminates blind spots associated with single-angle imaging and improves defect detection integrity. Grayscale histogram equalization plays a key role in this process.
[0021] Specifically, this technology redistributes the image's grayscale levels, expanding pixel values originally concentrated within a specific grayscale range across the entire grayscale space. For dark areas on the carbon fiber surface, equalization enhances contrast, making the grayscale difference between the hole area and the normal surface more pronounced. The Gaussian filter, leveraging its excellent noise suppression properties, effectively removes random noise from the image acquisition process by performing a weighted average of pixel values within a neighborhood, while maintaining the clarity of the hole edges.
[0022] In one possible implementation, the determination of the binary segmentation threshold uses 70% of the average grayscale value of the material surface as the dividing point. The selection of this ratio is based on the optical properties of carbon fiber materials: the normal surface has a higher reflectivity, while the grayscale value of the hole area is significantly reduced due to light scattering and absorption. Through this adaptive threshold method, the hole area and the normal surface can be effectively distinguished. The calculation of the reflected light intensity value follows the linear relationship of I=k×G, where the calibration coefficient k is obtained through a preliminary light intensity-grayscale calibration experiment to ensure the accuracy of the light intensity calculation. The application of the Sobel operator in gradient calculation embodies the core idea of edge detection. The operator can accurately capture the spatial change rate of light intensity by performing convolution operations in the x and y directions respectively. Gradient amplitude G=√(Gx 2 +Gy 2 ) calculation combines the gradient information in both directions to form a complete edge intensity map. Using 1.5 times the mean gradient amplitude as the contour extraction threshold effectively suppresses pseudo-edges caused by noise while ensuring the complete extraction of the true hole boundary.
[0023] Preferably, the acquisition of depth information is based on the relationship z = h × ln (I0 / I) established by Lambert's cosine law. This law describes the law that the light intensity of the diffuse reflection surface is proportional to the cosine of the incident angle, and has good applicability to the depth change inside the hole. The material correlation coefficient h reflects the optical absorption characteristics of the carbon fiber material and is obtained by calibration with a standard sample of known depth. The method of extracting the light intensity sequence along the gradient direction of the contour line ensures the consistency of the depth calculation path and the hole morphology, and finally generates complete three-dimensional morphology data through interpolation technology, which provides a quantitative basis for subsequent defect evaluation.
[0024] In step S102 , the hole boundary contour and initial depth information are geometrically reconstructed to obtain the hole inner wall surface normal vector, the angle between the incident light and the hole inner wall is calculated, the propagation path of the light beam inside the hole is simulated, the angle change is identified, and the angle change correction coefficient matrix is obtained.
[0025] A three-dimensional point cloud is constructed based on the coordinates of the hole boundary contour points and their corresponding depth values. This point cloud data is meshed using the Delaunay triangulation algorithm to generate a triangular mesh surface for the hole's inner wall. For each triangular element, the coordinates of the three vertices are extracted, and the cross product of the two edge vectors is calculated and normalized to obtain the unit normal vector for that triangular element. An incident light source is positioned at a preset height directly above the hole. The three-dimensional coordinates of the light source and the coordinates of the center points of each triangular element in the triangular mesh surface are obtained. A direction vector pointing from the light source to each center point is calculated as the incident ray vector. The cosine value is obtained by performing a dot product operation between the incident ray vector and the corresponding unit normal vector. The incident angle distribution is determined using the inverse cosine function. Ray tracing is performed based on this incident angle distribution and the laws of optical propagation. When the incident angle is greater than the total reflection angle determined by the material's refractive index, the reflection direction is calculated according to the law of reflection. When the incident angle is less than the total reflection angle, the refraction direction is calculated according to the law of refraction. The incident angle values at each position during the propagation of the light along the hole's inner wall are recorded to form an angle variation dataset. The angle sequence corresponding to each triangular unit is extracted from the angle change data set, and the difference between the actual incident angle of each unit and the vertical incident angle is calculated as the angle deviation. According to the cosine compensation principle, a correction coefficient calculation formula k = 1 / cos (deviation angle) is established, and an angle change correction coefficient matrix corresponding to each triangular mesh unit is constructed.
[0026] For example, constructing a three-dimensional point cloud of hole boundary contour points and depth values is the basis for achieving accurate geometric reconstruction.
[0027] It's important to note that these point cloud data typically contain thousands of sample points, each with x, y, and z coordinate information. The Delaunay triangulation algorithm plays a key role in this process, generating a triangular mesh that satisfies the empty circle criterion: the circumcircle of any triangle contains no other vertices, thus ensuring mesh quality and uniformity.
[0028] In one possible implementation, the normal vector is calculated using a vector cross product. For each triangular element, the three vertices P1, P2, and P3 are selected, and the edge vectors V1 = P2 - P1 and V2 = P3 - P1 are calculated. The normal vector is then obtained through a cross product N = V1 × V2, and then normalized to a length of 1. This method accurately reflects the local geometric features of the hole's inner wall, providing precise surface orientation information for subsequent ray tracing. The setting of the light source position has a significant impact on the entire optical inspection process.
[0029] Specifically, setting the light source at a preset height directly above the hole can ensure that the light hits the bottom of the hole at an approximately vertical angle, reducing the shadow area caused by large-angle incidence. The calculation of the incident light vector is achieved through simple vector subtraction: subtract the coordinates of the triangle center point from the light source coordinates, and the resulting vector is the incident direction. The dot product operation cos(θ) = L·N calculates the angle of incidence, where L is the normalized incident light vector and N is the surface normal vector. The propagation of light inside the hole follows basic optical laws.
[0030] For example, when light travels from air toward the surface of a carbon fiber material, it undergoes both reflection and refraction. The angle of total reflection is determined by the material's refractive index. For carbon fiber composites, the refractive index is approximately 1.6, corresponding to a total reflection angle of approximately 38.7 degrees. When the angle of incidence exceeds this critical value, the light is completely reflected; below this critical value, some of the light is refracted into the material, while some is reflected. By tracing the propagation path of each ray, information on angular variations at different locations can be obtained.
[0031] Preferably, the calculation of the angle change correction coefficient is based on the cosine compensation principle. This principle takes into account the effect of reduced energy density of oblique light relative to vertical incidence. When the light is incident at an angle θ, the light energy received per unit area is reduced in proportion to cos(θ). Therefore, the correction coefficient k = 1 / cos(θ) can compensate for this angle effect. By constructing a correction coefficient matrix corresponding to each triangular grid unit, accurate correction of the light intensity distribution in the entire hole area is achieved, thereby improving the accuracy of depth measurement. This point-by-point correction method can effectively eliminate the light intensity changes caused by the geometric shape of the hole, providing a reliable basis for subsequent quantitative defect assessment.
[0032] Step S103 , obtaining the hole aspect ratio according to the angle variation correction coefficient matrix. If the aspect ratio is greater than a preset threshold, an angle-dependent attenuation parameter is introduced to obtain a corrected light intensity-depth mapping relationship.
[0033] The correction coefficient values corresponding to each grid cell are extracted from the angle variation correction coefficient matrix. The maximum hole diameter D is determined based on the hole boundary contour. The maximum hole depth H is obtained from the three-dimensional topography data of the hole area. The depth-to-diameter ratio R is calculated, where R is equal to H divided by D. A parameter data set containing the depth-to-diameter ratio and the corresponding position correction coefficients is constructed. The average correction coefficient value is obtained by summing all the correction coefficients in the parameter data set and dividing it by the number of coefficients. An exponential light intensity attenuation relationship is established. If the depth-to-diameter ratio R is greater than a preset depth-to-diameter ratio threshold, the angle-dependent attenuation parameter β is determined based on the product of the depth-to-diameter ratio and the average correction coefficient. A quadratic attenuation component is added to the original exponential attenuation. The light intensity values at different hole depths are calculated using the light intensity attenuation relationship including the angle-dependent attenuation parameter. A mapping relationship from light intensity to depth is established through inverse function calculation, resulting in a corrected light intensity-depth mapping relationship.
[0034] For example, the construction of the angle variation correction coefficient matrix provides a key data basis for aspect ratio calculation.
[0035] In one possible implementation, the matrix contains the angle correction values of each triangular mesh unit in the hole. These values reflect the degree of influence of the incident angle of light at different positions on the light intensity. After extracting the correction coefficient from the matrix, the geometric characteristic parameters of the hole need to be determined. The maximum diameter D of the hole is obtained by traversing the distance between all pairs of points on the boundary contour, while the maximum depth H is determined from the minimum z-coordinate value of the three-dimensional morphology data. The calculation of the aspect ratio R directly reflects the morphological characteristics of the hole. When the R value is large, it indicates that the hole is deep and narrow, and the propagation of light inside it is more complicated. The calculation process of the average correction coefficient reflects the statistical analysis of the overall optical properties.
[0036] Specifically, the correction coefficients for all grid cells are accumulated and divided by the total number of cells. The resulting average represents the overall deviation of light propagation within the hole. This average, multiplied by the aspect ratio, forms the angle-dependent attenuation parameter β, which quantifies the additional effect of the hole geometry on light intensity attenuation. When the aspect ratio exceeds a preset threshold, indicating that the hole depth is large relative to the diameter, sidewall reflections and multiple scattering effects are significantly enhanced, necessitating additional attenuation correction.
[0037] It should be noted that the exponential light intensity decay relationship is based on the Beer-Lambert law, which describes the intensity decay of light as it propagates through a medium. In shallow holes, light intensity decays exponentially with depth. However, for deep holes, the exponential term alone is insufficient to accurately describe the complex optical phenomena. Adding a quadratic attenuation component improves the fit to the actual measured data, particularly at the bottom of the hole, where the contribution of the quadratic term becomes significant. This segmented processing approach ensures both the accuracy of shallow hole measurements and the reliability of deep hole inspection.
[0038] Preferably, the corrected light intensity-depth mapping relationship is obtained through an inverse function operation. The original attenuation relationship describes the mapping from depth to light intensity, while in actual detection, the depth needs to be inferred based on the measured light intensity value. The inverse function operation process involves logarithmic transformation and algebraic solution, and the final mapping relationship can directly convert the detected light intensity signal into depth information. The establishment of this mapping relationship takes into account the influence of the angle effect. Compared with traditional linear or simple exponential mapping, it can significantly improve the deep hole measurement accuracy, especially for deep hole structures with a depth-to-diameter ratio greater than 0.8, the measurement error can be reduced by more than 30%. Through this adaptive light intensity attenuation modeling method, accurate quantitative detection of hole defects of different shapes is achieved.
[0039] Step S104 , constructing the three-dimensional morphology data of the hole through the corrected light intensity-depth mapping relationship, identifying the internal spatial structure of the hole, performing voxel discretization processing, obtaining the voxel unit and its light intensity response characteristics, and determining the internal geometric boundary of the hole.
[0040] The light intensity values of each pixel within the hole region in the inspection image are depth-converted using the corrected light intensity-depth mapping relationship. A three-dimensional coordinate point set is constructed based on the pixel's row and column coordinates in the image and the calculated depth value. The sparse point set is encrypted using cubic spline interpolation to generate dense three-dimensional hole topography data. The minimum circumscribed cube of the hole space is determined based on the coordinate range of all points in the three-dimensional hole topography data. The cube space is uniformly gridded, with the voxel size being 1% of the cube's side length. Each grid cell is defined as a voxel. A determination is made as to whether the voxel center lies within the topography data point cloud. If so, the voxel is marked as a valid voxel, resulting in a discretized representation of the hole's spatial structure. For each valid voxel, the light intensity value at the corresponding spatial location is extracted from the original inspection data. The mean squared difference between the light intensity values of the voxel and its six neighboring voxels is calculated as a characteristic difference. If the characteristic difference exceeds twice the mean difference of all voxels, the voxel is determined to be located at a material interface. A region growing algorithm is then used to connect adjacent interface voxels to form a continuous internal geometric boundary surface of the hole.
[0041] For example, the corrected intensity-depth mapping relationship plays a core role in three-dimensional shape reconstruction.
[0042] It's important to note that this mapping relationship already accounts for angular effects and the influence of aspect ratio, accurately converting light intensity information from a 2D image into 3D depth information. For each pixel in the detected image, its light intensity value is converted to a depth value through this mapping relationship. Combined with the pixel's row and column coordinates in the image, this forms a complete 3D coordinate description. This conversion process accurately reconstructs 2D optical information into 3D geometric information. The application of cubic spline interpolation solves the problem of uneven distribution of the original data points.
[0043] In one possible implementation, this method ensures the continuity and smoothness of the interpolated surface at the data points by constructing a piecewise cubic polynomial. For areas with large curvature variations, such as hole edges, spline interpolation accurately captures geometric features. In relatively flat areas, such as hole bottoms, the interpolated result maintains good smoothness. The densified point cloud data provides sufficient geometric information for subsequent voxelization processing, which converts continuous 3D topographic data into a discrete spatial representation.
[0044] Specifically, the minimum circumscribed cube is determined by scanning the coordinate extremes of all topographic data points, forming a regular spatial range that encompasses the entire hole. Using one percent of the cube's side length as the voxel size ensures sufficient spatial resolution while avoiding the computational burden of over-subdivision. Determining whether a voxel is within the point cloud is done by calculating the distance from the voxel center to its nearest neighbor. A voxel is considered valid if the distance is less than half the length of the voxel's diagonal.
[0045] Preferably, the calculation of the light intensity feature difference adopts the six-neighborhood analysis method. Each voxel is compared with the light intensity values of its six adjacent voxels above, below, left, right, front and back, and the calculated mean square error can comprehensively reflect the degree of change in local light intensity. This neighborhood analysis method is particularly effective for identifying material interfaces, because at the junction of the hole and the base material, the optical properties will mutate, resulting in a significant increase in the light intensity difference between adjacent voxels. Setting the difference threshold to twice the mean difference of all voxels can effectively distinguish between normal light intensity gradients and mutations at the interface. The application of the region growing algorithm in boundary surface construction ensures the continuity and integrity of the boundary. Starting from the identified interface voxel, the algorithm gradually connects the adjacent interface voxels to form a continuous boundary surface. The 26-neighborhood connectivity of the voxel is taken into account during the growth process, ensuring the accurate reconstruction of the boundary of complex-shaped holes. The geometric boundary constructed by this method not only accurately reflects the true shape of the hole, but also provides an accurate geometric model basis for subsequent defect assessment and structural analysis.
[0046] In step S105 , a three-dimensional mesh model is established based on the internal geometric boundary of the hole, the complex curvature area of the hole wall is identified, and the complex curvature area is locally encrypted using adaptive mesh refinement technology to obtain a high-precision mesh structure, and the mesh quality is determined.
[0047] According to the voxel representation of the geometric boundary surface inside the hole, the coordinates of the center points of the boundary voxels are extracted as the boundary point cloud, and the boundary point cloud is meshed using the Delaunay triangulation algorithm to generate an initial three-dimensional mesh model containing vertex coordinates and triangle connection relationships. For each triangular unit of the initial three-dimensional mesh model, the angle between its normal vector and the normal vectors of all adjacent triangles sharing the edge is calculated. If any angle is greater than the upper limit of the normal vector change angle corresponding to the typical curvature of the material surface, the triangular unit is marked as a complex curvature unit, and the connected complex curvature units are counted to form a set of areas to be refined. For each triangular unit in the set of areas to be refined, the lengths of the three sides are calculated, a new vertex is inserted at the midpoint of the longest side, and the new vertex and the diagonal vertex are connected to generate two new triangles. The two triangles are then subdivided to obtain two sub-triangles each. When the length of the longest side of all newly generated triangles is less than one-quarter of the initial average side length, refinement is stopped to obtain a high-precision mesh structure after local encryption. The ratio of the longest side to the shortest side of each triangle in the high-precision mesh structure is calculated as the aspect ratio, and the minimum of the three internal angles is calculated. If the aspect ratio exceeds 3 or the minimum internal angle is less than 20 degrees, the triangle is judged to be of unqualified quality. The mesh quality is judged based on the proportion of unqualified triangles to the total number.
[0048] For example, the voxel representation of the internal geometric boundary of the hole provides a discretized geometric information basis for three-dimensional mesh construction.
[0049] It should be noted that the process of extracting the voxel center point is essentially to convert discrete volume elements into point cloud data, and the center point coordinates of each boundary voxel represent the geometric position of the local area.
[0050] The Delaunay triangulation algorithm demonstrates unique advantages in this process. By maximizing the minimum angle of all triangles, it generates a mesh with excellent shape quality, avoiding the occurrence of narrow triangles and laying a solid foundation for subsequent curvature analysis. The relationship between the normal vector angle and curvature embodies the fundamental principles of differential geometry.
[0051] In one possible implementation, when the angle between the normal vectors of adjacent triangular units is large, it indicates that the surface of the area has been sharply bent. For hole detection in carbon fiber composite materials, the upper limit of the normal vector change angle corresponding to the typical curvature of the material surface is usually determined according to the material processing technology, generally around 30 degrees. Areas exceeding this angle often correspond to the transition area of the hole edge or the irregular deformation inside. These complex curvature areas require a denser mesh to accurately express their geometric characteristics. The specific implementation process of mesh refinement adopts a recursive subdivision strategy.
[0052] Specifically, for each triangle to be refined, the lengths of the three sides are first calculated, and the longest side is selected for midpoint insertion. This selection ensures that the refinement process prioritizes improving the triangles with the worst shape quality. After the new vertex is inserted, the original triangle is divided into four sub-triangles: two are formed by the new vertex and two vertices of the original triangle, and the other two are obtained by connecting the new vertex and the diagonal vertex. The refinement termination condition is set to a side length that is less than one-quarter of the initial average side length. This ratio ensures a sufficient degree of refinement while avoiding the computational burden brought by over-refinement.
[0053] Preferably, two key indicators are used for mesh quality assessment. The aspect ratio indicator reflects the regularity of the shape of the triangle. When the ratio of the longest side to the shortest side exceeds 3, it means that the triangle is obviously long and narrow. This shape is prone to large errors in numerical calculations. The minimum internal angle indicator evaluates the quality of the triangle from another perspective. When the minimum internal angle is less than 20 degrees, it indicates that the triangle is close to a degenerate state. These two indicators complement each other and together constitute a comprehensive evaluation standard for mesh quality. By counting the proportion of unqualified triangles, an objective evaluation of the overall mesh quality can be made. When the proportion of unqualified triangles is less than 5%, the mesh quality can be considered to meet the requirements of subsequent analysis. This quality control method ensures the reliability of subsequent optical simulations and structural analyses based on the mesh.
[0054] Step S106 , randomly collect the voxel unit distribution density inside the hole and the spatial coordinate information of the defect area, correct the collected data, and obtain the accurate volume measurement result of the hole defect and the measurement uncertainty assessment based on the difference in voxel unit material density.
[0055] A Monte Carlo random sampling method is used to extract voxel unit samples from the voxelized pore spatial structure. The three-dimensional spatial coordinates and light intensity response value of each sampled voxel are recorded. The ratio of the number of valid voxels in the sampling area to the total number of voxels in the area is calculated as the local distribution density. If the distribution density is less than 70% of the density value of the complete area of the carbon fiber composite material, the voxel is marked as a defective voxel. The angle change correction coefficient corresponding to the spatial coordinates of the defective voxel is obtained. The original light intensity value of the defective voxel is compensated and calculated according to the correction coefficient to obtain a corrected light intensity value. The corrected light intensity value I is converted into a material density value ρ using a pre-calibrated light intensity-density conversion relationship ρ = k × I + ρ0, where k is the conversion coefficient and ρ0 is the reference density, to obtain a density-corrected defective voxel set. The density value and voxel unit volume of each voxel are extracted from the density-corrected defect voxel set, the difference between the standard density of the matrix and the actual density of the voxel is calculated and multiplied by the voxel unit volume to obtain the defect volume of a single voxel, the defect volume of all defective voxels is accumulated to obtain the total volume of the hole defect, multiple independent sampling processes are performed and the standard deviation of each measurement result is calculated as the measurement uncertainty.
[0056] For example, the application of Monte Carlo random sampling method in hole defect detection reflects the ingenious application of statistical principles.
[0057] In one possible implementation, this method determines the sampling location by generating uniformly distributed random numbers, ensuring that each voxel has an equal probability of being selected. This randomness ensures that the sampling results truly reflect the characteristic distribution of the entire hole area. For carbon fiber composites, due to the possibility of local density inhomogeneities during the manufacturing process, random sampling can avoid systematic bias and provide more reliable statistical results. The calculation of local distribution density reveals the microstructural characteristics within the material.
[0058] Specifically, within a cubic sampling area, the number of valid voxels is counted and divided by the total number of primes that the area can accommodate. The resulting ratio is the local distribution density. When this density value is less than 70% of the complete material density, it indicates that the area has significant material missing or loose. This 70% threshold was determined based on extensive experimental data and can both identify true defects and exclude normal density fluctuations.
[0059] It should be noted that the angle change correction coefficient plays a key role in light intensity correction. When light hits the inner wall of the hole at different angles, the reflected light intensity will attenuate due to the change in the incident angle. The correction coefficient is pre-calculated based on the geometric characteristics of each voxel position and stored in the angle change correction coefficient matrix. By multiplying the original light intensity value by the correction coefficient of the corresponding position, the influence of the angle effect can be eliminated and more accurate material property information can be obtained. The light intensity-density conversion relationship ρ = k × I + ρ0 is established based on the optical properties of the material.
[0060] Preferably, the conversion coefficient k is obtained by calibration of standard samples: prepare carbon fiber composite samples of different known densities, measure their reflected light intensity under the same lighting conditions, and determine the k value by linear fitting. The reference density ρ0 represents the theoretical density value when the light intensity is zero, which is usually close to the air density. This linear relationship has good accuracy within a certain density range and can meet the needs of engineering detection. The precise calculation of the defect volume adopts the difference method principle. The difference between the actual density of each defective voxel and the standard density of the matrix reflects the degree of material loss at that location. Multiply this density difference by the geometric volume of the voxel to obtain the defect volume corresponding to the voxel. By accumulating the contributions of all defective voxels, the total volume of the entire hole is obtained. The implementation of multiple independent sampling ensures the reliability of the measurement results: each sampling selects a different random seed to generate a different set of sampling points, and the calculated volume measurement values will have slight differences. The standard deviation of these differences directly reflects the uncertainty of the measurement method and provides a quantitative basis for evaluating the detection accuracy.
[0061] Step S107 , establishing a hole defect quality evaluation index based on the volume measurement results and the measurement uncertainty assessment, and comprehensively evaluating the structural integrity of the carbon fiber composite material in combination with the mesh quality assessment to establish a carbon fiber defect grade classification standard.
[0062] The signal-to-noise ratio is calculated by dividing the total volume of hole defects by the measurement standard deviation. The defect rate is calculated as the percentage of the defect volume to the volume of the inspection area. The error weight coefficient is determined by the inverse of the signal-to-noise ratio. The defect rate and the error weight coefficient are multiplied together to obtain the quality evaluation indicator Q value that reflects the measurement reliability. The quality evaluation indicator Q value and the percentage of unqualified triangles in the mesh quality judgment results are obtained. The geometric accuracy score is assigned a continuous value from 1 to 0 based on the percentage from low to high. A weighted calculation is performed using a volume weight of 0.7 and a geometric weight of 0.3 to obtain a comprehensive structural integrity evaluation score S. The defect level is determined by comparing the comprehensive evaluation score S with the industry standard threshold. If S is less than 0.3, it is judged as a level 1 minor defect; if S is between 0.3 and 0.7, it is judged as a level 2 moderate defect; if S is greater than 0.7, it is judged as a level 3 severe defect. A carbon fiber defect level classification standard is established.
[0063] For example, the application of signal-to-noise ratio in hole defect evaluation embodies the quantitative idea of measurement reliability.
[0064] It should be noted that the signal-to-noise ratio (SNR) is calculated by dividing the defect volume by the measurement standard deviation. Its physical meaning is to reflect the strength of the measurement signal relative to the noise. A high SNR indicates that the measurement results are less affected by random errors and the test data is more reliable. The inverse of the SNR, used as an error weighting factor, can reasonably reduce the impact of test results with large measurement uncertainties in quality assessment. The calculation of the defect rate reveals a quantitative method for characterizing the extent of damage.
[0065] In one possible implementation, the inspection area volume is determined by the optical imaging field of view and the maximum inspection depth, forming a cubic inspection space. The defect rate is the percentage of the defect volume within this inspection space. This relative representation eliminates differences between samples of different sizes, making the evaluation criteria universally applicable. Multiplying the defect rate by the error weight coefficient yields the quality evaluation metric Q, which reflects both the severity of the defect and the reliability of the measurement. The geometric accuracy score is assigned using a continuous mapping method.
[0066] Specifically, when the percentage of unqualified triangles in a mesh is zero, the geometric accuracy score is 1, indicating perfect mesh quality. As the percentage increases, the score decreases linearly, and when the percentage reaches 100%, the score drops to 0. This continuous assignment method avoids the boundary effects caused by discrete grading and can more finely reflect the gradual characteristics of mesh quality.
[0067] Preferably, the setting of weight coefficients 0.7 and 0.3 is based on engineering practice experience. The impact of volume defects on material properties is usually more significant than surface geometric accuracy, so a higher weight of 0.7 is given. Although the weight of geometric accuracy is lower, it is still important for certain stress concentration-sensitive application scenarios, so a weight of 0.3 is retained. This weight distribution not only highlights the main factors, but also takes into account the influence of secondary factors. The three-level classification standard for defect levels has clear engineering guidance significance. Level 1 minor defects correspond to situations where the comprehensive evaluation score is less than 0.3. Such defects usually do not affect the normal use of the structure and only require regular monitoring. Level 2 moderate defects correspond to scores between 0.3 and 0.7, indicating that the structural performance has declined and reinforcement measures or shortened maintenance cycles are required. Level 3 serious defects correspond to scores greater than 0.7, which means that the structural integrity is seriously threatened and must be immediately decommissioned and repaired or replaced. This grading method provides a scientific basis for maintenance decisions of carbon fiber composite materials, helps to optimize the allocation of maintenance resources, and extend the service life of materials.
[0068] The above is only a preferred embodiment of the present invention. It should be pointed out that ordinary technicians in this technical field can make several improvements and supplements without departing from the principles of the present invention. These improvements and supplements should also be regarded as the scope of protection of the present invention.
Claims
1. A method for detecting carbon fiber defects using image recognition, characterized in that: include: Acquire a multi-angle optical image of the surface of the carbon fiber composite material, perform grayscale enhancement and noise filtering on the multi-angle optical image, identify reflected light intensity distribution data of the hole area, analyze the reflected light intensity distribution data to generate spatial distribution characteristics and gradient changes of the light intensity signal, and extract the hole boundary contour and initial depth information; perform geometric reconstruction based on the hole boundary contour and the initial depth information, determine the angle between the incident light and the surface normal vector of the hole inner wall, simulate the propagation path of the light beam inside the hole, and generate an angle change correction coefficient matrix; extract the hole depth-to-diameter ratio based on the angle change correction coefficient matrix, construct an adaptive light intensity attenuation model, and generate a corrected light intensity-to-depth mapping relationship; The three-dimensional morphological data of the hole is generated through the corrected light intensity-depth mapping relationship, the internal spatial structure of the hole is identified, voxel discretization processing is performed, the voxel units and their light intensity response characteristics are extracted, and the internal geometric boundaries of the hole are determined; a three-dimensional grid model is generated based on the internal geometric boundaries of the hole, the complex curvature areas of the hole wall are identified, adaptive grid refinement processing is performed to generate a high-precision grid structure, and the grid quality of the high-precision grid structure is evaluated; the distribution density of the voxel units inside the hole and the spatial coordinate information of the defect area are collected, the distribution density and the spatial coordinate information are corrected based on the adaptive light intensity attenuation model, the difference in voxel unit material density is analyzed, and the hole defect volume measurement results and measurement uncertainty data are generated; based on the hole defect volume measurement results and the measurement uncertainty data, a hole defect quality evaluation index is generated, the comprehensive score of the carbon fiber composite material structural integrity is calculated, and a carbon fiber defect grade classification standard is constructed.
2. The method for detecting carbon fiber defects using image recognition according to claim 1, wherein: The method of acquiring a multi-angle optical image of the surface of the carbon fiber composite material, performing grayscale enhancement and noise filtering on the multi-angle optical image, and identifying reflected light intensity distribution data of the hole area includes: The method comprises the following steps: collecting optical images of the surface of a carbon fiber composite material at multiple angles; performing grayscale histogram equalization processing on the optical image, adjusting the distribution range of pixel grayscale values of the optical image, and generating a grayscale enhanced image; performing a convolution operation on the grayscale enhanced image, replacing the central pixel based on the weighted average value of pixel values within a neighborhood range, and generating a noise reduction image; performing binary segmentation on the noise reduction image, marking the hole candidate area, calculating the reflected light intensity value of each pixel point in the hole candidate area, counting the distribution frequency of the reflected light intensity value in the spatial direction, and identifying the reflected light intensity distribution data of the hole area.
3. The method for detecting carbon fiber defects using image recognition according to claim 1, wherein: The performing geometric reconstruction based on the hole boundary contour and the initial depth information to determine the angle between the incident light and the normal vector of the hole inner wall surface includes: Generate three-dimensional point cloud data based on the hole boundary outline and the initial depth information; perform gridding processing on the three-dimensional point cloud data to generate a triangular mesh surface of the hole inner wall; for each triangular unit in the triangular mesh surface of the hole inner wall, extract the vertex coordinates, calculate the cross product result of the edge vector, and generate a unit normal vector; obtain the light source position coordinates and the coordinates of the center point of the triangular unit, calculate the direction vector from the light source to the center point, generate a cosine value based on the dot product operation of the direction vector and the unit normal vector, and determine the incident angle value.
4. The method for detecting carbon fiber defects using image recognition according to claim 1, wherein: The step of extracting the hole aspect ratio based on the angle change correction coefficient matrix and constructing an adaptive light intensity attenuation model includes: The correction coefficient of each grid cell is extracted from the angle change correction coefficient matrix; the hole diameter is determined based on the hole boundary contour, the hole depth is extracted in combination with the hole three-dimensional morphology data, and the aspect ratio is calculated; a data set containing the aspect ratio and the correction coefficient is constructed; the average value of the correction coefficient is calculated based on the data set, an exponential light intensity attenuation relationship is generated, and an adaptive light intensity attenuation model is formed.
5. The method for detecting carbon fiber defects using image recognition according to claim 1, wherein: Generating the three-dimensional hole shape data by using the corrected light intensity-depth mapping relationship includes: The light intensity value of each pixel point in the hole area is converted through the corrected light intensity-depth mapping relationship to generate a depth value; a three-dimensional coordinate point set is generated based on the pixel coordinates and the depth value; interpolation processing is performed on the three-dimensional coordinate point set to generate dense hole three-dimensional morphology data; based on the hole three-dimensional morphology data, the spatial range is determined, the voxel grid is divided, the valid voxels are marked, and a discretized hole spatial structure representation is generated to obtain the hole three-dimensional morphology data.
6. The method for detecting carbon fiber defects using image recognition according to claim 1, wherein: The generating of a three-dimensional grid model based on the internal geometric boundary of the hole and identifying the complex curvature area of the hole wall includes: A boundary point cloud is extracted based on the internal geometric boundary of the hole; meshing is performed on the boundary point cloud to generate an initial three-dimensional mesh model; for each triangular unit of the initial three-dimensional mesh model, the angle between its normal vector and the normal vector of the adjacent triangle is calculated, and complex curvature units are marked.
7. The method for detecting carbon fiber defects using image recognition according to claim 1, wherein: The collecting the distribution density of the voxel units inside the hole and the spatial coordinate information of the defect area, and correcting the distribution density and the spatial coordinate information based on the adaptive light intensity attenuation model, includes: Voxel unit samples are randomly extracted from the hole space structure, and the coordinates and light intensity response values of the voxel unit samples are recorded; the distribution density of the voxel unit samples is calculated, and the defective voxels are marked; the correction coefficients of the defective voxels are extracted from the angle change correction coefficient matrix, and the light intensity values of the defective voxels are corrected; the material density values of the defective voxels are calculated through the light intensity and density conversion relationship, and a density-corrected defective voxel set is generated.
8. The method for detecting carbon fiber defects using image recognition according to claim 1, wherein: The method of generating a hole defect quality evaluation index based on the hole defect volume measurement result and the measurement uncertainty data, calculating a comprehensive score of the carbon fiber composite material structural integrity, and constructing a carbon fiber defect grade classification standard includes: The signal-to-noise ratio and defect rate are calculated using the hole defect volume measurement results and the measurement uncertainty data to generate a quality evaluation index; the quality evaluation index and the unqualified triangle ratio data in the mesh quality assessment are obtained, and a geometric accuracy score is assigned; a weighted calculation is performed on the quality evaluation index and the geometric accuracy score based on the volume weight and the geometric weight to generate a comprehensive structural integrity score; the defect grade is determined based on the comprehensive structural integrity score, and a carbon fiber defect grade classification standard is constructed.
Citation Information
Cited By
Film lamination defect detection method and system based on image processing
CN120876486A
Film attachment defect detection method and system based on image processing
CN120876486B
Method and system for identifying and detecting internal defects of automobile injection molded part based on deep learning
CN121563890A
A Deep Learning-Based Method and System for Identifying and Detecting Internal Defects in Automotive Injection Molded Parts
CN121563890B