Image processing-based material crack data acquisition and graph construction method

By optimizing sample design and automating image processing, combined with complex network modeling, we have achieved efficient and accurate acquisition and analysis of crack data in brittle materials. This solves the problems of low efficiency and insufficient accuracy in traditional methods and provides a standardized method for crack data acquisition and graph construction.

CN121033090BActive Publication Date: 2026-03-20SHANDONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511545891.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-28
Publication Date
2026-03-20
Estimated Expiration
2045-10-28

AI Technical Summary

Technical Problem

In the current technology, the automated extraction and networked characterization of crack data in brittle materials are not yet mature, resulting in low efficiency and insufficient accuracy. Traditional methods rely on manual observation, which is inefficient, has large errors, and has a single data dimension.

Method used

By optimizing specimen design, automating image processing, and complex network modeling, and using arc-shaped PMMA specimens, combined with a constant temperature and humidity test chamber and a servo-controlled tensile testing machine, image enhancement technology and complex network modeling are utilized to achieve fully automated crack data acquisition and graph construction, including stain repair, threshold segmentation, morphological processing, and complex network modeling.

Benefits of technology

It significantly improves the efficiency and accuracy of PMMA crack data acquisition and analysis, provides standardized and quantifiable technical means, solves the problems of low efficiency and large error in traditional methods, and provides important technical support for the study of fracture mechanism of brittle materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121033090B_ABST
    Figure CN121033090B_ABST
Patent Text Reader

Abstract

The application discloses a material crack data acquisition and graph construction method based on image processing and belongs to the technical field of material mechanical property analysis and image processing, and comprises the following steps: designing an arc-shaped polymethyl methacrylate sample; eliminating sample machining residual stress by using a constant-temperature and constant-humidity test box, combining a servo control tension testing machine to apply a constant load and recording crack generation time, simultaneously observing crack state and capturing crack morphology images by using a microscope and a camera; performing multi-step processing on the crack morphology images; performing crack equivalent node characterization and constructing a crack network based on a K nearest neighbor algorithm and modularity optimization; dividing community structures by using a community detection method based on modularity optimization to optimize modularity, and finally realizing efficient quantitative analysis of crack evolution rules. The application can accurately extract crack micro features and reveal crack propagation rules through networked characterization, and provides a standardized and quantifiable technical means for brittle material fracture mechanism research.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of material mechanical property analysis and image processing, and particularly relates to a material crack data acquisition and graph construction method based on image processing. BACKGROUND

[0002] When studying the mechanism of brittle material crack evolution, selecting appropriate experimental materials is crucial to the success of the experiment. PMMA (polymethyl methacrylate) as a kind of brittle material has excellent optical transparency, so that the internal crack morphology can be directly observed during the experiment using a microscope. When subjected to external force, the deformation mode of PMMA crack is higher than that of shear yield, which shows higher observability under an optical microscope, providing great convenience for analyzing crack evolution. In addition, the easy-to-process nature of PMMA can greatly improve experimental efficiency and reduce experimental cost.

[0003] The traditional method relies on manual observation and simple image processing, and has problems such as low efficiency and insufficient accuracy. In the prior art, the automatic extraction and networked characterization of crack data are not mature, and an integrated system is needed to realize high-precision crack analysis. SUMMARY

[0004] To solve the above problems, the application provides a material crack data acquisition and graph construction method based on image processing, which optimizes sample design, automates image processing and complex network modeling to solve the problems of low efficiency and large error of traditional methods. The application provides a general crack intelligent analysis algorithm, which solves the following problems through modular design: cross-material adaptability: eliminating dependence on specific samples, suitable for any brittle material such as glass and ceramic; fully automatic processing: algorithm-driven from image enhancement to network modeling, without human intervention; networked quantification: revealing the correlation between crack cluster expansion and stress field through complex networks.

[0005] The technical scheme of the application is as follows:

[0006] A material crack data acquisition and graph construction method based on image processing, comprising the following steps:

[0007] Step 1: design an arc-shaped polymethyl methacrylate sample;

[0008] Step 2: use a constant temperature and humidity test chamber to eliminate residual stress of the sample, combine a servo-controlled tension testing machine to apply a constant load and record the crack generation time, and use a microscope and a camera to observe the crack state and capture crack morphology images;

[0009]

[0009] Step 3: perform multi-step processing on the crack morphology images;

[0010] Step 4, crack equivalent node representation is carried out, and a crack network is constructed based on K-neighbor algorithm and modularity optimization;

[0011] Step 5, a community detection method based on modularity optimization is used to divide community structure to optimize modularity, and finally efficient quantitative analysis of crack evolution law is realized.

[0012] Further, the cross-sectional area of the sample uniformly decreases from both ends to the center, and a protective film is coated on the surface during sample processing.

[0013] Further, in step 2, the position where the crack is first seen is marked, the positions of the unremovable stains in the sample are recorded with the aid of a 5x lens and a 10x lens, and a marker is used to mark the positions on the side of the sample.

[0014] Further, the specific process of step 3 is as follows:

[0015] Step 3.1, if there is lens contamination, perform stain repair; the stain repair is based on simulating the process of heat diffusion in space based on the heat diffusion equation to gradually fill in the missing gray value of the area, specifically including the Laplace operator calculation formula and the explicit iterative update formula; the Laplace operator calculation formula is:

[0016] (1);

[0017] wherein, is the Laplace operator; is a function of the gray value of a pixel in the image changing with time; and represent the coordinates in x and y directions, respectively; is the number of iterations;

[0018] At each iteration, the Laplace operator of the pixel point in the image is calculated , and the pixel value is updated according to the diffusion formula; the diffusion formula is:

[0019] (2);

[0020] wherein, is the pixel gray value of the current pixel point at the th iteration; is the pixel gray value after updating for the th iteration; is the Laplace operator value of the current pixel point at the th iteration;

[0021] Step 3.2, the image is converted into a binary image with pixel gray value of only 0 and 1 by using threshold segmentation method; if there is uneven illumination or salt and pepper noise when using threshold segmentation method, top-hat transformation or median filtering is used for processing respectively;

[0022] Step 3.3, the burr around the crack is trimmed by using dilation operation;

[0023] Step 3.4, if the crack edge feature is fuzzy, convolution filtering processing is performed to obtain convolution response value;

[0024] Step 3.5, the convolution response value is converted by using negation operation.

[0025] Further, in the step 3.2, the formula of threshold segmentation method is:

[0026] (3);

[0027] In the formula, represents the binary image after threshold segmentation; is the original image; is the set threshold value;

[0028] The calculation formula of top-hat transformation is:

[0029] (4);

[0030] (5);

[0031] In the formula, represents top-hat transformation; is the gray image; is the opening operation; is the structure element; represents the erosion operation on the image; represents the dilation operation on the image;

[0032] The calculation formula of median filtering is as follows:

[0033] (6);

[0034] In the formula, represents the gray value of pixel point after median filtering; represents the operation of taking the middle value after sorting data; represents the gray value of a pixel point in the image; represents the neighborhood window with pixel point as the center;

