A digital image correlation method based on variable window matching technology
Through the digital image-related method based on variable window matching technology and Mx matrix, the problem of search time and low accuracy in the prior art is solved, and fast and accurate pixel point matching and deformation parameter calculation is achieved, which is suitable for surface strain measurement of two-dimensional or three-dimensional objects.
Patent Information
- Application Number
- CN202310168435.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-27
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-02-27
AI Technical Summary
Existing digital image-related methods take a long time to search the entire pixel, and sub-pixel search is prone to local optimality, and is affected by factors such as light and angle, so the measurement accuracy is not high.
The variable window matching technology is used to record the pixel point calculation results through the variable search window and the Mx matrix, and combine the ICGN algorithm to achieve fast and accurate measurement of the whole pixel, avoid repeated calculations, and improve calculation efficiency and accuracy.
It greatly reduces the search time, improves the efficiency and accuracy of pixel point matching, especially in the full-field displacement and strain measurement, and has the ability to correct search errors.
Smart Images

Figure CN116342490B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a digital image correlation method based on variable window matching technology. Background Art
[0002] Digital image correlation (DIC) is a non-contact, non-interferometric, full-field optical measurement method widely used for full-field displacement and strain measurement. Natural or artificially applied speckle patterns on an object's surface change as the object deforms or shifts. By capturing speckle patterns before and after deformation and comparing their correlations, the full-field displacement and strain of the object can be calculated.
[0003] Digital image correlation methods are typically divided into two parts: integer pixel search and sub-pixel search. Common integer pixel search algorithms include point-by-point search, manual calibration, hill climbing search, and artificial fish school search. Point-by-point search is a global search algorithm with high accuracy but high time consumption. Intelligent searches such as hill climbing search and artificial fish school search are prone to local optimal errors. Manual calibration methods are inconvenient to operate.
[0004] The measurement accuracy of digital image correlation methods depends primarily on sub-pixel measurement accuracy. The most commonly used sub-pixel measurement method is the Inverse Combination of Gauss-Newton (ICGN) algorithm. This iterative algorithm requires a relatively accurate initial deformation guess, typically using the whole-pixel search result as the initial guess for sub-pixel search. Summary of the Invention
[0005] In order to address the defects of the digital image correlation method in the above-mentioned prior art, the present invention proposes a digital image correlation method based on variable window matching technology, which is a fast search method that can be used for integer pixel search. It adopts a variable search window to achieve fast and accurate integer pixel measurement, greatly improving the pixel matching efficiency and shortening the calculation time.
[0006] The present invention proposes a digital image correlation method based on variable window matching technology. First, the best matching pixel point of at least one arbitrary calculation point on a reference image on a target image is obtained; then, based on the best matching pixel point, the deformation parameter value between the target image and the reference image is calculated; the reference image is an image of the specimen before deformation, and the target image is an image of the specimen after deformation; obtaining the best matching pixel point includes the following steps:
[0007] SA1. Let the pixel coordinates of the calculation point on the reference image be (x0, y0), and the calculation point be P(x0, y0). Obtain a first set area centered on P(x0, y0) on the reference image as the reference sub-area R. Obtain a second set area centered on the pixel coordinates (x0, y0) on the target image as the search area.
[0008] SA2. Obtain the correlation coefficient between each pixel point in the search area and the calculation point P(x0, y0); let the first set area of the search area centered on the pixel point Q(x1, y1) be the target sub-area corresponding to the pixel point Q(x1, y1); the correlation coefficient between the pixel point Q(x1, y1) in the search area and the calculation point P(x0, y0) be the correlation coefficient between the target sub-area corresponding to Q(x1, y1) and the reference sub-area R;
[0009] SA3, determine whether there is a pixel point in the search area whose corresponding correlation coefficient is greater than the set correlation threshold;
[0010] SA4: No, then expand the search area with the pixel coordinate (x0, y0) as the center to form a new search area, obtain the correlation coefficient between each pixel point in the new search area and the calculation point P(x0, y0), and then return to step SA3;
[0011] SA5. If yes, obtain the pixel point with the largest corresponding correlation coefficient in the search area as the best matching pixel point of the calculation point.
[0012] Preferably, the calculation formula of the correlation coefficient between the target sub-area and the reference sub-area in step SA2 is as follows:
[0013]
[0014] Where R(x,y) is the grayscale value of the pixel with the pixel coordinates (x,y) in the reference sub-region R, and T(x',y') is the grayscale value of the pixel with the pixel coordinates (x',y') in the target sub-region T. is the average grayscale of the reference sub-region R, is the average grayscale of the target sub-region T; Indicates that the position of the pixel point with pixel coordinates (x', y') in the target sub-area T on the target sub-area T is equal to the position of the pixel point with pixel coordinates (x, y) in the reference sub-area R on the reference sub-area R; that is, the vector coordinates formed by the pixel point (x', y') on the target sub-area T and the center point of the target sub-area T are equal to the vector coordinates formed by the pixel point (x, y) on the reference sub-area R and the center point of the reference sub-area R.
[0015] Preferably, step SA2 also includes constructing an Mx matrix in which nodes correspond one-to-one to pixels in the search area, and in SA2, the correlation coefficients corresponding to the pixels in the search area are filled into the corresponding nodes in the Mx matrix; step SA3 specifically determines whether there is a node in the Mx matrix with a value greater than a set correlation threshold; if not, step SA4 is executed, and SA4 also includes expanding the Mx matrix according to the search area expansion result; if yes, step SA5 is executed.
[0016] Preferably, step SA4 is specifically as follows: expanding the search area with the pixel coordinate (x0, y0) as the center to form a new search area; expanding the Mx matrix according to the new search area so that the pixel points in the new search area correspond one-to-one to the nodes of the expanded Mx matrix; traversing the nodes in the Mx matrix, when the node is assigned an initial value, calculating the correlation coefficient between the pixel point corresponding to the node in the search area and the calculation point P (x0, y0) and filling it into the node in the Mx matrix.
[0017] Preferably, in SA2, the initial value of each node in the Mx matrix is -1; in SA4, the initial value of each newly added node in the Mx matrix is -1.
[0018] Preferably, the method comprises the following steps:
[0019] S1, taking images of the specimen before and after deformation, using the image before deformation as a reference image and the image after deformation as a target image;
[0020] S2. Set a region of interest on the reference image, filter the calculation points within the region of interest, and obtain the deformation parameter set of the reference sub-region centered on the calculation point on the reference image. where u x represents the horizontal displacement of the reference sub-area, v y represents the vertical displacement of the reference sub-area, represents the horizontal stretching of the reference subarea, represents the horizontal clipping of the reference subarea, represents the vertical shear of the reference sub-area, represents the vertical stretch of the reference subarea;
[0021] The deformation parameter set for each reference sub-area Perform iterations to obtain the parameter group values when the iterations converge as the deformation parameter values of the reference sub-region;
[0022] Deformation parameter group corresponding to some calculation points The initial assignment value is {u0, v0, 0, 0, 0, 0}, where u0 is the horizontal displacement between the calculation point and the corresponding best matching pixel, and v0 is the vertical displacement between the calculation point and the corresponding best matching pixel;
[0023] The deformation parameter group corresponding to the other part of the calculation points The initial value of is the deformation parameter value corresponding to the calculated adjacent calculation point.
[0024] Preferably, step S2 specifically includes the following steps:
[0025] S21. Set a region of interest on the reference image, filter calculation points within the region of interest, and set a deformation parameter group. Let the first calculated point be the detection point;
[0026] S23, obtaining the best matching pixel point of the detection point on the target image; calculating the horizontal displacement u0 and the vertical displacement v0 by combining the detection point and the corresponding best matching pixel point;
[0027] S24, set the deformation parameter group of the detection point The initial value of is {u0, v0, 0, 0, 0, 0}; then the deformation parameter group is iterated using the ICGN algorithm, and the parameter group value when the iteration converges is obtained as the deformation parameter value of the reference sub-area with the detection point as the center point;
[0028] S25. If there are calculation points in the region of interest where the deformation parameter values are not calculated, the calculation points adjacent to the detection points are used as new detection points, and the deformation parameter set of the detection points is set to The initial value of is the deformation parameter value of the previous detection point;
[0029] S26, iterating the deformation parameter group of the detection point using the ICGN algorithm;
[0030] If the deformation parameter group converges within the set number of iterations, the parameter group value at the time of iteration convergence is obtained as the deformation parameter value of the reference sub-region with the detection point as the center point, and then the process returns to step S25;
[0031] If the deformation parameter group does not converge within the set number of iterations, the pixel point (x2+u,y2+v) on the reference image is used as the detection point, and then returns to step S23; (x2,y2) represents the pixel coordinates of the previous detection point, u is the rounded value of the horizontal displacement in the deformation parameter value corresponding to (x2,y2), and v is the rounded value of the vertical displacement in the deformation parameter value corresponding to (x2,y2); the horizontal displacement rounding and the vertical displacement rounding are rounded off, rounded down or rounded up.
[0032] Preferably, the iterative convergence condition of the deformation parameter group is that the iterative accuracy of the two most recent deformation parameter groups reaches a set accuracy threshold δ, and the calculation formula of the iterative accuracy Δp of the two most recent deformation parameter groups is:
[0033]
[0034] Where Δu x represents the horizontal displacement u in the last two sets of deformation parameters x The difference, Δv y represents the vertical displacement v in the last two sets of deformation parameters y difference, Indicates the horizontal stretching in the last two sets of deformation parameters difference, Represents the horizontal shear in the last two sets of deformation parameters difference, Represents the vertical shear in the last two sets of deformation parameters difference, Represents the vertical stretch in the last two sets of deformation parameters difference.
[0035] The advantages of the present invention are:
[0036] (1) The digital image correlation method based on variable window matching technology provided by the present invention adopts a variable search area. Compared with the existing whole pixel search which requires a full-field search, the present invention only needs to search some pixel points, which greatly reduces the search time, improves the pixel matching efficiency, and greatly saves the pixel matching search time, thereby further improving the calculation efficiency of the deformation parameter group.
[0037] (2) The present invention calculates the degree of pixel matching based on regional correlation, which helps to avoid the influence of off-site factors such as light and angle, thereby improving the accuracy of pixel matching.
[0038] (3) The present invention uses the Mx matrix to record the pixel point calculation results, which is conducive to preserving data and improving calculation efficiency and accuracy; in particular, by combining the Mx matrix with the variable search area, repeated calculations are avoided, further improving calculation efficiency.
[0039] (4) In the present invention, ideally, only the first calculation point needs to be searched for the best matching pixel. The deformation parameter groups corresponding to the remaining calculation points can be assigned initial values based on the previous calculation point. In this way, by assigning initial values to the deformation parameter groups, the initial values of the iterations are closer to the actual values, allowing the iterations to converge faster while ensuring accuracy. The present invention does not require a full-field integer pixel search. Instead, an integer pixel search is performed only for the first point and points where a sub-pixel search fails, which improves the calculation speed and has the ability to correct search errors.
[0040] (5) The present invention also excludes areas of transitional deformation through the convergence constraint of the ICGN algorithm, thereby identifying calculation points that are not suitable for assigning initial values of the deformation parameter group through the previous calculation point, and then selecting new detection points outside the reference sub-area of the previous calculation point to calculate the best matching pixel point, and then calculating the deformation parameter value based on the best matching pixel point, thereby ensuring the calculation accuracy of the deformation parameter value corresponding to each calculation point.
[0041] (6) The present invention significantly improves the speed of full-field displacement calculation, especially when the number of calculation points increases. The present invention provides a universal, fast, accurate, and robust digital image correlation algorithm that can be used in two-dimensional or three-dimensional surface strain measurement. It can quickly and accurately calculate the full-field displacement of the object surface and has the function of correcting search errors, thereby calculating the full-field strain of the object surface. It has high practical application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a flowchart of a pixel matching method;
[0043] Figure 2 Schematic diagram of the correlation coefficient calculation process;
[0044] Figure 3 Expand the schematic diagram for the search area;
[0045] Figure 4 This is a flow chart of a digital image correlation method based on variable window matching technology in Example 3;
[0046] Figure 5 Schematic diagram of the reference image and region of interest;
[0047] Figure 6 Schematic diagram of the number of iterations of the deformation parameter group for each pixel when using the traditional deformation detection method;
[0048] Figure 7 Schematic diagram of the number of iterations of the deformation parameter group for each pixel point when using Example 3;
[0049] Figure 8 This is a time comparison chart of the two methods;
[0050] Figure 9 This is a flow chart of another digital image correlation method based on variable window matching technology. DETAILED DESCRIPTION
[0051] Example 1: A pixel matching method
[0052] A pixel matching method proposed in this embodiment is used to obtain matching pixels on an image captured after a test piece is denatured and on an image captured before the test piece is denatured.
[0053] For the convenience of description, in this embodiment, the image captured before the specimen is deformed is recorded as the reference image, and the image captured after the specimen is deformed is recorded as the target image; the pixel points on the reference image are used as calculation points, and the best matching pixel points of any calculation point on the target image can be obtained by the pixel matching method of this embodiment. Figure 1 The specific steps are shown as SA1-SA5 below.
[0054] SA1. Let the pixel coordinates of the calculation point on the reference image be (x0, y0), and the calculation point be P(x0, y0); obtain the first set area centered on P(x0, y0) on the reference image as the reference sub-area R; obtain the second set area centered on the pixel coordinates (x0, y0) on the target image as the search area.
[0055] In a specific implementation, the first set area can be set as an M1×M1 rectangular area, that is, the first set area includes M1 rows of pixels and M1 columns of pixels. The second set area can be set as an area of the same size and shape as the first set area, or it can be set as an area of a different size and shape. In this embodiment, for ease of operation, the second set area is also set as an M1×M1 rectangular area, that is, the second set area includes M1 rows of pixels and M1 columns of pixels.
[0056] SA2. Obtain the correlation coefficient between each pixel point in the search area and the calculation point P(x0, y0); let the first set area of the search area centered on the pixel point Q(x1, y1) be recorded as the target sub-area corresponding to the pixel point Q(x1, y1); the correlation coefficient between the pixel point Q(x1, y1) and the calculation point P(x0, y0) in the search area is the correlation coefficient between the target sub-area corresponding to Q(x1, y1) and the reference sub-area R.
[0057] Let the correlation coefficient between the pixel point Q(x1,y1) in the search area and the calculation point P(x0,y0) be recorded as C, then:
[0058]
[0059]
[0060] Where R(x,y) is the grayscale value of the pixel with the pixel coordinates (x,y) in the reference sub-region R, and T(x',y') is the grayscale value of the pixel with the pixel coordinates (x',y') in the target sub-region T. is the average grayscale of the reference sub-region R, is the average grayscale of the target sub-region T; Indicates that the position of the pixel point with pixel coordinates (x', y') in the target sub-region T on the target sub-region T is equal to the position of the pixel point with pixel coordinates (x, y) in the reference sub-region R on the reference sub-region R; that is, the vector coordinates formed by the pixel point (x', y') on the target sub-region T and the center point of the target sub-region T are equal to the vector coordinates formed by the pixel point (x, y) on the reference sub-region R and the center point of the reference sub-region R. The calculation of the correlation coefficient C can be referred to Figure 2 .
[0061] SA3, determine whether there is a pixel point in the search area whose corresponding correlation coefficient is greater than the set correlation threshold;
[0062] SA4: No, then expand the search area with the pixel coordinate (x0, y0) as the center to form a new search area, obtain the correlation coefficient between each pixel point in the new search area and the calculation point P(x0, y0), and then return to step SA3;
[0063] SA5. If yes, obtain the pixel point with the largest corresponding correlation coefficient in the search area as the best matching pixel point of the calculation point.
[0064] In this embodiment, the process of expanding the search area can refer to Figure 3 .
[0065] Example 2
[0066] This embodiment is a further improvement on the basis of embodiment 1. Specifically, in this embodiment, an Mx matrix is constructed in SA2, in which nodes correspond one to one with pixels in the search area, so as to calculate the correlation coefficient of each pixel in the search area through the Mx matrix.
[0067] The specific steps in this embodiment are as follows:
[0068] SA1. Let the pixel coordinates of the calculation point on the reference image be (x0, y0), and the calculation point be P(x0, y0). Obtain a first set area centered on P(x0, y0) on the reference image as the reference sub-area R. Obtain a second set area centered on the pixel coordinates (x0, y0) on the target image as the search area.
[0069] SA2. Construct an Mx matrix with one-to-one correspondence between nodes and pixels in the search area, obtain the correlation coefficient between each pixel in the search area and the calculation point P(x0, y0), and fill the correlation coefficient corresponding to each pixel in the search area into the corresponding node in the Mx matrix; let the first set area of the search area centered on the pixel point Q(x1, y1) be recorded as the target sub-area corresponding to the pixel point Q(x1, y1); the correlation coefficient between the pixel point Q(x1, y1) in the search area and the calculation point P(x0, y0) is the correlation coefficient between the target sub-area corresponding to Q(x1, y1) and the reference sub-area R;
[0070] In SA1, the second set area is set to a rectangular area to facilitate the correspondence between the nodes of the Mx matrix and the nodes within the search area. In specific implementations, the initial value of each node in the Mx matrix can be set to -1. In this way, in SA2, the correlation coefficient of the pixels corresponding to the node assigned a value of -1 can be calculated by traversing the nodes of the Mx matrix, and then the correlation coefficient is used as the value assigned to the node.
[0071] SA3, determine whether there is a node in the Mx matrix with a value greater than the set correlation threshold;
[0072] SA4: No, expand the search area with the pixel coordinate (x0, y0) as the center to form a new search area; expand the Mx matrix based on the new search area so that the pixels in the new search area correspond one-to-one with the nodes of the expanded Mx matrix, and the initial value of each newly added node in the Mx matrix is -1; traverse the nodes in the Mx matrix, and when a node is assigned the initial value of -1, calculate the correlation coefficient between the pixel point corresponding to the node in the search area and the calculation point P(x0, y0), and fill it in the node in the Mx matrix, and then return to step SA3;
[0073] SA5. If yes, obtain the pixel point with the largest corresponding correlation coefficient in the search area as the best matching pixel point of the calculation point.
[0074] The expanded search area in SA4 remains rectangular, facilitating the expansion of the Mx matrix. After the Mx matrix is expanded, the original nodes retain their original values. This allows calculations to be performed only for the pixels corresponding to the newly added nodes. This means that the correlation coefficients for each pixel in the original search area are recorded using the Mx matrix. After the search area is expanded, only the correlation coefficients for the newly added pixels in the expanded search area need to be calculated. This reduces workload and improves efficiency.
[0075] Example 3: A digital image correlation method based on variable window matching technology
[0076] The image of the specimen before deformation is used as the reference image, and the image of the specimen after deformation is used as the target image. The digital image correlation method based on the variable window matching technology provided in this embodiment divides the reference image into multiple reference sub-areas, obtains the target sub-area corresponding to each reference sub-area on the target image, and calculates the deformation parameters from the reference sub-area to the target sub-area one by one, that is, the horizontal displacement u x , vertical displacement v y , horizontal stretch Horizontal shear Vertical shear and vertical stretch
[0077] Reference Figure 4 The digital image correlation method based on the variable window matching technology in this embodiment includes the following steps S1, S21-S25.
[0078] S1, taking images of the specimen before and after deformation, using the image before deformation as a reference image and the image after deformation as a target image;
[0079] S21. Set a region of interest on the reference image, filter calculation points within the region of interest, and set a deformation parameter group. The first calculated point is used as the detection point. In specific implementation, in this step, the region of interest can be gridded and the grid intersections can be extracted as calculation points.
[0080] S23, performing the digital image correlation method based on the variable window matching technology provided by the present invention on the detection point to obtain the best matching pixel point of the detection point on the target image; combining the detection point and the corresponding best matching pixel point to calculate the horizontal displacement u0 and the vertical displacement v0;
[0081] Let the coordinates of the detection point on the reference image be labeled (x p ,y p ), let the coordinates of the best matching pixel corresponding to the detection point on the target image be (x p ',y p '); then u0=x p -x p ', v0 = y p -y p '.
[0082] S24, set the deformation parameter group of the detection point The initial assignment value is {u0, v0, 0, 0, 0, 0}; then the ICGN algorithm is used to iterate the deformation parameter group, and the parameter group value when the iteration converges is obtained as the deformation parameter value of the reference sub-area with the detection point as the center point.
[0083] In this embodiment, when the iteration accuracy of the two most recent deformation parameter groups reaches a set accuracy threshold δ, it indicates that the deformation parameter group iteration has converged. In this embodiment, the calculation formula for the iteration accuracy Δp of the two most recent deformation parameter groups is:
[0084]
[0085] Where Δu x represents the horizontal displacement u in the last two sets of deformation parameters x The difference, Δv y represents the vertical displacement v in the last two sets of deformation parameters y difference, Indicates the horizontal stretching in the last two sets of deformation parameters difference, Represents the horizontal shear in the last two sets of deformation parameters difference, Represents the vertical shear in the last two sets of deformation parameters difference, Represents the vertical stretch in the last two sets of deformation parameters difference.
[0086] S25. If there are calculation points in the region of interest where the deformation parameter values are not calculated, the calculation points adjacent to the detection point are used as new detection points, that is, the detection point is updated to the calculation points adjacent to the detection point and where the deformation parameter values are not calculated; let the deformation parameter group of the detection point be The initial assignment value is the same as the deformation parameter value of the previous detection point;
[0087] S26, iterating the deformation parameter group of the detection point using the ICGN algorithm;
[0088] If the deformation parameter group converges within the set number of iterations, the parameter group value at the time of iteration convergence is obtained as the deformation parameter value of the reference sub-region with the detection point as the center point, and then the process returns to step S25;
[0089] If the deformation parameter group does not converge within the set number of iterations, the pixel point (x2+u,y2+v) on the reference image is used as the detection point, and then returns to step S23; (x2,y2) represents the pixel coordinates of the previous detection point, u is the rounded value of the horizontal displacement in the deformation parameter value corresponding to (x2,y2), and v is the rounded value of the vertical displacement in the deformation parameter value corresponding to (x2,y2); the horizontal displacement rounding and the vertical displacement rounding are rounded off, rounded down or rounded up.
[0090] In this embodiment, the pixel matching method provided by the present invention employs a variable search area to find the best matching pixel for a calculation point, significantly reducing computational effort and improving computational efficiency. Ideally, in this embodiment, only the first calculation point needs to be searched for the best matching pixel; the deformation parameter groups corresponding to the remaining calculation points can be assigned initial values based on the previous calculation point. In this embodiment, the convergence constraints of the ICGN algorithm are also used to exclude regions of transitional deformation, thereby identifying calculation points that are not suitable for assigning initial values to the deformation parameter group based on the previous calculation point. Consequently, a new detection point is selected outside the reference subregion of the previous calculation point to calculate the best matching pixel. The deformation parameter values are then calculated based on the best matching pixel, ensuring the computational accuracy of the deformation parameter values corresponding to each calculation point.
[0091] In order to verify the effect of this embodiment, the present invention Figure 5 The reference image shown is used for deformation detection. Figure 5 The area indicated by the white rectangle in the middle is the region of interest, and the attached figure does not show the deformed image.
[0092] In this embodiment, the reference image size is 900x280 pixels, and the region of interest is 400x200 pixels. In this embodiment, the region of interest is gridded to extract calculation points, with a grid point spacing of 2 pixels. In this embodiment, a total of 20,000 calculation points are used. In this embodiment, the pixel at the upper left corner of the region of interest is used as the first calculation point, and the pixel coordinates of the first calculation point are (30, 30).
[0093] In this embodiment, the method shown in Example 3 and the traditional deformation detection method are respectively used to calculate the deformation parameter values corresponding to each calculation point in the region of interest, that is, the 6 deformation parameters in the deformation parameter group corresponding to each calculation point.
[0094] The traditional deformation detection method first calculates the best matching pixel point of each calculation point on the target image, and uses the entire region of interest as the search area when calculating the best matching pixel point; then, step S24 of the present invention is executed for each calculation point to obtain the deformation parameter value corresponding to each calculation point.
[0095] The results of this verification are shown in the following table;
[0096] Table 1: Validation data statistics
[0097]
[0098] During this verification process, the number of iterations of the deformation parameter group of each pixel point when using the traditional deformation detection method is as follows: Figure 6 As shown, when using Example 3, the number of iterations of the deformation parameter group of each pixel point is as follows: Figure 7 As shown; the calculation time of the two methods is as follows Figure 8 Combined with Table 1, Figure 6 、 Figure 7 、 Figure 8 It can be seen that the digital image correlation method based on the variable window matching technology adopted in Example 3 greatly improves the calculation efficiency and greatly saves the calculation cost. Figure 8 It can be seen that the greater the number of calculation points, the more outstanding the calculation efficiency of Example 3 is.
[0099] It is worth noting that the embodiment 3 provides an optimal solution. In specific implementation, the digital image correlation method based on the variable window matching technology provided by the present invention can be simplified into the following steps S1 and S2, specifically referring to Figure 9 .
[0100] S1, taking images of the specimen before and after deformation, using the image before deformation as a reference image and the image after deformation as a target image;
[0101] S2. Set a region of interest on the reference image, filter the calculation points within the region of interest, and obtain the deformation parameter set of the reference sub-region centered on the calculation point on the reference image. where u x represents the horizontal displacement of the reference sub-area, v y represents the vertical displacement of the reference sub-area, represents the horizontal stretching of the reference subarea, represents the horizontal clipping of the reference subarea, represents the vertical shear of the reference sub-area, represents the vertical stretch of the reference subarea;
[0102] The deformation parameter set for each reference sub-area Iterate and obtain the parameter group value when the iteration converges as the deformation parameter value of the reference sub-area; in this embodiment, the calculation points are divided into two parts;
[0103] The first part calculates the deformation parameter group corresponding to the point The initial value of is {u0, v0, 0, 0, 0, 0}, where u0 is the horizontal displacement between the calculation point and the corresponding best matching pixel, and v0 is the vertical displacement between the calculation point and the corresponding best matching pixel. The best matching pixel corresponding to the calculation point is obtained through steps SA1-SA5 of the pixel matching method provided by the present invention.
[0104] The second part calculates the deformation parameter group corresponding to the point The initial value of is the deformation parameter value corresponding to the calculated adjacent calculation point.
[0105] In practice, since the pixel matching method provided by the present invention can significantly improve pixel matching efficiency, it is estimated that even if all calculation points are used as the first part of the calculation points, the calculation efficiency is still better than that of traditional technical solutions. In this case, the number of calculation points in the second part is 0, which is also within the scope of protection of the present invention.
[0106] During specific implementation, the division of the first part of calculation points and the second part of calculation points can adopt the method given in Example 3, that is, the first calculation point and the calculation point that the iteration cannot converge are used as the first part of calculation points, and the remaining calculation points are used as the second part of calculation points; other division methods can also be used, such as interval distribution, so that all calculation points are divided into the first part and the second part in an interval manner, for example, adjacent calculation points are distributed and belong to the first part and the second part.
[0107] In specific implementation, the ICGN algorithm is used to iterate the deformation parameter group of the detection point to determine whether the deformation parameter group converges within the set number of iterations, and the following steps SB1-SB4 are performed.
[0108] SB1. Obtain the value of the deformation parameter group;
[0109] SB2. Determine whether the iteration accuracy of the two most recent deformation parameter groups reaches a set accuracy threshold; if so, determine that the iterations have converged, and use the values of the most recently updated deformation parameter group as the deformation parameter values; if not, execute step SB3;
[0110] SB3, determining whether the number of updates of the deformation parameter group has reached the set number of iterations; if yes, determining that the deformation parameter group has not converged within the set number of iterations; if not, executing step SB4;
[0111] SB4. Deform the reference sub-area corresponding to the detection point in combination with the values of the deformation parameter group to obtain the deformed area; calculate the correlation coefficient between the reference area and the deformed area as the evaluation coefficient, and update the values of the deformation parameter group according to the ICGN algorithm based on the evaluation coefficient, and then return to step SB2.
[0112] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A digital image correlation method based on variable window matching technology, characterized in that: First, the best matching pixel point of at least one arbitrary calculation point on the reference image on the target image is obtained; then, based on the best matching pixel point, the deformation parameter value between the target image and the reference image is calculated; the reference image is the image of the specimen before deformation, and the target image is the image of the specimen after deformation; The acquisition of the best matching pixel point includes the following steps: SA1. Let the pixel coordinates of the calculation point on the reference image be (x0, y0), and the calculation point be P(x0, y0). Obtain a first set area centered on P(x0, y0) on the reference image as the reference sub-area R. Obtain a second set area centered on the pixel coordinates (x0, y0) on the target image as the search area. SA2. Obtain the correlation coefficient between each pixel point in the search area and the calculation point P(x0, y0); let the first set area of the search area centered on the pixel point Q(x1, y1) be the target sub-area corresponding to the pixel point Q(x1, y1); the correlation coefficient between the pixel point Q(x1, y1) in the search area and the calculation point P(x0, y0) be the correlation coefficient between the target sub-area corresponding to Q(x1, y1) and the reference sub-area R; SA3, determine whether there is a pixel point in the search area whose corresponding correlation coefficient is greater than the set correlation threshold; SA4: No, then expand the search area with the pixel coordinate (x0, y0) as the center to form a new search area, obtain the correlation coefficient between each pixel point in the new search area and the calculation point P(x0, y0), and then return to step SA3; SA5: If yes, obtain the pixel with the largest corresponding correlation coefficient in the search area as the best matching pixel of the calculation point; The digital image correlation method based on the variable window matching technology comprises the following steps: S1, taking images of the specimen before and after deformation, using the image before deformation as a reference image and the image after deformation as a target image; S2. Set a region of interest on the reference image, filter the calculation points within the region of interest, and obtain the deformation parameter set of the reference sub-region centered on the calculation point on the reference image. where u x represents the horizontal displacement of the reference sub-area, v y represents the vertical displacement of the reference sub-area, represents the horizontal stretching of the reference subarea, represents the horizontal clipping of the reference subarea, represents the vertical shear of the reference sub-area, represents the vertical stretch of the reference subarea; The deformation parameter set for each reference sub-area Perform iterations to obtain the parameter group values when the iterations converge as the deformation parameter values of the reference sub-region; Deformation parameter group corresponding to some calculation points The initial assignment value is {u0, v0, 0, 0, 0, 0}, where u0 is the horizontal displacement between the calculation point and the corresponding best matching pixel, and v0 is the vertical displacement between the calculation point and the corresponding best matching pixel; The deformation parameter group corresponding to the other part of the calculation points The initial value of is the deformation parameter value corresponding to the calculated adjacent calculation point.
2. The digital image correlation method based on variable window matching technology according to claim 1, characterized in that: The calculation formula of the correlation coefficient between the target sub-area and the reference sub-area in step SA2 is as follows: Where R(x,y) is the grayscale value of the pixel with the pixel coordinates (x,y) in the reference sub-region R, and T(x',y') is the grayscale value of the pixel with the pixel coordinates (x',y') in the target sub-region T. is the average grayscale of the reference sub-region R, is the average grayscale of the target sub-region T; Indicates that the position of the pixel point with pixel coordinates (x', y') in the target sub-area T on the target sub-area T is equal to the position of the pixel point with pixel coordinates (x, y) in the reference sub-area R on the reference sub-area R; that is, the vector coordinates formed by the pixel point (x', y') on the target sub-area T and the center point of the target sub-area T are equal to the vector coordinates formed by the pixel point (x, y) on the reference sub-area R and the center point of the reference sub-area R.
3. The digital image correlation method based on variable window matching technology according to claim 1, characterized in that: Step SA2 also includes constructing an Mx matrix in which nodes correspond one-to-one to pixels in the search area. In SA2, the correlation coefficients corresponding to the pixels in the search area are filled into the corresponding nodes in the Mx matrix. Step SA3 specifically determines whether there are nodes in the Mx matrix with values greater than a set correlation threshold. If not, step SA4 is executed, which also includes expanding the Mx matrix based on the search area expansion result. If yes, step SA5 is executed.
4. The digital image correlation method based on variable window matching technology according to claim 3, characterized in that: Step SA4 is specifically as follows: expand the search area with the pixel coordinate (x0, y0) as the center to form a new search area; expand the Mx matrix according to the new search area so that the pixel points in the new search area correspond one-to-one to the nodes of the expanded Mx matrix; traverse the nodes in the Mx matrix, and when the node is assigned an initial value, calculate the correlation coefficient between the pixel point corresponding to the node in the search area and the calculation point P (x0, y0) and fill it into the node in the Mx matrix.
5. The digital image correlation method based on variable window matching technology according to claim 4, characterized in that: In SA2, the initial value of each node in the Mx matrix is -1; in SA4, the initial value of each newly added node in the Mx matrix is -1.
6. The digital image correlation method based on variable window matching technology according to claim 1, characterized in that: Step S2 specifically includes the following steps: S21. Set a region of interest on the reference image, filter calculation points within the region of interest, and set a deformation parameter group. Let the first calculated point be the detection point; S23, obtaining the best matching pixel point of the detection point on the target image; calculating the horizontal displacement u0 and the vertical displacement v0 by combining the detection point and the corresponding best matching pixel point; S24, set the deformation parameter group of the detection point The initial value of is {u0, v0, 0, 0, 0, 0}; then the deformation parameter group is iterated using the ICGN algorithm, and the parameter group value when the iteration converges is obtained as the deformation parameter value of the reference sub-area with the detection point as the center point; S25. If there are calculation points in the region of interest where the deformation parameter values are not calculated, the calculation points adjacent to the detection points are used as new detection points, and the deformation parameter set of the detection points is set to The initial value of is the deformation parameter value of the previous detection point; S26, iterating the deformation parameter group of the detection point using the ICGN algorithm; If the deformation parameter group converges within the set number of iterations, the parameter group value at the time of iteration convergence is obtained as the deformation parameter value of the reference sub-region with the detection point as the center point, and then the process returns to step S25; If the deformation parameter group does not converge within the set number of iterations, the pixel point (x2+u,y2+v) on the reference image is used as the detection point, and then returns to step S23; (x2,y2) represents the pixel coordinates of the previous detection point, u is the rounded value of the horizontal displacement in the deformation parameter value corresponding to (x2,y2), and v is the rounded value of the vertical displacement in the deformation parameter value corresponding to (x2,y2); the horizontal displacement rounding and the vertical displacement rounding are rounded off, rounded down or rounded up.
7. The digital image correlation method based on variable window matching technology according to claim 6, characterized in that: The iterative convergence condition of the deformation parameter group is that the iterative accuracy of the last two deformation parameter groups reaches the set accuracy threshold δ. The calculation formula of the iterative accuracy Δp of the last two deformation parameter groups is: Where Δu x represents the horizontal displacement u in the last two sets of deformation parameters x The difference, Δv y represents the vertical displacement v in the last two sets of deformation parameters y difference, Indicates the horizontal stretching in the last two sets of deformation parameters difference, Represents the horizontal shear in the last two sets of deformation parameters difference, Represents the vertical shear in the last two sets of deformation parameters difference, Represents the vertical stretch in the last two sets of deformation parameters difference.
Citation Information
Patent Citations
GPU acceleration-based path-dependent digital image correlation matching method
CN110414573A