A method for measuring fatigue crack length based on video analysis
By using video analysis methods, image matrix processing, OTSU threshold segmentation, and connected component labeling techniques, the maximum opening image of fatigue cracks is automatically identified. This solves the real-time and accuracy problems in measuring fatigue crack length in existing technologies, and enables fast and accurate fatigue crack length measurement.
Patent Information
- Application Number
- CN202310240077.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-09
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-03-09
AI Technical Summary
Existing technologies cannot accurately measure the length of fatigue cracks in materials under cyclic loading in real time, and traditional methods have significant errors and complexities.
Using video analysis methods, image matrix processing, OTSU threshold segmentation, and connected component labeling techniques are employed to automatically identify the maximum opening image of fatigue cracks and calculate the crack length.
It enables real-time and accurate measurement of fatigue crack length during testing, reducing the tedious manual processing and improving measurement speed and accuracy.
Smart Images

Figure CN116183361B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a crack length detection method of a material, in particular to a fatigue crack length measurement method based on video analysis, and belongs to the technical field of material detection. BACKGROUND
[0002] Fatigue is a process in which local permanent cumulative damage is gradually generated at one or more places under the action of cyclic stress and strain, and a crack or complete fracture occurs after a certain number of cycles. Fatigue fracture refers to the fracture caused by the fact that a crack is first generated at a local stress concentration or a low-strength position, and then the crack expands. Fatigue of a material generally includes three stages: a fatigue crack initiation stage, a fatigue crack growth stage, and a fatigue fracture stage. Fatigue crack growth refers to the growth of a fatigue crack in an expansion zone. Under the action of continuous alternating stress, a material will gradually generate a crack on its surface, and the crack will gradually develop in depth with time. The crack expands, the mechanical properties of the test piece decrease, and finally complete fracture occurs. Therefore, the fatigue crack length measurement of a material under a load condition is a key data for detecting the performance of the material.
[0003] The fatigue crack expansion of an elastic-plastic material under the action of cyclic load is generally slow, and the crack length cannot be measured in real time by an artificial method. At present, a method of stopping the machine, measuring the crack, and then loading is adopted, which will have a certain impact on the subsequent test. A digital speckle method based on digital image technology for crack length measurement still uses a scale measurement for crack length reading. A scale ruler is generally attached to a clamp for clamping a test piece, and a large reading error is caused by the fact that the scale ruler is far away from the crack generation position, so that the crack measurement is inaccurate.
[0004] CN113865487A determines the tip position of a fatigue crack through a surface displacement field, and obtains the absolute value of the displacement value difference of each column of adjacent two pixel points in the deformation displacement field along the loading direction. Since the image is directly processed, noise points exist in the photo, and the detection accuracy is poor. Moreover, the maximum crack length of the test piece cannot be directly obtained, which greatly increases the processing difficulty and reduces the work efficiency. CN106092785A discloses a method for testing fatigue crack expansion rate by using an asymmetric crack. An equivalent model for solving a stress intensity factor is established. The method is extremely complex, and the maximum crack image under the corresponding load condition cannot be obtained, and the maximum crack length cannot be directly obtained. SUMMARY
[0005] For the fatigue crack propagation test under cyclic load for a long time, the existing measurement method cannot meet the demand of real-time crack length measurement, and the application provides a method for measuring fatigue crack length in real time by video analysis. In the experimental process, the crack propagation image video is collected, the image is matrix processed, the crack opening maximum image of the sample under the load condition is obtained by using the connected domain marking technology, and the crack propagation length is further calculated and obtained.
[0006] According to the first embodiment of the application, a fatigue crack length measurement method based on video analysis is provided.
[0007] A fatigue crack length measurement method based on video analysis, the method comprising the following steps:
[0008] (1) sample pretreatment: pre-cracking the sample to obtain a pre-cracked sample;
[0009] (2) loading: installing the pre-cracked sample on the loading device and loading the sample; at the same time, a camera is used to collect the sample video during loading to obtain the sample loading video;
[0010] (3) image processing: reading each frame of image in the sample loading video, cropping the image to obtain an image containing a crack, and performing image matrix processing to obtain an image matrix;
[0011] (4) finding the image with the largest crack opening of the sample and determining the crack area: performing OTSU threshold segmentation processing on the image matrix, summing the column of the image matrix after threshold segmentation of each frame of image in the sample loading video, and the image matrix corresponding to the minimum value of the summation result is the image with the largest crack opening in the sample loading video; the crack area in the image is obtained by connected domain marking;
[0012] (5) crack position determination: defining an origin, finding the crack tip position as P point, obtaining the position information of P point in the image, and determining the position coordinates (x, y) of P point;
[0013] (6) calculating the crack length: calculating the actual length of the crack according to the position coordinates (x, y) of P point.
[0014] In the application, step (1) is specifically: cutting a pre-crack on the sample with a blade, and measuring the length of the sample, which is denoted as LL.
[0015] As preferred, a coating with large color difference from the background color of the loading device is sprayed on the sample. For example, a black background cloth is arranged in the loading device, and white coating is sprayed on the sample.
[0016] In the application, step (3) is specifically:
[0017] (301) Read each frame image in the sample loading video, obtain the video image, obtain the video image area of each frame video image and the sample area in the video image:
[0018] Select the top left corner of the video image, and obtain the coordinates of the point on the table as (x1, y1); select the bottom left corner of the video image, and obtain the coordinates of the point on the table as (x2, y2); select the top right corner of the video image, and obtain the coordinates of the point on the table as (x3, y3); select the bottom right corner of the video image, and obtain the coordinates of the point on the table as (x4, y4); obtain the video image area;
[0019] Select the top left corner of the sample in the video image, and obtain the coordinates of the point on the table as (x1', y1'); select the bottom left corner of the sample in the video image, and obtain the coordinates of the point on the table as (x2', y2'); select the top right corner of the sample in the video image, and obtain the coordinates of the point on the table as (x3', y3'); select the bottom right corner of the sample in the video image, and obtain the coordinates of the point on the table as (x4', y4'); obtain the sample area in the video image;
[0020] (302) Crop the image: crop the video image;
[0021] (302a) Determine the size of the cropped image: screen the video image area and the sample area in the video image, and determine the length L and the width H of the cropped image, which is specifically:
[0022] X min = min(x1, x2, x3, x4), Y min = min(y1, y2, y3, y4)
[0023] X max = max(x1, x2, x3, x4), Y max = max(y1, y2, y3, y4)
[0024] x min = min(x'1, x'2, x'3, x'4), y min = min(y'1, y'2, y'3, y'4)
[0025] x max = max(x'1, x'2, x'3, x'4), y max = max(y'1, y'2, y'3, y'4)
[0026] The length L of the cropped image = X max - X min , the width H = Y max - Y min;
[0027] (302b) determining the cropped image position: cropping in the video image region according to the following positions:
[0028] Image left position: (x min -X min ) / L; image right position: (x max -x max ) / L;
[0029] Image lower position: Image upper position:
[0030] (302c) cropping each frame image in the sample loading video according to the method of step (302a) and step (302b) to obtain the image containing the crack;
[0031] (303) image matrix processing: performing matrix processing on the obtained image containing the crack to obtain an image matrix, the column number of the image matrix is denoted as N, and the row number is denoted as M.
[0032] In the present application, step (4) is specifically:
[0033] (401) determining the image with the largest crack opening: performing OTSU threshold segmentation processing on the image matrix of each frame image in the sample loading video, then summing by column in the image matrix after threshold segmentation processing of each frame image, and the image corresponding to the minimum value of the sum result is the image with the largest crack opening;
[0034] (402) determining the crack region: calculating the pixel points in each connected domain by connected domain marking on the image with the largest crack opening, and the image position corresponding to the connected domain with the most pixel points is the crack region.
[0035] In the present application, step (5) is specifically:
[0036] (1) Crack starting position: in the image with the largest crack opening, define the position of the origin O as the point at the lower left corner of the crack region sample; in the image with the largest crack opening, the midpoint of the crack at the largest opening on the left side of the crack region is the crack starting position (x0, y0); wherein: x0=0, the calculation method of y0 is as follows: through the Find function, search for the uppermost position (h0) and the lowermost position (h1) of the crack region in the first column of the image matrix, y0=M-h1+(h1-h0) / 2; (in the present application, y0 is obtained by conversion, since the image has been processed by matrix to obtain an image matrix, the data information of y0 can be directly calculated from the image matrix by the Find function; in addition, it should be noted that: in the image, the lower left corner is the origin; after matrix processing, the upper left corner is the origin in the image matrix space. This technology is a known technology).
[0037] (2) Tip position determination: in the image with the largest crack opening, define the point at the rightmost side of the crack region as point P, and the position information obtained by searching for point P by the Find function is recorded as loc, to determine the position coordinates (x, y) of point P.
[0038]
[0039] y=x·M-loc.
[0040] In the present application, step (6) is specifically:
[0041] (601) Calculate the ratio p of the crack length in the image and the sample length in the image:
[0042]
[0043] (602) Calculate the actual length a of the crack on the sample in the sample loading video: a=p·LL.
[0044] As a preferred, step (2) is specifically: take a video of the loading process of the sample by the camera for a time length t1, then take a video of the sample for a time length t1 every time interval t2 until the end of the test, to obtain n sample loading videos.
[0045] The method of steps (3)-(6) is used to process n sample loading videos respectively, to obtain the image with the largest crack opening in each sample loading video, and to calculate and obtain the actual length of the crack on the sample in each sample loading video.
[0046] As preferred, each sample loading video is processed in sequence according to the shooting order, the crack region in the image with the largest crack opening in the first video is obtained by the method of steps (3)-(6), and the position coordinates (x1, y1) of the P point in the crack region are obtained, and the actual length a1 of the crack on the sample in the first sample loading video is calculated and obtained.
[0047] The actual length a of the crack on the sample in the remaining videos (other than the first video) is calculated. i : a i = a i -1+Δa i ;
[0048] Wherein:△a i is the crack growth, (x i , y i ) is the position coordinate value of the P point in the crack region in the corresponding video.
[0049] As preferred, a black background is arranged inside the loading device, and the sample is sprayed with white paint.
[0050] As preferred, the camera is a high-speed camera.
[0051] As preferred, the sample is an elastic material sample; preferably rubber.
[0052] As preferred, the matrix processing uses Maple, Matlab, Mathematic, MathCAD, MATLAB or python.
[0053] As preferred, the connected domain marking uses scikit image, opencv, NI Vision, Matlab or python.
[0054] As preferred, the loading device applies a sinusoidal load to the sample.
[0055] In the present application, the matrix processing, OTSU threshold segmentation processing and connected domain marking are all existing technologies, and any software or program in the prior art can be used to process the pictures. The present application ingeniously uses the synergistic technology of matrix processing, OTSU threshold segmentation processing and connected domain marking in the detection of the crack length of the material (sample), and the upper and lower links of the technical means, to achieve the technical effect of automatically finding the largest opening crack.
[0056] In the present application, the loading device loads the sample, and any frequency of load can be used, for example, a sine wave, cosine wave, triangular wave, square wave, sawtooth wave. The loading frequency is not limited, generally 1-100Hz, preferably 2-50Hz. The single shooting duration of the camera is not limited, generally 0.1s-24h, preferably 0.5-60s, more preferably 1-10s. The interval time is not limited, generally 1-10min, preferably 1.5-8min, more preferably 2-5min.
[0057] In the present application, first, the image cutting position is defined by artificial method, and the image data unrelated to the crack, such as the clamp and the loading device, is removed. Then the image after noise removal is matrix processed to obtain a digital matrix corresponding to the image, which is used for subsequent segmentation to facilitate finding the crack area and the image with the largest crack opening. Then the image matrix after cutting is processed by OTSU threshold segmentation to separate the crack area from the sample. Since the image matrix after OTSU threshold segmentation processing obtains a matrix containing only 0 and 1. The value of the dark area is 0 (crack area), and the value of the light area is 1 (unopened sample). When the opening is the largest, the corresponding background area is the largest. In order to reduce the calculation cost and improve the work efficiency, the column (the position must pass through the prefabricated crack) summation operation is directly adopted. Since the value of the crack in the image matrix after OTSU threshold segmentation is 0, the position of the column with the smallest summation result must pass through the prefabricated crack, and the smaller the value (the more the number of 0 in the image matrix), the larger the crack. Therefore, the image corresponding to the column with the smallest summation result is the image with the largest crack opening. When the minimum value is obtained, it is the image with the largest opening. Then the largest crack image is processed: since the crack area at this time is mainly a black area, the crack area is obtained by filtering the connected domain. Finally, the tip position (P point coordinates) of the crack is found in the image matrix by find function. The present application ingeniously uses the characteristics of connected domain labeling, and the crack area can be directly obtained by counting the number of pixel points.
[0058] In the present application, the combination of matrix processing, OTSU threshold segmentation processing and connected domain labeling technology realizes the automatic finding of the largest crack opening of the sample in the video. Matrix processing realizes digital processing of the image, OTSU threshold segmentation processing is conducive to further processing of the image, makes the image simple, reduces the data amount, and highlights the outline of the target of interest; summing up each column of the image matrix after OTSU threshold segmentation of each frame of image can directly find the image with the largest crack opening. Through connected domain labeling, the number of pixel points in each connected domain can be directly calculated to find the crack area in the image with the largest crack opening, which serves as the basis for crack length calculation.
[0059] In the present application, the position and size of image cropping are crucial: 1, by cropping the image, the redundant irrelevant crack information needs to be removed, and the cutting position will affect the judgment of the crack opening size; 2, by selecting points of the sample, it can be judged whether the video is horizontally shot. If it is not shot horizontally, the video can be processed by image rotation until it reaches the horizontal state to reduce the error of the crack length; 3, the position of the sample in the image corresponds to the actual sample length, so the position and size of image cropping need to be accurately selected.
[0060] In the present application, the video image is cropped: the cropping position is: left side: (x min -x min ) / L, right side: (x max -x max ) / L, upper side: (y min -y min ) / H, lower side: (y max -y max ) / H. The entire video image is regarded as 1, and the excess part of the left side, right side, upper side and lower side of the video image is cropped according to the above calculation ratio, and the remaining part is executed again. By reasonable cropping, the premise of obtaining the crack region is ensured, the excess part is cropped, the noise source is reduced, and the calculation accuracy is improved.
[0061] In the present application, the N-column and M-row image digital matrix is obtained by cropping and matrix processing, and the coordinates of the tip position can be obtained by calculation.
[0062] By using the method provided by the present application, the crack length of the sample loaded and photographed once can be detected. If the loading time of the experiment is relatively long, the crack length of the sample at different time periods or under different loading conditions is usually obtained by multiple intermittent video shooting. When multiple loading videos are shot, the above method can be repeated to automatically find the image of the crack opening in each video, and the maximum length of the crack in each loading video is further calculated.
[0063] In the present application, the shooting time length of the loading video is not limited; when multiple loading videos are obtained by multiple shooting, the time interval of shooting is also not limited. It is set according to the actual situation of the sample loading. Generally, if the loading experiment time is less than 1 min, the shooting is usually adopted; when the loading experiment time is greater than or equal to 1 min, the shooting is usually divided into multiple intermittent shootings. The single shooting time is generally 0.1 s-24 h, preferably 0.5-60 s, more preferably 1-10 s. The interval time is not limited, generally 1-10 min, preferably 1.5-8 min, more preferably 2-5 min.
[0064] In the present application, when the loading of the sample is photographed in multiple times, only the maximum length of the crack in the first loading video and the tip position of the crack in the first loading video need to be calculated; when the length of the maximum crack in the subsequent loading video is calculated, only the tip position of the crack in the corresponding loading video needs to be calculated, that is, the length of the maximum crack in each loading video can be calculated.
[0065] As preferred, in order to retrieve the error of the photographing, a paint with a large color difference from the background color of the sample is usually coated on the sample. For example, the sample is coated with white paint, and the color of the background of the photographing is black. Increasing the color difference between the sample and the background of the photographing can also improve the accuracy of the method.
[0066] In the present application, the role of the camera is only to photograph the loading video of the sample, which is not limited. A high-speed camera is generally used to obtain a clearer loading video.
[0067] In the present application, the material of the sample is not limited, which can be a flexible material or a rigid material. As preferred, a flexible material is selected; more preferably, rubber.
[0068] In the present application, the software capable of realizing matrix processing can be used in the present application, and Maple, Matlab, Mathematic, MathCAD, MATLAB or python are preferred.
[0069] In the present application, the software capable of realizing connected domain marking can be used in the present application, and scikit image, opencv, NI Vision, Matlab or python are preferred.
[0070] In the present application, the technical means not specially limited are prior art. For example, crack pre-preparation (opening with a blade), loading, reading each frame image of the video, image cropping, summation and the like are prior art.
[0071] In the present application, the equipment and loading process for loading the flexible sample are performed according to the provisions of GB / T1688-2008. The equipment and loading process for loading the metal sample are performed according to the provisions of GB / T6398-2000
[0072] Compared with the prior art, the technical scheme provided by the present application has the following beneficial technical effects:
[0073] 1. The present application can directly read the real-time video data of the photographing to read the length of the crack of the sample during the test, which greatly ensures the integrity of the test process and does not affect the entire loading process.
[0074] 2. This method can automatically identify the situation where the crack is at its maximum during the reading of dynamic video, eliminating the need for manual screening of test images and solving the tedious data processing process for test personnel.
[0075] 3. This invention employs a combination of techniques, including matrix processing of images, OTSU threshold segmentation, and connected component labeling, to automatically locate the maximum crack opening in a sample within a video, quickly identify the image of the maximum crack, and accurately calculate the maximum fatigue crack length of the sample under the corresponding conditions.
[0076] 4. Compared with manual measurement methods, the results obtained by the present invention are not only faster but also more accurate in terms of crack length. Attached Figure Description
[0077] Figure 1 A schematic diagram of a rubber sample with pre-existing cracks;
[0078] Figure 2 A schematic diagram of a rubber sample with the largest crack opening after loading using the method of the present invention;
[0079] Figure 3 A graph showing the relationship between crack length and number of cycles measured using the method of this invention.
[0080] Figure 4 The flowchart shows the specific process for detecting the fatigue crack length of a sample using the method described in Example 1. Detailed Implementation
[0081] The technical solution of the present invention will be illustrated below with examples. The scope of protection sought by the present invention includes, but is not limited to, the following embodiments.
[0082] Example 1
[0083] A fatigue crack length measurement method based on video analysis, comprising the following steps:
[0084] (1) Sample pretreatment: Cracks are pre-formed on the sample to obtain a sample with pre-formed cracks.
[0085] (2) Loading: The pre-cracked specimen is installed on the loading device and loaded; at the same time, a camera is used to capture video of the specimen during the loading process to obtain the specimen loading video.
[0086] (3) Image processing: Read each frame of the sample loading video, crop the image to obtain the image containing the crack, perform image matrix processing to obtain the image matrix;
[0087] (4) Find the image with the largest crack opening of the sample and determine the crack region: perform OTSU threshold segmentation on the image matrix, sum the columns of the image matrix after OTSU threshold segmentation of each frame image in the sample loading video, and the image matrix corresponding to the minimum sum result is the image with the largest crack opening in the sample loading video (since the image matrix after OTSU threshold segmentation has a value of 0, the column with the smallest sum result must pass through the pre-prepared crack, and the smaller the value, the larger the crack (the more the number of values 0 in the image matrix), therefore, the image corresponding to the column with the smallest sum result is the image with the largest crack opening); label the image through connected domain to obtain the crack region in the image;
[0088] (5) Crack position determination: define the origin, find the crack tip position as P point, obtain the position information of P point in the image, and determine the position coordinates (x, y) of P point;
[0089] (6) Calculate the crack length: according to the position coordinates (x, y) of P point, calculate the actual length of the crack.
[0090] Example 2
[0091] A fatigue crack length measurement method based on video analysis, the method comprising the following steps:
[0092] (1) Sample pretreatment: cut a pre-prepared crack on the sample with a blade, and measure the length of the sample, denoted as LL; obtain the sample with the pre-prepared crack;
[0093] (2) Loading: install the sample with the pre-prepared crack on the loading device, and load the sample; at the same time, use a camera to collect the video of the sample during loading, and obtain the sample loading video;
[0094] (3) Image processing:
[0095] (301) Read each frame image in the sample loading video to obtain the video image, and obtain the video image area and the sample area in the video image:
[0096] Select the top left corner of the video image to obtain the coordinates of this point on the table as (x1, y1); select the top right corner of the image to obtain the coordinates of this point on the table as (x3, y3); select the bottom left corner of the image to obtain the coordinates of this point on the table as (x2, y2); select the bottom right corner of the image to obtain the coordinates of this point on the table as (x4, y4); obtain the video image area;
[0097] Selecting the left upper vertex of the sample in the video image, the coordinate of the point on the table is (x1', y1'); selecting the left lower vertex of the sample in the video image, the coordinate of the point on the table is (x2', y2'); selecting the right upper vertex of the sample in the video image, the coordinate of the point on the table is (x3', y3'); selecting the right lower vertex of the sample in the video image, the coordinate of the point on the table is (x4', y4'); obtaining the sample region in the video image;
[0098] (302) Cropping image: cropping the video image;
[0099] (302a) Determining the size of the cropped image: screening the video image region and the sample region in the video image, determining the length L and the width H of the cropped image, which is specifically:
[0100] X nin = min(x1, x2, x3, x4), Y nin = min(y1, y2, y3, y4)
[0101] X max = max(x1, x2, x3, x4), Y max = max(y1, y2, y3, y4)
[0102] x min = min(x'1, x'2, x'3, x'4), y min = min(y'1, y'2, y'3, y'4)
[0103] x max = max(x'1, x'2, x'3, x'4), y max = max(y'1, y'2, y'3, y'4)
[0104] The length L of the cropped image = X max - X min , the width H = Y max - Y min ;
[0105] (302b) Determining the cropped position:
[0106] The left position of the image: (x min - X min ) / L; the right position of the image: (X max - x max ) / L;
[0107] The lower position of the image: The upper position of the image:
[0108] (302c) Cutting each frame image in the sample loading video according to the method of step (302a) and step (302b) to obtain the image containing the crack;
[0109] (303) Image matrix processing: performing matrix processing on the obtained image containing the crack to obtain an image matrix, the number of columns of the image matrix is denoted as N, and the number of rows is denoted as M;
[0110] (4) Finding the image with the largest crack opening of the sample and determining the crack region:
[0111] (401) Determining the image with the largest crack opening: performing OTSU threshold segmentation processing on each frame image in the sample loading video, and then performing summation on the column of the image matrix after OTSU threshold segmentation processing of each frame image, the image matrix corresponding to the minimum summation result is the image with the largest crack opening;
[0112] (402) Determining the crack region: marking the connected domain of the image with the largest crack opening, calculating the pixel points in each connected domain, and the connected domain with the most pixel points is the crack region;
[0113] (5) Determining the crack position:
[0114] (1) Crack starting position: defining the position of the origin O as the point at the lower left corner of the crack region sample in the image with the largest crack opening; the midpoint of the crack at the leftmost opening of the crack region in the image with the largest crack opening is the crack starting position (x0, y0); wherein: x0=0, and the calculation method of y0 is as follows: searching for the uppermost position (h0) and the lowermost position (h1) of the crack region in the first column of the image matrix through the Find function, and y0=M-h1+(h1-h0) / 2.
[0115] (2) Determining the tip position: defining the rightmost point of the crack region as point P in the image with the largest crack opening, and determining the position coordinates (x, y) of point P through the position information loc obtained by searching for point P through the Find function;
[0116]
[0117] y=x·M-loc;
[0118] (6) Calculating the crack length:
[0119] (601) Calculating the ratio p of the crack length in the image and the sample length in the image:
[0120]
[0121] (602) Calculating the actual length a of the crack: a=p·LL.
[0122] Example 3
[0123] Example 2 is repeated, except that step (2) is specifically video collection of the loading process of the sample by using a camera, which is specifically: shooting for a time t1, then collecting a video of time t1 for the sample every time interval t2 until the end of the test, obtaining n loading videos of the samples;
[0124] The loading videos of the n samples are processed by using the method of steps (3)-(6), respectively, to obtain the image with the largest crack opening in each loading video of the sample, and the actual length of the crack of each loading video of the sample is calculated.
[0125] Example 4
[0126] Example 3 is repeated, except that all the video images after cropping are processed in order according to the shooting order, the crack region in the image with the largest crack opening in the first video is obtained by using the method of steps (3)-(6), the position coordinates (x1, y1) of the P point in the crack region are obtained, and the actual length a1 of the crack in the first video is calculated.
[0127] The actual length a of the crack in the remaining videos is calculated i : a i = a i-1 + Δa i ;
[0128] Wherein: Δa i is the crack growth, (x i , y i ) is the position coordinate value of the P point of the crack region crack tip in the corresponding video.
[0129] Example 5
[0130] Example 2 is repeated, except that a brown background is provided inside the loading device, and white paint is sprayed on the sample.
[0131] Example 6
[0132] Example 2 is repeated, except that the camera is a high-speed camera.
[0133] Example 7
[0134] Example 2 is repeated, except that the sample is rubber.
[0135] Example 8
[0136] Example 2 is repeated, except that the matrix processing and connected domain marking use Matlab.
[0137] Example 9
[0138] Example 2 is repeated except that the matrixing and connected component labeling are performed using Python.
[0139] Example 10
[0140] Example 2 is repeated except that the matrixing is performed using Maple and the connected component labeling is performed using scikitimage.
[0141] Example 11
[0142] Example 2 is repeated except that the matrixing is performed using MathCAD and the connected component labeling is performed using opencv.
[0143] Example 12
[0144] Example 2 is repeated except that the matrixing is performed using Mathematic and the connected component labeling is performed using NIVision.
[0145] Example 13
[0146] Example 2 is repeated except that the matrixing is performed using MATLAB and the connected component labeling is performed using Matlab.
[0147] Application Example 1
[0148] A method for non-contact optical real-time measurement of crack length of rubber based on video analysis, for measuring the position of the maximum crack length of materials under cyclic loading.
[0149] Step 1: Cut a cuboid sample with a length of 150 mm (marked as LL), a width of 10 mm, and a thickness of 2 mm from a 15 cm x 15 cm EPDM rubber sheet using a blade. Preform a crack with a length of 25 mm at the left middle position of the sample, and spray white paint on the sample as shown in Figure 1 .
[0150] Step 2: Install the sample on the loading machine and arrange a black curtain behind the loading machine. Adjust the camera lens focus to make the image clear and visible, and fix the camera position. Apply sinusoidal load to the sample in the stretching mode, with a maximum tensile strain of 40% and a loading frequency of 5 Hz, to obtain the loading video of the sample.
[0151] Step 3: Read each frame image in the sample loading video, obtain the video image, select the top left corner of the video image with the mouse, and obtain the coordinates of the point on the desktop as (708, 70). Select the bottom left corner of the video image with the mouse, and obtain the coordinates of the point on the desktop as (706, 2091). Select the top right corner of the video image with the mouse, and obtain the coordinates of the point on the desktop as (3132, 69). Select the bottom right corner of the video image with the mouse, and obtain the coordinates of the point on the desktop as (3132, 2097).
[0152] Step 4: Select the top left corner of the sample in the video image, and obtain the coordinates of the point on the desktop as (845, 951). Select the bottom left corner of the sample in the video image, and obtain the coordinates of the point on the desktop as (844, 1164). Select the top right corner of the sample in the video image, and obtain the coordinates of the point on the desktop as (3045, 979). Select the bottom right corner of the sample in the video image, and obtain the coordinates of the point on the desktop as (3044, 1139). Obtain the sample area in the video image.
[0153] Step 5: Screen the obtained sample area and video image vertex coordinates, and only select the maximum and minimum values, i.e.: min X min = min (x1, x2, x3, x4) = 706, Y max = min (y1, y2, y3, y4) = 69, X max = max (x1, x2, x3, x4) = 3132,
[0154] Y min = max (y1, y2, y3, y4) = 2097; x min = min (x1', x2', x3', x4') = 844, y max = min (y1', y2', y3', y4') = 951,
[0155] x max = min (x1', x2', x3', x4') = 3045, y max = min (y1', y2', y3', y4') = 1164;
[0156] Step 6: Define the length L and width H of the video image: L = X min -X max = 2426, H = Y min -Y
[0157] Step 7: Crop the video image: the cropping position is: left side: (x min -X min ) / L = 0.0569, right side (Xmax - x max ) / L = 0.0359; upper (y min - Y min ) / H = 0.4349, lower (Y max - y max ) / H = 0.4600
[0158] Step 8: Read the image of each frame in the cropped video, and use Matlab to process each frame image into a matrix, and the number of image matrix rows is 2222, denoted as N; the number of rows is 216, denoted as M;
[0159] Step 9: Perform OTSU threshold segmentation processing on the image matrix obtained for each frame image, and sum the columns of the image matrix after OTSU threshold segmentation for each frame. Among all the summation results of the images, the image with the smallest summation value is the image with the largest crack opening of the sample in the video;
[0160] Step 10: Use Matlab to perform connected domain labeling on the image with the largest crack opening of the sample, and calculate the pixel points in each connected domain. The connected domain with the most pixel points is judged as the crack region.
[0161] Step 11: In the image with the largest crack opening, define the origin O position as the lower left corner of the image. Define the crack starting position: define the midpoint of the leftmost opening of the crack image as the crack starting position (x0, y0). Where x0 = 0, the calculation method of y0 is as follows: through the Find function to search for the uppermost position (h0 = 66) and the lowermost position (h1 = 159) of the crack region in the first column of the image matrix; y0 = M-h1+(h1-h0) / 2 = 103.5. In the image with the largest crack opening, the rightmost point of the crack region is P (the tip position), and the position information obtained by searching for the point through the Find function is recorded as loc = 81962. The position coordinates of P point in the image are the position coordinates of the crack tip (x, y),
[0162] x = [loc / M] + 1 = [81962 / 216] + 1 = 380
[0163] y = x*M-loc = 118;
[0164] Step 12: Calculate the ratio of the crack length in the image to the sample length in the image The calculated p is 0.1711
[0165] Step 13: Calculate the crack length a of the sample in the loading video with the largest crack opening, a = p*LL = 25.66 mm.
[0166] Application Example 2
[0167] A method for non-contact optical real-time measurement of rubber crack length based on video analysis is used to realize the judgment of the position of the maximum crack length of the measured material at different time periods (under different load conditions) under the action of cyclic load.
[0168] Step 1: cut a cuboid sample with a length of 150 mm (marked as LL), a width of 10 mm, and a thickness of 2 mm on a 15 cm x 15 cm EPDM rubber sheet with a knife, and pre-prepare a crack with a length of 25 mm at the left middle position of the sample, and spray white paint on the sample as shown in Figure 1 .
[0169] Step 2: install the sample on the loading machine and arrange a black curtain behind the loading machine, turn on the camera and aim at the sample, adjust the camera lens focus to make the image clear and visible, and fix the camera position;
[0170] In the tensile mode, a sinusoidal load is applied to the sample, the maximum tensile strain is 40%, the loading frequency is 5 Hz, and the mouse is clicked to start video shooting at the same time, the shooting time is about 2 s, then every 200 s, a 2 s video is shot, and the process is repeated until the experiment is completed.
[0171] Step 3: read each frame of image in the sample loading video to obtain the video image, and obtain the video image area and the sample area in the video image of each frame of video image:
[0172] Select the top left corner of the video image with the mouse to obtain the coordinates of this point on the desktop as (x1, y1), select the bottom left corner of the video image with the mouse to obtain the coordinates of this point on the desktop as (x2, y2), select the top right corner of the video image with the mouse to obtain the coordinates of this point on the desktop as (x3, y3), and select the bottom right corner of the video image with the mouse to obtain the coordinates of this point on the desktop as (x4, y4);
[0173] Select the top left corner of the sample in the video image with the mouse to obtain the coordinates of this point on the desktop as (x1', y1'); select the bottom left corner of the sample in the video image with the mouse to obtain the coordinates of this point on the desktop as (x2', y2'); select the top right corner of the sample in the video image with the mouse to obtain the coordinates of this point on the desktop as (x3', y3'); select the bottom right corner of the sample in the video image with the mouse to obtain the coordinates of this point on the desktop as (x4', y4'); and obtain the sample area in the video image;
[0174] Screen the obtained sample area and video image vertex coordinates, and only select the maximum and minimum values, that is: min X = min (x1, x2, x3, x4), Y min = min (y1, y2, y3, y4), X max= max(x1, x2, x3, x4), Y max = max(y1, y2, y3, y4); x min = min(x1', x2', x3', x4'), y min = min(y1', y2', y3', y4'), x max = min(x1', x2', x3', x4'), y max = min(y1', y2', y3', y4');
[0175] Define the length L and the width H of the video image: L = X max - X min , H = Y max - Y min ;
[0176] Crop the video image: the cropping position is: left side: (x min - X min ) / L, right side (X max - x max ) / L; upper side: (y min - Y min ) / H, lower side (Y max - y max ) / H;
[0177] Read the image of each frame of the first video after cropping, and use Matlab to perform matrix processing on each frame of image, and the number of image matrix rows is denoted as N and the number of columns is denoted as M;
[0178] Step 4: Perform OTSU threshold segmentation processing on the image matrix obtained for each frame of image, and sum each column of the image after OTSU threshold segmentation for each frame, and the image with the minimum sum value in the sum results of all images is the image with the largest crack opening of the sample in the video;
[0179] Use Matlab to perform connected domain labeling on the image with the largest crack opening of the sample, calculate the pixel points in each connected domain, and the connected domain with the largest number of pixel points is judged as the crack region.
[0180] Step 5: In the image with the largest crack opening, define the origin O position as the point at the lower left corner of the crack region sample; in the image with the largest crack opening, the midpoint of the crack with the largest opening at the left side of the crack region is the crack initiation position (x0, y0); wherein: x0 = 0, and y0 is calculated as follows: through the Find function, search for the uppermost position (h0) and the lowermost position (h1) of the crack region in the first column of the image matrix, and y0 = M - h1 + (h1 - h0) / 2. In the image with the largest crack opening, define the point P at the rightmost side of the crack region, and through the Find function, search for the position information of the point P, and the position coordinates of the point P in the image are the position coordinates (x, y) of the crack tip,
[0181] x = [loc / M] + 1
[0182] y = x * M - loc
[0183] Step 6: Calculate the ratio of the crack length in the image to the sample length in the image The actual real-time crack length a = p * LL is calculated.
[0184] Step 7: According to steps 3 to 6, process all the cropped video images in the shooting order to obtain the corresponding crack lengths a i . The crack length obtained by the first video processing is the initial crack length a0, and the corresponding cycle number is N0 = 0, the crack length obtained by the second video processing is a1, and the cycle number is N1 = 3000, the crack length obtained by the third video processing is a2, and the cycle number is N2 = 6000, and so on. The crack length versus fatigue cycle number curve is shown in Figure 3 .
[0185] Application Example 3
[0186] A non-contact optical real-time measurement method of rubber crack length based on video analysis is used to realize real-time measurement of the position of the maximum crack length of a material under cyclic loading.
[0187] Step 1: Cut a cuboid sample with a length of 150 mm (denoted as LL), a width of 10 mm, and a thickness of 2 mm from a 15 cm * 15 cm ethylene-propylene-diene rubber sheet using a blade, and pre-prepare a crack with a length of 25 mm at the middle position on the left side of the sample, and spray white paint on the sample, as shown in Figure 1 .
[0188] Step 2: Install the sample on the loading machine, arrange a black curtain behind the loading machine, and adjust the camera lens focal length to make the image clear and visible, and fix the camera position;
[0189] In tensile mode, a sinusoidal load is applied to the specimen, with a maximum tensile strain of 40% and a loading frequency of 5Hz. At the same time, the mouse is used to click the video recording button, and the recording time is about 2 seconds. Then, a 2-second video is recorded every 200 seconds until the experiment ends.
[0190] Step 3: Read each frame of the sample loading video to obtain the video image, and then obtain the video image area and the sample area in each frame of the video image:
[0191] Select the top left vertex of the video image with the mouse to obtain the coordinates of that point on the desktop as (x1, y1); select the bottom left vertex of the video image with the mouse to obtain the coordinates of that point on the desktop as (x2, y2); select the top right vertex of the video image with the mouse to obtain the coordinates of that point on the desktop as (x3, y3); and select the bottom right vertex of the video image with the mouse to obtain the coordinates of that point on the desktop as (x4, y4).
[0192] Use the mouse to select the top-left vertex of the sample in the video image and obtain its coordinates on the desktop as (x1′, y1′); select the bottom-left vertex of the sample in the video image and obtain its coordinates on the desktop as (x2′, y2′); select the top-right vertex of the sample in the video image and obtain its coordinates on the desktop as (x3′, y3′); select the bottom-right vertex of the sample in the video image and obtain its coordinates on the desktop as (x4′, y4′); thus obtaining the sample area in the video image.
[0193] The obtained sample area and video image vertex coordinates are filtered, selecting only the maximum and minimum values, i.e.: X min =min(x1,x2,x3,x4), Y min =min(y1,y2,y3,y4), X max =max(x1,x2,x3,x4), Y max =max(y1,y2,y3,y4); x min =min(x1′,x2′,x3′,x4′), y min =min(y1′,y2′,y3′,y4′),x max =min(x1′,x2′,x3′,x4′), y max =min(y1′,y2′,y3′,y4′);
[0194] Define the length L and width H of the video image: L = X max -X min H = Y max -Y min
[0195] Cropping of video images: Cropping location: Left side: (xmin - X min ) / L, right side (X max - x max ) / L; top (y min - Y min ) / H, bottom (Y max - y max ) / H;
[0196] Read the image of each frame in the first video after cropping, and use Matlab to process each frame image into a matrix, and the number of image matrix columns is denoted as N and the number of rows is denoted as M;
[0197] Step 4: Perform OTSU threshold segmentation on each frame image, and sum each column of the image after OTSU threshold segmentation of each frame. Among the sum results of all images, the image with the minimum sum value is the image with the largest crack opening of the sample in the video;
[0198] Use Matlab to perform connected domain labeling on the image with the largest crack opening of the sample, and calculate the pixel points in each connected domain. The connected domain with the most pixel points is judged as the crack region.
[0199] Step 5: In the image with the largest crack opening of the sample, define the origin O position as the point at the lower left corner of the crack region sample; in the image with the largest crack opening of the sample, the midpoint of the crack with the largest opening at the left side of the crack region is the crack initiation position (x0, y0); wherein: x0=0, and the calculation method of y0 is as follows: through the Find function, search for the uppermost position (h0) and the lowermost position (h1) of the crack region in the first column of the image matrix, and y0=M-h1+(h1-h0) / 2. In the image with the largest crack opening of the sample, define the point P at the rightmost side of the crack region as the crack region, and through the Find function, search for the position information of the point P, and the position coordinates (x, y) of the crack tip in the image are
[0200] x=[loc / M]+1
[0201] y=x·M-loc;
[0202] Step 6: Calculate the ratio of the crack length in the image to the sample length in the image The crack length a1 with the largest crack opening in the first video is calculated as p·LL;
[0203] Step 7: Process all video images after cropping in order according to steps 3 to 6 to obtain the corresponding crack length a i ; wherein: i is the order number of the video, such as the first (i=1), the second (i=2), the third (i=3), …, the nth (i=n).
[0204] a i = a i-1 + Δa i ;
[0205] wherein: Δa i is the crack growth amount, (x i , y i ) is the position coordinate value of the crack region P point corresponding to the maximum image of the crack opening in the video.
Claims
1. A fatigue crack length measurement method based on video analysis, the method comprising the following steps: (1) Sample pretreatment: Crack pretreatment is performed on the sample by cutting a pre-crack on the sample with a blade and measuring the length of the sample, which is recorded as LL; thus, a sample with pre-crack is obtained. (2) Loading: The pre-cracked specimen is installed on the loading device and loaded; at the same time, a camera is used to capture video of the specimen during the loading process to obtain the specimen loading video. (3) Image processing: Read each frame of the sample loading video, crop the image to obtain the image containing the crack, perform image matrix processing to obtain the image matrix, the number of columns of the image matrix is denoted as N, and the number of rows is denoted as M; (4) Determine the image with the largest crack opening: Perform OTSU threshold segmentation on the image matrix of each frame in the loading video of the sample, and then sum the images in the image matrix after threshold segmentation of each frame. The image matrix corresponding to the minimum sum is the image with the largest crack opening; Determine the crack region: Mark the image with the largest crack opening through connected components, calculate the pixels in each connected component, and the image position corresponding to the connected component with the most pixels is the crack region. (5) Crack location determination: Define the origin, find the crack tip location as point P, obtain the position information of point P in the image, and determine the position coordinates (x, y) of point P; specifically: (1) Crack initiation position: In the image with the largest crack opening, the origin O is defined as the point at the lower left corner of the sample in the crack region; in the image with the largest crack opening, the midpoint of the crack when the leftmost opening of the crack region is the largest is the crack initiation position (x0, y0); where: x0=0, and y0 is calculated as follows: the uppermost position (h0) and the lowermost position (h1) of the crack region in the first column of the image matrix are retrieved by the Find function, and y0=M-h1+(h1-h0) / 2; (2) Determining the tip position: In the image with the largest crack opening, define the rightmost point of the crack region as point P. The position information obtained by searching for point P through the Find function is denoted as loc. The position coordinates (x, y) of point P are determined. y = x·M - loc; (6) Calculate the crack length: Based on the position coordinates (x, y) of point P, calculate the actual crack length; specifically: (601) Calculate the ratio p of the crack length to the sample length in the image: (602) Calculate the actual length a of the crack on the specimen in the loading video: a = p·LL.
2. The method according to claim 1, characterized in that: In step (1), a coating with a large color difference from the background inside the loading device is sprayed onto the sample.
3. The method according to claim 1, characterized in that: Step (3) specifically involves: (301) Read each frame of the sample loading video to obtain the video image, and obtain the video image area and the sample area in each frame of the video image: Select the top-left vertex of the video image and obtain its coordinates on the desktop as (x1, y1); select the bottom-left vertex of the video image and obtain its coordinates on the desktop as (x2, y2); select the top-right vertex of the video image and obtain its coordinates on the desktop as (x3, y3); select the bottom-right vertex of the video image and obtain its coordinates on the desktop as (x4, y4); thus obtaining the video image region. Select the top-left vertex of the sample in the video image and obtain its coordinates on the table as (x1′, y1′); select the bottom-left vertex of the sample in the video image and obtain its coordinates on the table as (x2′, y2′); select the top-right vertex of the sample in the video image and obtain its coordinates on the table as (x3′, y3′); select the bottom-right vertex of the sample in the video image and obtain its coordinates on the table as (x4′, y4′); thus obtaining the sample area in the video image. (302) Image cropping: Cropping video images; (302a) Determine the size of the cropped image: Screen the video image area and the sample area in the video image to determine the length L and width H of the cropped image, specifically as follows: X min =min(x1,x2,x3,x4),Y min =min(y1,y2,y3,y4) X max =max(x1,x2,x3,x4),Y max =max(y1,y2,y3,y4) x min =min(x′1,x′2,x′3,x′4),y min =min(y′1,y′2,y′3,y′4) x max =max(x′1,x′2,x′3,x′4),y max =max(y′1,y′2,y′3,y′4); The length of the cropped image is L = X max -X min Width H = Y max -Y min ; (302b) Determine the cropping image location: Crop the video image area at the following locations: Left side of the image: (x) min -X min ) / L; Right side of the image: (X max -x max ) / L; The area below the image: Top of image: (302c) Following the methods of steps (302a) and (302b), each frame of the sample loading video is cropped to obtain an image containing the crack; (303) Image matrixing: The obtained image containing cracks is matrixed to obtain the image matrix.
4. The method according to any one of claims 1-3, characterized in that: In step (2), the video acquisition of the loading process of the sample using a camera is specifically as follows: the shooting time is t1, and then the sample is captured once for a duration of t1 at every interval of t2 until the end of the test, so as to obtain n sample loading videos. The loading videos of n samples are processed using the methods in steps (3) to (6) to obtain the image with the largest crack opening in each loading video of the sample, and the actual length of the crack on the sample in each loading video of the sample is calculated.
5. The method according to claim 4, characterized in that: Process each sample loading video sequentially according to the shooting order, and use the method of steps (3) to (6) to obtain the crack region in the image with the largest crack opening in the first video, and obtain the position coordinates (x1, y1) of the crack region P1, and calculate the actual length a1 of the crack on the sample in the first sample loading video. Calculate the actual length 'a' of the crack on the specimen in the remaining video. i :a i =a i-1 +Δa i ; Where: △a i This represents the amount of crack growth. (x i y i ) represents the crack region P in the i-th video. i The position coordinates of the point.
6. The method according to any one of claims 1-3, characterized in that: The loading device has a black background inside, and the sample is sprayed with white paint; and / or The camera is a high-speed camera; and / or The sample is an elastic material sample.
7. The method according to claim 6, characterized in that: The sample was made of rubber.
8. The method according to any one of claims 1-3, characterized in that: The matrix processing is performed using Maple, Matlab, Mathematic, MathCAD, MATLAB, or Python; and / or The connected component labeling uses scikit-image, OpenCV, NI Vision, Matlab, or Python; and / or The loading device applies a sinusoidal load to the sample.
Citation Information
Patent Citations
Method for testing fatigue crack propagation rates with asymmetric cracks
CN106092785A
Fatigue crack propagation real-time monitoring method based on structure surface displacement field
CN113865487A
Dynamic crack length measurement method for machine vision fatigue crack propagation test
CN102692188A
Road crack size estimation method based on mobile phone photographing
CN106706647A