[0035] In step 3.3, the dilation operation involves setting the center pixel of the structuring element to white when white appears in the structuring element; specifically, a 5×1 structuring element is used to perform the dilation operation on the image.

[0036] In step 3.4, the calculation formula for convolution filtering is as follows:

[0037] (7);

[0038] in, The radius of the convolution kernel; Represents pixels The convolution response value at the point; Indicates the convolution kernel weights; , These represent the row and column offsets of the convolution kernel, respectively.

[0039] In step 3.5, the formula for calculating the inversion operation is:

[0040] (8);

[0041] in, Inverted pixels of the image The grayscale value.

[0042] Furthermore, the specific process of step 4 is as follows:

[0043] Step 4.1: Simplify the crack using the minimum bounding rectangle and extract the length and width as node features;

[0044] Step 4.2: Perform crack equivalent node characterization;

[0045] Step 4.3: Establish a connection network between nodes based on the K-nearest neighbor algorithm using Euclidean distance weighting;

[0046] Step 4.4: Establish weight information between nodes;

[0047] Step 4.5: Construct a crack network;

[0048] Step 4.6: Optimize the crack network based on the K-nearest neighbor algorithm and modularity.

[0049] Furthermore, the specific process of step 4.1 is as follows:

[0050] Step 4.1.1: Trace the boundary between the target and the background in the binary image. Using the upper left corner of the crack binary image as the origin, and the positive directions of the X and Y axes to the right and down respectively, generate the contour point set of the crack. , For the first The nth point in the point set The coordinates of the points are , , The coordinates of the points are ,

[0051] Step 4.1.2, converting the crack into its minimum circumscribed rectangle;

[0052] First, determine the vertex positions of the upper left corner and the upper right corner of the minimum circumscribed rectangle of the crack, the specific process is: find the maximum and minimum values of the coordinates of the x and y directions in the contour point set by traversing all points, and set the coordinates of the upper left corner of the rectangle to and the coordinates of the lower right corner to ;

[0053] Then take as the coordinates of the simplified crack nodes, and the calculation formula is:

[0054] (9);

[0055] (10);

[0056] The coordinates of the points are , The coordinates of the points are ; , The coordinates of the points are , The coordinates of the points are

[0057] Step 4.1.3, calculate the length and width of the crack, the formula is:

[0058] (11);

[0059] (12);

[0060] The specific process of the step 4.2 is: use a micrometer to measure the actual size of the crack; During the measurement process, ensure that the microscope magnification is consistent, take the micrometer image extracted under 40 times as the marker image, mark the distance on the image using the line segment tool, and calculate the size of the scale according to the actual size of the micrometer, and then calculate the equivalent length and equivalent width of the crack according to the pixel value, use a vernier caliper to measure the cross-sectional area of the current crack image to obtain the stress, and then construct a three-dimensional vector , of the crack feature A three-dimensional vector of a point, , , The equivalent length, the equivalent width and the stress of the first point, respectively; wherein the calculation formula of the equivalent length and the equivalent width is:

[0061] (13);

[0062] (14);

[0063] wherein, is the size of the scale.

[0064] Further, the specific process of the step 4.3 is: calculating the Euclidean distance between any two nodes, and the formula is:

[0065] (15);

[0066] wherein, is the Euclidean distance between the first node and the first node; , are the coordinates of the first node in x and y directions, respectively;

[0067] After obtaining the Euclidean distances between the current node and each node around the current node, the distances are sorted from small to large, and the nearest m nodes are selected to be connected, so as to obtain a connection network.

[0068] In the step 4.4, according to the calculated distances between the nodes, the weight between two nodes is defined as the following formula:

[0069] (16);

[0070] wherein, is the weight of the connection edge between the first node and the first node;

[0071] In the step 4.5, a set composed of all nodes is defined as , a set composed of all edges is defined as , and the sum of the weights of all connection edges is , so that a crack network containing the weight of each edge is constructed.

[0072] Further, the specific process of the step 4.6 is:

[0073] Step 4.6.1, define the modularity as the difference between the proportion of edges actually existing in the community and the expected value of the proportion of edges that can exist in a random network, denoted as :

[0074] (17);

[0075] wherein, and represent the sum of weights of the first node and the first node , respectively; is a penalty function; , are the community labels of the first node and the second node, respectively; The calculation formula is:

[0076] (18);

[0077] Step 4.6.2, define the sparsity The calculation formula is:

[0078] (19);

[0079] wherein, is the number of edges in the network; is the number of nodes in the network;

[0080] Step 4.6.3, define the edge efficiency ratio, dynamically adjust the K value of the K-neighbor algorithm to balance the modularity and the sparsity , so as to realize the optimization of the edge efficiency ratio:

[0081] (20);

[0082] wherein, is the edge efficiency ratio; and are the modularity of the network at different K values; and are the number of edges in the network at different K values.

[0083] Further, in the step 5, the community detection method realizes the division of the network by maximizing the modularity First, each node is initialized as an independent community, and then the modularity gain The node is moved to a community capable of maximizing the modularity; when the node division is stable, each community is aggregated into a super node, the network size is compressed, a new network is formed, and the above process is repeated until the modularity no longer increases; the modularity gain The calculation formula is:

[0084] (21);

[0085] Wherein, is the sum of the weights of all connected edges of the node in the community; is the sum of the weights of all connected edges of the node in the community; is the sum of the weights of all connected edges of the node in the community; is the sum of the weights of all connected edges of the node in the community; is the sum of the weights of all connected edges of the node in the community; is the sum of the weights of all connected edges of the node in the community. The beneficial technical effects brought by the present application: through the integration of sample design optimization, automatic image processing and complex network modeling technology, the efficiency and accuracy of PMMA crack data acquisition are significantly improved, and the problems of low efficiency, large error and single data dimension caused by the traditional method relying on manual observation are solved. Specifically, through the design of the arc-shaped PMMA sample, the crack state under different stresses can be observed on one sample, the constant temperature and humidity test box is used to eliminate the residual stress of the sample, and the servo control tension testing machine is used to accurately control the load size and loading rate, so that the crack generation time can be accurately recorded; the experimental environment interference can be efficiently eliminated, the uneven illumination can be corrected by stain repair and top hat transformation, the salt and pepper noise can be removed based on the neighborhood gray scale sorting, and the crack edge burrs can be directionally eliminated by morphological dilation and corrosion of the structure element, so that the crack morphology is purified, the crack microfeature is accurately extracted, and the crack propagation law is revealed through network representation, which provides a standardized and quantifiable technical means for brittle material fracture mechanism research, and has important application value in material performance optimization and engineering safety evaluation fields. BRIEF DESCRIPTION OF DRAWINGS

[0086] The overall flowchart of the material crack data acquisition and graph construction method based on image processing of the present application is shown in the figure.

[0087] Figure 1 The schematic diagram of the arc-shaped PMMA sample structure designed by the present application is shown in the figure.

[0088] Figure 2

[0089] Figure 3 ​​It is a threshold segmentation, top hat transformation and effect picture comparison chart before and after noise reduction; wherein, (a), (b), (c), (d), (e), (f) are original image, threshold segmentation image when threshold is higher, threshold segmentation image when threshold is lower, top hat transformation image, crack image without noise reduction, and image after median filter noise reduction in turn.

[0090] Figure 4 It is a schematic diagram for weakening non-crack features by using morphological transformation; wherein, (a), (b), (c), (d) are 3x3 structure element dilation effect picture, 5x1 structure element dilation schematic diagram, 5x1 structure element dilation effect picture, and final crack image in turn.

[0091] Figure 5 It is a crack network community division schematic diagram.

[0092] Figure 6 It is a schematic diagram of the relationship between stress and time of PMMA crack under isothermal condition.

[0093] Figure 7 It is an enlarged image of the minimum circumscribed rectangle of PMMA crack; wherein, (a) is an enlarged crack image, and (b) is a simplified crack by using minimum circumscribed rectangle.

[0094] Figure 8 It is a crack length distribution schematic diagram under different stresses and different times; wherein, (a), (b), (c), (d) are crack length distribution schematic diagrams under stresses of 42.1 MPa, 39.5 MPa, 37.9 MPa and 35.1 MPa respectively.

[0095] Figure 9 It is a crack width distribution schematic diagram under different stresses and different times; wherein, (a), (b), (c), (d) are crack width distribution schematic diagrams under stresses of 42.1 MPa, 39.5 MPa, 37.9 MPa and 35.1 MPa respectively.

[0096] Figure 10 It is a crack aspect ratio distribution schematic diagram under different stresses and different times; wherein, (a), (b), (c), (d) are crack aspect ratio distribution schematic diagrams under stresses of 42.1 MPa, 39.5 MPa, 37.9 MPa and 35.1 MPa respectively. DETAILED DESCRIPTION

[0097] The application will be further described in detail below in combination with the drawings and specific embodiments:

[0098] As Figure 1As shown, the present application proposes a material crack data acquisition and graph construction method based on image processing, the graph is composed of nodes and lines, and the graph construction method can process the crack image into a graph network; the method specifically includes the following steps:

[0099] Step 1, design an arc-shaped PMMA sample, the crack state under different stresses can be observed on one sample, stress concentration is avoided by optimizing the structure of the sample cross-sectional area uniformly decreasing from both ends to the center, and a protective film is covered on the surface during processing to prevent scratches; as shown in the present application, an arc-shaped PMMA sample is designed, and a protective film is covered on the surface during processing to prevent scratches. Figure 2 Figure 2 All the numbers in the figure are in mm, R452 represents an arc shape, the length is 200 mm, the width on both sides is 20 mm, and the distance between the arc shape and the two end boundary lines is 120 mm.

[0100] Step 2, use a constant temperature and humidity test box to eliminate residual stress of the sample, combine a servo-controlled tension testing machine to apply a constant load and record the crack generation time, and simultaneously use a high-resolution microscope and a camera to capture crack morphology images;

[0101] The present application eliminates the processing residual stress through a DY-GDW80L constant temperature and humidity test box (45℃, 30min), ensures that the experimental environment temperature is stable (20±0.5℃), uses a servo-controlled tension testing machine with a model of AI-7000-MU1 and a maximum load of 5kN to apply a constant load and record the crack generation time and stress threshold value relationship, simultaneously uses an XPV600E microscope and a camera to observe the crack state and capture the crack morphology, marks the position where the crack is first seen, uses a 5x lens and a 10x lens to assist in recording the position of the stain that cannot be removed in the sample, and uses a marker pen to mark on the side of the sample, so that the same crack can be observed when the microscope is used next time.

[0102] Step 3, the crack morphology images are processed in multiple steps; the specific process is as follows:

[0103] Step 3.1, for the problem of possible lens contamination, an image repair technology based on partial differential equation (PDE) is used for stain repair to eliminate the stain; the heat diffusion equation is a specific implementation form of PDE, the stain repair of the present application simulates the process of heat diffusion in space to gradually fill in the gray value of the missing area, specifically including the Laplacian operator of formula (1) and the explicit iterative update formula of formula (2). The calculation formula is as follows:

[0104] (1);

[0105] Wherein,​ is the Laplacian operator, representing the second-order derivative of the pixel gray value in the x and y directions; is a function of the pixel gray value in the image over time; and represent the coordinates in the x and y directions, respectively; is the number of iterations.

[0106] At each iteration, the Laplacian operator of the pixel point in the image is calculated , and the pixel value is updated according to the diffusion formula; the diffusion formula is:

[0107] (2).

[0108] wherein, is the pixel gray value of the current pixel point at the th iteration; is the pixel gray value after the th iteration update; is the Laplacian value of the current pixel point at the th iteration.

[0109] Step 3.2, the threshold segmentation method is used to convert the image into a binary image with pixel gray values of only 0 and 1; when using the threshold segmentation method, there may be problems of uneven illumination and salt and pepper noise, therefore, for the problem of uneven illumination (also known as uneven brightness), a top hat transformation is used to eliminate the influence of uneven illumination in the image on crack segmentation; for the problem of salt and pepper noise, a median filter is used to remove salt and pepper noise;

[0110] Threshold segmentation is to compare the pixel value of the image with the set threshold , if the pixel value is greater than or equal to , the pixel is classified into a class; if the pixel value is less than , it is classified into another class. The segmentation formula after setting the threshold is:

[0111] (3).

[0112] wherein, represents the binary image after threshold segmentation; is the original image. After threshold segmentation by the above formula, the image can be converted into a binary image with pixel gray values of only 0 and 1, laying a foundation for simplifying the crack shape and analyzing the crack. However, uneven illumination will cause too large a difference in background brightness of the image, and direct use of threshold segmentation will affect the division effect, making the crack unable to be separated from the background. As shown in (b) of Figure 3 , a higher threshold is used. When the image is segmented, the gray scale caused by uneven illumination is regarded as the foreground region, resulting in that not only the crack region is divided, but also a large amount of background information is contained. The crack and the noise are mixed together, so that the accuracy of the segmentation is greatly reduced. Although the lower threshold value is used as shown in (c) in the figure, Figure 3 Although the background noise can be removed, only the crack with a high gray scale value is left in the image, and the crack with a small gray scale value is ignored, so that a large error of the crack information is caused.

[0113] In view of the problem that uneven illumination may exist, the top-hat transformation is used to eliminate the influence of uneven illumination in the image on the crack segmentation, and the calculation formula is as follows:

[0114] (4) ;

[0115] Wherein, The top-hat transformation is represented by T; The gray scale image is represented by f; The opening operation is represented by O; The structure element is represented by B. The top-hat transformation is composed of two parts of erosion and dilation, and the calculation formula is as follows:

[0116] (5) ;

[0117] Wherein, The erosion operation on the image is represented by E; The dilation operation on the image is represented by D;

[0118] The circular structure element with a radius of 28 pixels is used to separate the background and eliminate the top-hat transformation of uneven illumination. As shown in (a) in the figure, Figure 3 Figure 3 The original image is represented by (a), Figure 3 The image after the top-hat transformation is represented by (d), and the image after the top-hat transformation eliminates the influence of uneven illumination in the original image on the crack segmentation.

[0119] The threshold segmentation is easy to produce the salt and pepper noise, so the median filter is used to remove the salt and pepper noise, and as shown in (e) and (f) in the figure, Figure 3 The crack image before the noise reduction is represented by (e), Figure 3 The crack image after the noise reduction is represented by (f); and the calculation formula is as follows: Figure 3

[0120] (6) ;

[0121] Wherein, The pixel point after the median filtering is represented by f​​​ the gray value of the pixel point represents the operation of taking the middle value after sorting data; represents the gray value of a certain pixel point in the image represents the gray value of the pixel point represents the neighborhood window centered on the pixel point represents the neighborhood window centered on the pixel point

[0122] The present application analyzes the sorting distribution of pixels in their neighborhood window, and repairs the noise points in a targeted manner, thereby removing noise while avoiding damage to the edges and details of the image, and retaining the median filter of the crack edge details.

[0123] Step 3.3, morphological purification of cracks; in the crack image with white as the background color and black as the foreground color, if the burr around the crack is pruned, the dilation operation needs to be used. In this task, the dilation operation is to set the center pixel of the structure element to white when white appears in the structure element. However, according to the 3x3 (3 pixels in length and width) structure element dilation effect diagram shown in (a) of Figure 4 , it can be found that the traditional method cannot be well applied in the task of removing burrs from cracks. By analyzing the characteristics of the crack image, it is found that the burr on both sides of the crack has poor pixel connectivity in the vertical direction. Therefore, according to the characteristics of the vertical distribution of the crack, the present application uses a 5x1 (5 pixels in length and 1 pixel in width) structure element to perform dilation operation on the image, and the principle diagram is shown in (b) of Figure 4 , the crack image after dilation becomes (c) of Figure 4 , the image after 5x1 structure element dilation processing has smoother edge characteristics. After using dilation to eliminate the burrs on both sides of the crack, the vertical size of the crack will also be reduced (b) of Figure 4 , therefore, the 5x1 structure element needs to be used to perform erosion processing on the dilated image, and the crack after erosion processing will increase the size in the vertical direction, reducing the influence of morphological processing on the real size of the crack. Finally, the crack image after erosion processing is threshold segmented to obtain the final crack image shown in (d) of Figure 4 . The crack edge may have burrs, and dilation will cause the crack size to decrease, so the 5x1 structure element is used for morphological dilation and erosion to purify the crack edge. The present application specifically uses a structure element with a length of 5 pixels and a width of 1 pixel to perform dilation operation to directionally eliminate burrs, and restores the size of the crack through erosion morphological purification according to the characteristics of the vertical distribution of the crack.

[0124] Step 3.4, perform convolution filter processing; the crack edge feature is blurred, so in this step, the gray value of the pixel point after median filtering is used as the input, and a predefined convolution kernel weight is used. Perform a convolution operation on the image to obtain pixels. The convolution response value at that point. Its calculation formula is:

[0125] (7);

[0126] in, is the radius of the convolution kernel. Represents pixels The convolution response value at the point; Indicates the convolution kernel weights; , These represent the row and column offsets of the convolution kernel, respectively.

[0127] Step 3.5: Transform the convolution response value using the inversion operation; the calculation formula is as follows:

[0128] (8);

[0129] in, Inverted pixels of the image The grayscale value.

[0130] Step 4: Perform equivalent node representation of the crack, and construct the crack network based on the K-Nearest Neighbors (KNN) algorithm and modularity optimization; the specific process is as follows:

[0131] Step 4.1: Simplify the crack using the minimum bounding rectangle and extract its length and width as node features; the specific process is as follows:

[0132] Step 4.1.1: Trace the boundary between the target and the background in the binary image. Using the upper left corner of the crack binary image as the origin, and the positive directions of the X and Y axes to the right and down respectively, generate the contour point set of the crack. , For the first The nth point in the point set The coordinates of the points are , , The first The coordinates of a point in the x and y directions;

[0133] Step 4.1.2: Transform the crack into its smallest bounding rectangle to ensure that the outermost contour of each crack is obtained.

[0134] First, determine the positions of the top-left and top-right vertices of the minimum bounding rectangle of the crack. Specifically, this involves iterating through all points to find the maximum and minimum values ​​of the x and y coordinates in the contour point set, and then setting the coordinates of the top-left corner of the rectangle to the values ​​of the crack contour points. The coordinates of the bottom right corner are set to .

[0135] Then the coordinates of the crack are simplified as nodes, and the calculation formula is:

[0136] (9);

[0137] (10);

[0138] wherein, , are the coordinates of the x and y directions of the first point, respectively; , are the coordinates of the x and y directions of the upper left corner of the rectangle, respectively; , are the coordinates of the x and y directions of the right lower corner of the rectangle, respectively; Step 4.1.3, calculate the length

[0139] and width of the crack, and the formula is:

[0140] (11);

[0141] (12); Step 4.2, crack equivalent node representation; Specifically: using a micrometer with specifications of 1DIV=0.01mm and resolution of 10μm to measure its actual size. In the measurement process, the same magnification of the microscope should be ensured, the micrometer image under 40 times of the microscope is taken as the marker map, the distance on the map is marked by using the line segment tool, and the size of the scale is calculated according to the actual size of the micrometer, and then the equivalent length and equivalent width of the crack are calculated according to the pixel value, the cross-sectional area of the current crack image is measured by using a vernier caliper to obtain the stress, and then a three-dimensional vector of a crack feature is constructed

[0142] , is the three-dimensional vector of the first point, , , are the equivalent length, equivalent width and stress of the first point, respectively. The calculation formula of the equivalent length and equivalent width is: (13);

[0143] (14); wherein,

[0144]

[0145] ​​​The size of the scale bar ensures that the dimensions in the image can be converted into actual physical dimensions;

[0146] Step 4.3: Establish a connection network with Euclidean distance weighted between nodes based on the KNN algorithm, and calculate the Euclidean distance between any two nodes. The calculation formula is as follows:

[0147] (15);

[0148] in, For the first The node and the first Euclidean distance between nodes; , The first The coordinates of each node in the x and y directions;

[0149] After obtaining the Euclidean distance between the current node and all its surrounding nodes, sort them in ascending order of distance, select the m nearest nodes to connect, and establish the association between the nodes.

[0150] Step 4.4: Establish weight information between nodes. Based on the calculated distance between nodes, define the weight between two nodes as follows:

[0151] (16);

[0152] in, For the first The node and the first The weight of the edges connecting each node;

[0153] Step 4.5: Define the set consisting of all nodes as... The set of all edges is The sum of the weights of all connecting edges is A crack network containing the weights of each edge is constructed. ; The total number of nodes;

[0154] Step 4.6: Optimize the crack network based on the K-nearest neighbor algorithm and modularity; the specific process is as follows:

[0155] Step 4.6.1: Define modularity as the difference between the expected proportion of edges actually existing in the community and the expected proportion of edges that may exist in the random network, denoted as . :

[0156] (17);

[0157] in, and Represented as the first a node and the a node weight sum of the node; is a penalty function; , community label of the node, the node, respectively; The calculation formula is:

[0158] (18);

[0159] Step 4.6.2, network sparsity can also be used as an important indicator to measure network relationship, and the sparsity can directly reflect the connection density of the network, and then has a profound impact on the network characteristic research. The sparsity The calculation formula is:

[0160] (19);

[0161] Wherein, is the number of edges in the network; is the number of nodes in the network; represents the maximum number of edges that can exist in the network, that is, the number of edges required to change the graph into a complete graph.

[0162] Step 4.6.3, the present application studies the value of K in KNN algorithm. The influence of different K values on the connection of crack nodes, and the selection of K value has a decisive role on the topological structure of crack network. When the K value is small, the crack network is relatively sparse, and some crack nodes may not be able to establish effective connection, even form isolated points, so that the connectivity of the network is reduced, and the interaction characteristics between cracks cannot be fully reflected. When the K value is too large, the crack network is too dense, and a large number of redundant connections are included, which leads to a large increase in the number of edges between nodes. Therefore, when constructing the crack network, it is necessary to reasonably select the K value to ensure that the crack network established can not only completely retain the main contact of crack propagation, but also avoid the increase of calculation overhead caused by redundant connections. With the gradual increase of K value, the number of edges and the sparsity of crack network show a growth trend, indicating that the connectivity of the network is gradually enhanced. While the modularity shows a decreasing trend, reflecting that more edge connections weaken the community division effect of the network. In order to better quantify the influence of the number of new edges on the modularity, the present application proposes the concept of edge efficiency ratio (Edge Efficiency Ratio), which dynamically adjusts the K value through the formula to balance the modularity and the sparsity , realize the optimization of edge efficiency ratio:

[0163] (20);

[0164] wherein, is the edge efficiency ratio; and are the modularity of the network at different K values, respectively; and is the number of edges in the network at different K values. When the value is larger, it means that the modularity is less affected by the number of added edges, and the network structure is more stable; and the smaller the value is, the greater the modularity is affected by the number of added edges.

[0165] In the embodiment of the application, the relevant parameters in the crack network at different K values are shown in Table 1. By comparing the edge efficiency ratios at different K values, it can be found that the edge efficiency ratio decreases first and then increases. When K = 6, the edge efficiency ratio reaches the minimum, which means that when the K value changes from 6 to 7, the number of added edges will have a greater impact on the stability of the network structure, so the value of K of the KNN is set to 6. By performing the same operation on the crack images at different times and different stresses, a complete undirected and weighted network of cracks can be obtained.

[0166] Table 1 Relevant parameters in the crack network at different K values

[0167] .

[0168] Step 5, using a community detection method based on modularity optimization to divide the community structure to optimize the modularity, and finally realizing efficient quantitative analysis of the crack evolution law.

[0169] As an important framework for studying the interaction between each component in the system, complex network provides a new perspective for revealing the correlation between cracks and its impact on the overall material performance. In the case of uniaxial tension of PMMA samples, the normal stress is caused by external load, and the transverse normal stress is affected by Poisson effect. PMMA, as a typical polymer, exhibits elastomer characteristics. When uniaxially stretched, the transverse dimension will shrink accordingly due to the rearrangement of molecular chains, and the direction of maximum shear stress is at an angle of 45 degrees to the direction of principal stress. Microcracks in PMMA translate in this direction under the action of shear stress, thus exhibiting a macroscopic trend of crack directional tilt direction movement, showing self-organization properties.

[0170] ​Self-organization enables complex networks to evolve into stable topological structures driven by local interactions, and in this process, highly aggregated community structures are often formed within the network. Community structures are ubiquitous in real networks, and in a network, multiple communities often coexist. According to this feature, community discovery is often used to study the aggregation behavior of networks, and has a wide range of applications in drug action prediction, recommendation systems, and social networks. In the PMMA crack network, the self-organization characteristic drives the crack to gradually expand from the isolated defect, and forms crack clusters with different densities in the material, which correspond to the community structure in the complex network. However, in actual analysis, the complex topological structure of the crack network will make the computational efficiency of processing the entire network low. Therefore, by using the aggregation characteristics of the community structure, the original crack network is divided into subgraphs, which ensures that the parameter amount of the model is reduced in a single training without affecting the relationship between the cracks, and then the efficiency of the model is improved.

[0171] Louvain algorithm as an efficient community detection method can realize the division of the network by maximizing the modularity . Specifically, the Louvain algorithm first initializes each node as an independent community, and then moves the node to the community that can maximize the modularity gain . When the node division is stable, the algorithm aggregates each community into a super node, compresses the network size, forms a new network, and repeats the above process until the modularity no longer significantly improves. In order to detect the quality of the divided subgraph, it is necessary to evaluate the advantages and disadvantages of the divided community structure. The value of the modularity gain can quantitatively analyze the quality of the crack network community division, and the closer the value is to 1, the stronger the network structure strength after division, that is, the higher the division accuracy. The calculation formula of the modularity gain

[0172] (21);

[0173] Among them, is the sum of the weights of all connected edges of the th node in the community ; is the total weight of all connected edges of the th node; is the sum of the degrees of all nodes in the community ; is the sum of the weights of all edges in the entire network.

[0174] The present application divides the crack network based on the Louvain algorithm, and the division is shown in Table 2.

[0175] Table 2 PMMA crack image community division

[0176] .

[0177] In the use of Gephi for visual analysis, by assigning different community nodes to different colors to distinguish. In order to further enhance the readability of the network, the present application uses the edge weight and the weighted degree of the node to classify the nodes and edges in the network. The weighted degree represents the sum of the edge weight of the node connection, and the node with higher weighted degree usually has more or stronger connection, and the relationship with other nodes in the network is closer. The node size is represented according to the weighted degree, and the node size is larger when the weighted degree is larger, and vice versa. The edge between the nodes uses weight, and the larger the weight, the thicker the edge, representing the stronger relationship between the two nodes. As shown in Figure 5 As shown in Figure 2, the PMMA crack network is divided into five communities, community one (main crack zone): located in the middle of the sample, along the principal stress direction, the node scale is the largest, about 27.08%, the average equivalent length is the largest, and the weighted degree is the highest, community two (upper edge reflection / boundary cluster): close to the upper edge, the scale is about 20.83%, the stress reflection and boundary effect are obvious, and the center of gravity is small. Community three (lower edge reflection / boundary cluster): close to the lower edge, the scale is about 22.92%, the property is mirror image of community 2, and the center of gravity is large. Community four (secondary initiation cluster): short and dense, the edge density in the community is high, and it is mostly a new crack group, the scale is about 14.58%. Community five (isolated microcrack / sparse cluster): the smallest scale, the connection with other communities is weak, often as background or sporadic crack group, the scale is about 14.58%.

[0178] In order to prove the feasibility and superiority of the present application, the following experiments are given.

[0179] Experiment 1: PMMA creep test and stress threshold analysis;

[0180] First, the physical properties of PMMA and the treatment of test materials; when studying the mechanism of polymer crack evolution, it is crucial to choose appropriate test materials for the success of the test. The present application selects PMMA as the test material. PMMA has excellent optical transparency, which allows direct observation of the internal crack morphology during the test process using a microscope. When subjected to external force, the deformation mode of PMMA crack is compared with shear yield, which exhibits higher observability under an optical microscope, providing great convenience for analyzing crack evolution. In addition, the easy-to-process characteristics of PMMA greatly improve the efficiency of the test and reduce the cost of the test. The other relevant performance parameters of PMMA are shown in Table 3:

[0181] Table 3 PMMA performance parameter table

[0182] .

[0183] In the sample preparation stage, in order to observe the crack distribution state under different stresses under the same tension in a sample, the PMMA is processed into an arc shape as shown in the figure. Figure 2 By selecting a circular arc with a large radius as the contour, the cross-sectional area of the sample can be uniformly reduced from both ends to the center while avoiding stress concentration. During processing, protective film is applied to both sides of the sample to prevent irreversible scratches on the sample surface during processing, which can affect the crack distribution in the later stage. In addition, temperature has a significant impact on creep testing. At higher temperatures, the creep rate of the material will increase significantly. Therefore, during the test, the temperature will be controlled at 20±0.5℃ using an air conditioner to reduce the impact of environmental factors on the crack distribution and morphology of PMMA.

[0184] Then the original information of PMMA crack is obtained by creep test; after the selection and processing of test materials, the creep behavior of PMMA under stress and its crack evolution characteristics are further discussed. The test device includes a DY-GDW80L constant temperature and humidity high and low temperature test box, an AI-7000-MU1 servo control tension testing machine and a TCA3.0 image acquisition system.

[0185] (1) Stress-time relationship of PMMA crack generation;

[0186] First, in order to eliminate the residual stress that may be generated in the production and processing of the sample, all PMMA samples are placed in a constant temperature and humidity high and low temperature test box, and kept at 45℃ for 30 min. This step can eliminate the influence of residual stress on crack evolution.

[0187] PMMA has an important relationship with stress and action time during crack generation. In order to more accurately record the morphology and distribution characteristics of the initial crack, and improve the efficiency of crack data collection and analysis in the later stage, it is necessary to study the relationship between the threshold value of crack generation and the action time of constant tension. In order to determine the minimum stress threshold value of crack generation, first mark the area where the crack appears at different times, and measure the cross-sectional area of the marked area using a vernier caliper. Combined with the loading conditions, the minimum stress value of crack generation in the current time period is calculated. Specifically, under the condition that the external load is constant, the stress received at the center line of the sample increases first and then decreases. The present application designs the test steps according to this feature.

[0188] Firstly, the creep test was carried out using a higher external load. The optical microscope was used to observe the crack from the middle to both ends of the PMMA sample. Since the stress on the sample gradually decreased, the process of the crack from appearing to disappearing could be seen. In this process, the boundary of the crack disappearance was marked for later measurement of the cross-sectional area. Then, the same external load was used to increase the action time, and the boundary of the crack disappearance would move to both ends. Similarly, the boundary of the crack disappearance at different times was recorded. After obtaining the first set of data, the minimum stress of the crack appearance was calculated, and the second external load was set according to the minimum cross-sectional area of the sample. In this way, the time of the crack appearance in the PMMA under gradually decreasing stress could be obtained, and the efficiency of the test was improved. Through repeated tests on multiple samples, the average value of the crack generation stress was calculated, and visual analysis was performed in the form of a scatter plot.

[0189] In Figure 6 As can be seen from the stress-time relationship shown in the figure, as the stress decreases, the time of crack appearance increases significantly. Therefore, controlling the stress at a higher level can reduce the test time and improve the efficiency of crack data set extraction.

[0190] (2) PMMA creep test;

[0191] Under room temperature conditions (20°C), the sample was placed on a servo-controlled tensile testing machine for creep test. The tensile force was set to 850N, and the minimum time of crack generation could be calculated according to the actual cross-sectional area of the sample, which was 215s. In the test, a loading speed of 0.5mm / min was used, and the crack image was recorded every 2min after reaching the set value of 850N.

[0192] Firstly, the upper left corner of the sample was marked to ensure that the same plane could be seen by the microscope after each creep test. Secondly, when observing the crack state with the microscope, the position where the crack was first seen was marked. The positions of the indelible stains on the sample were recorded with the aid of 5x and 10x lenses, and a marker was used to mark the side of the sample to ensure that the same crack could be seen when the microscope was used next time. Then, the PMMA sample was moved along the X-axis direction using the improved moving caliper, and the crack distribution under different stresses was recorded by repeating the previous work. In order to ensure that the crack changes could be accurately recorded, the image acquisition system was used to record the crack information under different stresses and different times. The resolution of the collected images was 1020x639 pixels, and the high-pixel camera allowed the microstructure and evolution process of the crack to be recorded in detail. Finally, by repeating the above test steps, a large number of data sets of PMMA crack evolution could be obtained, which laid a foundation for the study of PMMA crack inversion prediction.

[0193] In this study, the undirected weighted graph is used to characterize the PMMA crack network, which can better describe the relationship between cracks. The node representation of the crack requires the analysis of the crack morphological structure, for this purpose, the invention uses the Field Emission Scanning Electron Microscope (FESEM) to observe the microstructure of PMMA. FESEM uses a field emission electron gun as the electron source, which has a smaller electron beam spot size and higher electron energy density than SEM, so it can obtain higher resolution of sample micro-morphology and surface characteristics. In addition, whether high-quality crack pictures can be obtained also depends on the standardization of sample preparation, gold spraying treatment and microscopic observation steps. Next, the three key steps of sample preparation, gold spraying treatment and microscopic observation will be introduced in detail:

[0194] 1) After the creep test, the sample is observed under an optical microscope, and the area where the crack exists is marked. Then the marked area is cut, and a paper towel is used to protect the sample surface during cutting to prevent the cracks caused by cutting from affecting the observation results. Then the cut PMMA sample is pasted with conductive glue, which can increase the transmission efficiency of electronic signals and improve the resolution of the image, and can also eliminate the phenomenon that non-conductive materials form an electric field on the sample surface because the electric charge cannot dissipate quickly, preventing image blurring.

[0195] 2) Since the prepared sample does not have conductivity, it needs to be gold sprayed. First, vacuum to below 10-3 Torr, then use a sputtering current of 10 mA for 50 s to cover the sample surface with a conductive film of 10~20 nm.

[0196] 3) During the observation stage after the sample is gold sprayed, the chamber also needs to be evacuated to a high vacuum state, and the acceleration voltage is set to 1.5 kV according to the material. Then by adjusting the objective lens height and sample height, the sample is located at the electron beam focal point. By adjusting the magnification to select the target area, and saving the crack morphology data.

[0197] Through the observation of the crack micro-morphology by FESEM, it is found that the crack is roughly in the shape of a long strip. Therefore, the invention uses the minimum circumscribed rectangle to replace the shape of the crack. In addition, the length of the crack is the main direction of crack propagation, and the length of the circumscribed rectangle can represent the propagation behavior of the crack under external stress, so that the morphology and physical characteristics are maximized to restore the original characteristics of the crack. The invention uses OpenCV to convert the crack to its minimum circumscribed rectangle, extracts the contour information of the crack by cv2.findContours, and sets the mode to cv2.RETR_EXTERNAL to ensure that the outermost contour of each crack is obtained. The magnified image of the minimum circumscribed rectangle of the PMMA crack is as follows: Figure 7As shown, (a) is an enlarged crack image, and (b) is a simplified crack using the minimum circumscribed rectangle.

[0198] The upper left corner of the crack image is then taken as the coordinate origin, and the right and downward directions are taken as the positive directions of the X and Y axes, respectively, to obtain a point set of the crack contour . The maximum and minimum values of the coordinates in the x and y directions in the point set are found by traversing all the points, and the coordinates of the upper left corner of the rectangle are set to and the coordinates of the lower right corner are set to . The positions of the vertices of the minimum circumscribed rectangle of the crack are then calculated, and are taken as the coordinates of the nodes to which the crack is simplified, and the calculation formulas are formula (9) and formula (10) above. After the equivalent nodes of the crack are determined, the physical information such as the length, width and stress of the crack needs to be converted into the feature vectors of the nodes. However, the size of the circumscribed rectangle is in pixels at this time, and it needs to be converted into the actual size. Therefore, the present application uses a micrometer with a specification of 1 DIV = 0.01 mm and a resolution of 10 μm to measure the actual size. In the measurement process, the magnification of the microscope should be kept consistent, and the micrometer image under 40 times magnification is taken as the marker image and imported into ImageJ, the distance on the image is marked using the line segment tool, and the size of the scale is calculated according to the actual size of the micrometer, and then the actual size of the equivalent crack is calculated according to the pixel value.

[0199] After the length and width of the crack are determined, the stress of the current crack image needs to be quantified. The present application uses a vernier caliper to measure the cross-sectional area, and the measured stress is denoted as . In this way, a three-dimensional vector of the crack feature is constructed, which provides a multi-dimensional description of the geometric features and mechanical state of the crack and can effectively support the analysis and prediction of the subsequent crack propagation behavior.

[0200] In the same crack image, the actual size described is a rectangle of 120 μm x 160 μm, and the difference in the actual cross-sectional area size can be ignored. Therefore, the stress generated by the external load on the crack can be regarded as a constant value in the same crack image. The crack images at different positions are extracted in the test, and the sizes are counted. The crack length is described as shown in Figure 8 .

[0201] The crack length distribution area is wide due to the internal inhomogeneity or defects of the material. From the dimension of stress, the crack propagation rate is closely related to the applied stress level. With the increase of stress, the total number of cracks collected in the PMMA image also gradually increases. The time points of the figure are 2 min, 8 min, 14 min and 20 min, respectively. At the same time, the number of cracks in the high stress area is more than that in the low stress area. And at the same time, the proportion of long cracks in the total number of cracks in the image is higher under the condition of higher stress (such as 42.1 MPa) than that under the condition of lower stress (such as 35.1 MPa).

[0202] From the time dimension, with the increase of stress, the change of crack length tends to be more gentle. Under different stresses, the initial growth rate of the crack is much higher than the later growth rate. At 2 min, the number of cracks is small and the length is low. Under the condition of low stress at 2 min (such as 35.1 MPa), the crack does not expand at all, which indicates that the stress state at this time does not reach the threshold of PMMA crack propagation, so there is no crack data. At 8 min, the number and length of cracks increase significantly, and then increase slowly at a low rate.

[0203] As for the width distribution of the crack, according to Figure 9 It can be found from the width distribution of the crack under different stresses and different times that the width distribution of the crack is between 0 μm and 1.5 μm, and the width of the crack is less related to the length of the crack and the stress, and also less related to the change of time. Subsequently, in order to study the aspect ratio distribution of the crack under different stresses and action times, the values of the aspect ratio are arranged from small to large. It can be seen from Figure 10 that with the increase of stress level and the extension of action time, the aspect ratio of the crack shows a clear change trend. Especially the cracks with large aspect ratio, which almost dominate the distribution at each time point. This phenomenon is highly consistent with the crack propagation law, indicating that with the gradual increase of applied stress, the crack propagation along the principal stress direction is more obvious, and then a larger aspect ratio is formed. This propagation mode of the crack is closely related to the scale-free characteristics, and the morphology and propagation law of the crack show self-organization characteristics and scale-free characteristics. Especially under higher stress, the crack becomes more concentrated and concentrated in a certain area. These cracks with large aspect ratio reflect the local nonlinear response of the material under stress in the crack propagation process, and the distribution characteristics of the crack in different times are highly consistent with the scale-free characteristics of crack propagation.

[0204] Of course, the above description is not a limitation on the present application, and the present application is not limited to the above examples. Changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present application should also be within the scope of the present application.

Claims

1. A method for acquiring and constructing material crack data based on image processing, characterized in that, Includes the following steps: Step 1: Design an arc-shaped polymethyl methacrylate (PMMA) sample; Step 2: Use a constant temperature and humidity test chamber to eliminate residual stress from sample processing, apply a constant load using a servo-controlled tensile testing machine and record the crack initiation time, and simultaneously observe the crack state and capture crack morphology images using a microscope and camera. Step 3: Perform multi-step processing on the crack morphology image; Step 4: Perform equivalent node representation of cracks, and construct a crack network based on the K-nearest neighbor algorithm and modularity optimization; the specific process is as follows: Step 4.1: Simplify the crack using the minimum bounding rectangle and extract the length and width as node features; Step 4.2: Perform crack equivalent node characterization; Step 4.3: Establish a connection network between nodes based on the K-nearest neighbor algorithm using Euclidean distance weighting; Step 4.4: Establish weight information between nodes; Step 4.5: Construct a crack network; Step 4.6: Optimize the crack network based on the K-nearest neighbor algorithm and modularity; the specific process is as follows: Step 4.6.1: Define modularity as the difference between the expected proportion of edges actually existing in the community and the expected proportion of edges that may exist in the random network, denoted as . : (17); in, It is the set of all nodes; This is the sum of the weights of all connected edges; For the first The node and the first The weight of the edges connecting each node; and Represented as the first Nodes and the Nodes The sum of their weights; Let it be the penalty function; , The first The node, the first Community tags for each node; The calculation formula is: (18); Step 4.6.2: Define sparsity Calculation formula: (19); in, It is the number of edges in the network; It is the number of nodes in the network; Step 4.6.3: Define the edge efficiency ratio and dynamically adjust the K value of the K-nearest neighbor algorithm to balance the modularity. With sparsity To achieve optimized marginal utility ratio: (20); in, The marginal efficiency ratio; and These represent the modularity of the network for different K values; and This represents the number of edges in the network for different values ​​of K; Step 5: Use a community detection method based on modularity optimization to divide the community structure to optimize modularity, and finally achieve efficient quantitative analysis of crack evolution law.

2. The method for acquiring and constructing material crack data based on image processing according to claim 1, characterized in that, The cross-sectional area of ​​the sample decreases uniformly from both ends toward the center, and a protective film is applied to the surface of the sample during processing.

3. The method for acquiring and constructing material crack data based on image processing according to claim 1, characterized in that, In step 2, the location where the crack is first observed is marked, and the locations of stains that cannot be removed from the sample are recorded with the help of a 5x and 10x microscope. A marker is also used to mark the side of the sample.

4. The method for acquiring and constructing material crack data based on image processing according to claim 1, characterized in that, The specific process of step 3 is as follows: Step 3.1: If lens contamination exists, perform stain repair; the stain repair is based on the thermal diffusion equation to simulate the process of heat diffusion in space, in order to gradually fill the gray values ​​of the missing area, specifically including the Laplacian operator calculation formula and explicit iterative update formula; The formula for calculating the Laplace operator is: (1); in, For the Laplace operator; It is a function of how the gray value of a pixel in an image changes over time; and These represent the coordinates in the x and y directions, respectively; This represents the number of iterations. At each iteration, the Laplacian operator for each pixel in the image is computed. The pixel values ​​are updated according to the diffusion formula; the diffusion formula is: (2); in, For the first In the next iteration, the current pixel The pixel grayscale value; For iteration The pixel grayscale value after the next update; For the first In the next iteration, the current pixel The value of the Laplace operator; Step 3.2: Use the threshold segmentation method to convert the image into a binary image with pixel grayscale values ​​of only 0 and 1; if there is uneven illumination or salt-and-pepper noise when using the threshold segmentation method, use top-hat transform or median filtering respectively to process it; Step 3.3: Use an expansion operation to trim the burrs around the crack; Step 3.4: If the crack edge features are blurred, perform convolution filtering to obtain the convolution response value; Step 3.5: Use the invert operation to transform the convolution response value.

5. The method for acquiring and constructing material crack data based on image processing according to claim 4, characterized in that, In step 3.2, the formula for the threshold segmentation method is: (3); In the formula, This represents the binary image after thresholding. Original image; The set threshold; The formula for calculating the top-hat transformation is: (4); (5); in, Indicates top-hat transformation; It is a grayscale image; This is an opening operation; For structural elements; This indicates an erosion operation on the image; This indicates a dilation operation on the image; The formula for median filtering is as follows: (6); in, This indicates the pixel value after median filtering. grayscale value; This indicates an operation that takes the median value after sorting the data; Represents a pixel in an image grayscale value; Represented by pixels A neighborhood window centered on the center; In step 3.3, the dilation operation involves setting the center pixel of the structuring element to white when white appears in the structuring element; specifically, a 5×1 structuring element is used to perform the dilation operation on the image. In step 3.4, the calculation formula for convolution filtering is as follows: (7); in, The radius of the convolution kernel; Represents pixels The convolution response value at the point; Indicates the convolution kernel weights; , These represent the row and column offsets of the convolution kernel, respectively. In step 3.5, the formula for calculating the inversion operation is: (8); in, Inverted pixels of the image The grayscale value.

6. The method for acquiring and constructing material crack data based on image processing according to claim 1, characterized in that, The specific process of step 4.1 is as follows: Step 4.1.1: Trace the boundary between the target and the background in the binary image. Using the upper left corner of the crack binary image as the origin, and the positive directions of the X and Y axes to the right and down respectively, generate the contour point set of the crack. , For the first The nth point in the point set The coordinates of the points are , , The first The coordinates of a point in the x and y directions; Step 4.1.2: Transform the crack into its smallest bounding rectangle; First, determine the positions of the top-left and top-right vertices of the minimum bounding rectangle of the crack. Specifically, this involves iterating through all points to find the maximum and minimum values ​​of the x and y coordinates in the contour point set, and then setting the coordinates of the top-left corner of the rectangle to the values ​​of the crack contour points. The coordinates of the bottom right corner are set to ; Then The coordinates of the crack as simplified as nodes are calculated using the following formula: (9); (10); in, , The first The coordinates of a point in the x and y directions; , These are the x and y coordinates of the top-left corner of the rectangle, respectively. , These are the x and y coordinates of the bottom right corner of the rectangle, respectively. Step 4.1.3: Calculate the crack length. and width The formula is: (11); (12); The specific process of step 4.2 is as follows: The actual size of the crack is measured using a micrometer. During the measurement process, the microscope magnification should be consistent. After using the micrometer image extracted under a 40x microscope as a marker image, the distances on the image are marked using a line segment tool. The scale is calculated based on the actual size of the micrometer, and then the equivalent length and equivalent width of the crack are calculated based on the pixel values. The cross-sectional area of ​​the current crack image is measured using a vernier caliper to obtain the stress, thereby constructing a three-dimensional vector of crack features. , For the first A three-dimensional vector of points, , , The first The equivalent length, equivalent width, and stress at each point; where the formulas for calculating the equivalent length and equivalent width are: (13); (14); in, This refers to the size of the scale.

7. The method for acquiring and constructing material crack data based on image processing according to claim 6, characterized in that, The specific process of step 4.3 is as follows: Calculate the Euclidean distance between any two nodes, using the following formula: (15); in, For the first The node and the first Euclidean distance between nodes; , The first The coordinates of each node in the x and y directions; After obtaining the Euclidean distance between the current node and all its surrounding nodes, sort them in ascending order of distance, select the m nearest nodes and connect them to obtain the connection network; In step 4.4, based on the calculated distance between nodes, the weight between two nodes is defined as follows: (16); In step 4.5, the set consisting of all nodes is defined as follows: The set of all edges is The sum of the weights of all connecting edges is A crack network containing the weights of each edge is constructed. .

8. The method for acquiring and constructing material crack data based on image processing according to claim 1, characterized in that, In step 5, the community detection method maximizes modularity. To achieve network partitioning, each node is first initialized as an independent community, and then based on the modularity gain... The calculation involves moving nodes to communities that maximize modularity; once the node partitioning stabilizes, each community is aggregated into a supernode, compressing the network size to form a new network. This process is repeated until modularity no longer increases; modularity gain. The calculation formula is: (21); in, For the first Individual nodes and communities The sum of the weights of all edges connecting the nodes within the node; For the first The sum of the weights of all connected edges to each node; For the community The sum of the degrees of all nodes in the array; It is the sum of the weights of all edges in the entire network.

Citation Information

Patent Citations

  • Surface crack identification method and device

    CN116452944A

  • Defect analysis method and system based on pipeline butt weld radiograph

    CN118941547A