Weighted phase analysis method and device for adaptive window length

By using a weighted phase analysis method with an adaptive window length, the problem of insufficient phase reconstruction accuracy in large deformations and complex fringe patterns by traditional methods is solved, realizing high-precision phase analysis and measurement, which is applicable to aerospace, materials science and other fields.

CN121860842APending Publication Date: 2026-04-14BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Traditional phase analysis methods struggle to accurately reconstruct the phase when dealing with large deformations and complex fringe patterns, resulting in insufficient measurement accuracy and reliability, especially in material mechanical property testing and structural health monitoring where significant errors exist.

Method used

An adaptive window length weighted phase analysis method is adopted. By adaptively adjusting the weight function window length and combining it with local discrete Fourier transform, the method ensures that each pixel is used for phase calculation with the optimal size, thereby reducing noise interference and improving accuracy.

Benefits of technology

It significantly improves the accuracy and robustness of phase analysis when dealing with large deformations and complex stripe patterns, and is applicable to a variety of optical measurement techniques to build high-precision displacement/strain measurement and three-dimensional topography measurement systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860842A_ABST
    Figure CN121860842A_ABST
Patent Text Reader

Abstract

The invention provides an adaptive window length weighted phase analysis method and device, and relates to the technical field of image processing, and the method comprises the steps: S1, obtaining a digital image containing a periodic structure, taking the average value of the reference spacing of the first image in the horizontal direction and the vertical direction as a fixed window length, and obtaining a fixed window length; solving the phase by using a traditional weight function method, and then performing derivation to obtain the interval distribution in the horizontal and vertical directions; the interval distribution of the first image before deformation is used as the weight function window length during phase reconstruction of the second image, gray values of pixels in a window are weighted, and weighted image gray values of the deformed image in the horizontal direction and the vertical direction are obtained; and local discrete Fourier transform is carried out on each weighted image gray scale, a phase value of a pixel position at the central point of the window is obtained after accumulation, all pixels are traversed, complete phase distribution in the horizontal and vertical directions of the image is obtained, and phase analysis is completed. According to the invention, the phase reconstruction precision of the multi-frequency periodic structure image can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a weighted phase analysis method and apparatus with adaptive window length. Background Technology

[0002] In the field of defense science and technology and equipment research and development, the development of advanced materials and structures plays an irreplaceable role, which requires the cross-integration and joint efforts of multiple engineering fields such as aerospace, mechanics, optics, machinery, and materials. Among them, the evaluation and characterization of the mechanical properties of advanced materials and structures is an indispensable link. Optical measurement is the science and technology that uses light as a standard or information carrier for measurement. It is widely used to obtain reliable data on the distance, displacement, size, shape, roughness, surface characteristics, strain, and stress state of the measured object.

[0003] Many optical measurement methods utilize periodic structural patterns as a necessary measurement medium, including classical interferometry, photoelasticity, holographic interferometry, digital holography, digital moiré patterns, geometric moiré / moiré interferometry, and sampling moiré patterns. In most cases, phase analysis and reconstruction of the fringe pattern are required. Phase, as a crucial intermediate variable, is directly related to the parameters of interest in these methods; for example, phase can be used to derive two-dimensional deformation fields and three-dimensional topography / coordinates. Therefore, phase analysis and reconstruction technology is an extremely important and core technology for optical measurement methods that use fringe patterns.

[0004] In applications such as materials mechanical property testing and structural health monitoring, displacement and strain field measurements based on optical methods are crucial. Traditional methods, such as the moiré method, utilize phase analysis of the deformation field. However, when dealing with regions of dense or sparse fringes caused by large deformations, the fixed-window phase analysis method introduces significant errors. Similarly, in 3D topography measurement based on fringe projection, when the object surface is complex and steep, the projected fringes become severely distorted, making it difficult for traditional phase analysis methods to accurately reconstruct the phase, thus affecting the accuracy of 3D topography reconstruction. Therefore, developing a high-precision phase analysis method that can adapt to various complex fringe patterns is urgently needed to improve the accuracy and reliability of displacement, strain, and topography measurements. Summary of the Invention

[0005] The present invention aims to at least partially solve one of the technical problems in the related art.

[0006] Therefore, the first objective of this invention is to propose a weighted phase analysis method with an adaptive window length.

[0007] The second objective of this invention is to provide a weighted phase analysis device with an adaptive window length.

[0008] The third objective of this invention is to provide an electronic device.

[0009] The fourth objective of this invention is to provide a computer-readable storage medium.

[0010] The fifth objective of this invention is to provide a computer program product.

[0011] To achieve the above objectives, a first aspect of the present invention proposes a weighted phase analysis method with an adaptive window length, comprising: S1. Obtain a digital image containing a periodic structure. Using the average horizontal and vertical reference spacing of the first image as a fixed window length, calculate its phase using the traditional weight function method and then differentiate it to obtain its horizontal and vertical spacing distribution. S2, using the spacing distribution of the first image before deformation as the length of the weight function window during phase reconstruction of the second image, weights the gray values ​​of the pixels within the window to obtain the weighted image gray values ​​in the horizontal and vertical directions of the deformed image; S3, using the spacing distribution of the previous image before deformation as the weight function window length for phase reconstruction of the next image, and performing the above weighting process until the grayscale of the last weighted image after deformation is obtained. S4 performs a local discrete Fourier transform on each weighted image gray level, accumulates the values ​​to obtain the phase values ​​of the pixels at the center of the window, traverses all pixels to obtain the complete phase distribution in the horizontal and vertical directions of the image, and completes the phase analysis.

[0012] Optionally, the digital image of the periodic structure includes: At least one of the following: unidirectional grating, orthogonal grating, bidirectional grating, tridirectional grating, projected fringes, interference fringes, moiré pattern, periodic digit pattern, periodic letter pattern, periodic text pattern, and near-periodic pattern. Optionally, the step of obtaining the horizontal and vertical spacing distribution by calculating the phase using the traditional weighting function method and then differentiating it includes: The phase of the first image in the horizontal and vertical directions is first obtained using the traditional weighted function phase analysis method. , Then phase , Taking the derivative, we obtain the horizontal and vertical spacing distribution of the first image. , The above principle can be expressed by a mathematical formula, which is: ; ; in, The fixed weight function window length is The phase of the image in the horizontal x-direction is calculated using the traditional weighted function phase analysis method. The average x-direction spacing of the periodic structures was manually measured for the first image; For a fixed weight function window length of The phase of the image in the vertical y-direction is calculated using the traditional weighted function phase analysis method. The average y-direction spacing of the periodic structures was manually measured for the first image.

[0013] Optionally, the weight function window includes: Rectangular window, triangular window, cosine window, Gaussian window; to determine the spacing distribution of periodic structural images. Represents the periodic pixel intervals in the image, where the image width is... w , length is h , If the weight value is a rectangular window weight, then the rectangular window weight is... The calculation formula is:

[0014] Triangular window weight calculation The formula is:

[0015] Cosine window weight calculation The formula is:

[0016] Gaussian window weight calculation The formula is:

[0017] in, This indicates the position of a pixel within the window, at the center of each window. The left and right edges of the window They are respectively equal to , ,in The length of the weight function window is specified as follows: .

[0018] Optionally, the step of weighting the grayscale values ​​of pixels within the window to obtain the weighted image grayscale in the horizontal direction of the deformed image includes: The weighted image grayscale is obtained by multiplying the grayscale values ​​of all pixels within the window by the weights of their corresponding positions. Represented as:

[0019] in, Represented as the position of pixels in the window, the image width is... , length is , For the weight function window, This indicates the weight type, which includes four types: Represented as a rectangular window type Represented as a triangular window type, Represented as a cosine window type, It is represented as a Gaussian window type.

[0020] Optionally, after executing steps S3 and S4, the phase representation of the nth periodic structure image is as follows: ; ; in, This can be represented as the phase distribution in the x-direction obtained by traversing the weighted function window along the image width x-direction. This is represented as the phase distribution in the x-direction obtained by traversing the weighted function window along the y-direction of the image width; This represents the weighted image gray level in the x-direction of the nth periodic structure image. Represents the weighted image gray level in the y-direction of the nth periodic structure image; Let be the x-direction spacing distribution of the (n-1)th periodic structure image. Let represent the y-direction spacing distribution of the (n-1)th periodic structure image.

[0021] To achieve the above objectives, a second aspect of the present invention provides a weighted phase analysis apparatus with an adaptive window length, comprising: Spacing distribution acquisition module: Acquires digital images containing periodic structures, uses the average reference spacing in the horizontal and vertical directions of the first image as a fixed window length, calculates the phase of the first image using the traditional weight function method, and then differentiates the obtained phase to obtain the spacing distribution in the horizontal and vertical directions of the first image; Weighted grayscale calculation module: The spacing distribution of the first image before deformation is used as the length of the weight function window when reconstructing the phase of the second image after deformation. Then, the grayscale of the pixels within the window is weighted to obtain the weighted image grayscale of the deformed image in the horizontal and vertical directions. Phase distribution acquisition module: Performs discrete Fourier transform on the local grayscale values ​​of each weighted image, and accumulates the values ​​to obtain the phase values ​​of the pixels at the center of the window; traverses all pixels in the image to obtain the complete phase distribution in the horizontal and vertical directions of the image, thus completing the phase analysis process of the entire periodic structure image.

[0022] To achieve the above objectives, a third aspect of the present invention provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of the first aspects.

[0023] To achieve the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of the first aspects.

[0024] To achieve the above objectives, a fifth aspect of the present invention provides a computer program product that, when executed by a processor, implements the method described in any one of the first aspects.

[0025] The technical solutions provided by the embodiments of the present invention bring at least the following beneficial effects: (1) By adaptively adjusting the length of the weight function window, this invention ensures that a data of an optimal size (usually one or an integer number of cycles) is used for phase calculation at each pixel, effectively suppressing the error caused by the mismatch between the window and the local frequency. Especially when processing large deformation and noisy images, the accuracy and robustness are significantly better than traditional methods.

[0026] (2) This invention is applicable to the analysis of various periodic structure images, including but not limited to unidirectional, bidirectional, and tridirectional gratings, as well as projection fringes and interference fringes, providing a high-precision and efficient phase analysis method core for various optical measurement techniques based on phase analysis.

[0027] (3) The present invention has a wide range of applications. Based on the high-precision phase analysis of the present invention, a high-precision displacement / strain measurement system and a three-dimensional morphology measurement system can be constructed. It can be applied to deformation field measurement, morphology measurement, non-destructive testing and structural health monitoring in multiple fields such as aerospace, materials science, integrated circuits, manufacturing, microelectronics and nanotechnology, civil engineering, mechanical engineering and biomedicine.

[0028] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0029] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1This is a flowchart illustrating a weighted phase analysis method with adaptive window length provided in an embodiment of the present invention.

[0030] Figure 2 A flowchart illustrating the process of solving the horizontal and vertical grating phase of a single two-dimensional grating image using a weighted phase analysis method with adaptive window length.

[0031] Figure 3 A schematic diagram illustrating the phase principle for reconstructing a series of two-dimensional grating images with different degrees of deformation using a weighted phase analysis method with adaptive window length.

[0032] Figure 4 To use computer simulations of grating images with different degrees of deformation and theoretical grating phase maps.

[0033] Figure 5 The phase and absolute error values ​​of the raster image obtained by reconstructing the phase of the simulated raster image using the traditional sampling moiré phase analysis method are shown.

[0034] Figure 6 The phase and absolute error values ​​of the raster image obtained by using the weighted phase analysis method with adaptive window length of the present invention to reconstruct the phase of the simulated raster image are shown.

[0035] Figure 7 Line graphs and error band diagrams of the theoretical grating phase value, the calculated value by the traditional sampling moiré phase analysis method, and the calculated value by the weighted phase analysis method with adaptive window length proposed in this invention, at the same pixel position.

[0036] Figure 8 The histograms of the root mean square error of the grating phase are calculated using the traditional sampling moiré method and the weighted phase analysis method with adaptive window length proposed in this invention, for different degrees of deformation.

[0037] Figure 9 Several types of periodic structure images applicable to this invention.

[0038] Figure 10 This is a schematic diagram of the structure of a weighted phase analysis device with adaptive window length provided in an embodiment of the present invention. Detailed Implementation

[0039] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0040] This invention provides a weighted phase analysis method with an adaptive window length. Figure 1This is a flowchart illustrating a weighted phase analysis method with adaptive window length provided in an embodiment of the present invention. Figure 1 As shown, the method includes the following steps: Step S1: Obtain a digital image containing a periodic structure. Using the average horizontal and vertical reference spacing of the first image as a fixed window length, calculate its phase using the traditional weight function method and then differentiate it to obtain the horizontal and vertical spacing distribution.

[0041] In this embodiment, the periodic structure includes at least one of the following: unidirectional grating, orthogonal grating, bidirectional grating, tridirectional grating, projection fringe, interference fringe, cloud pattern, periodic number pattern, periodic letter pattern, periodic text pattern, and near-periodic pattern.

[0042] The flowchart of phase reconstruction of a two-dimensional grating in this invention is as follows: Figure 2 As shown, when the periodic structure image undergoes severe distortion or deformation, resulting in unequal spacing between periodic structures, a weighted phase analysis method with an adaptive window length is used for high-precision phase reconstruction.

[0043] It is clear that in a series of continuously deforming periodic structural images, let its image grayscale value be... , … Phase reconstruction is achieved using a weighted phase analysis method with an adaptive window length. First, at least five consecutive periodic units are manually marked, and the average spacing of the reference image is calculated. The average value in the horizontal x-direction is expressed as... The average value in the vertical y-direction is expressed as .

[0044] Furthermore, using the average horizontal and vertical spacing as a fixed window length, the phase of the first image in the horizontal and vertical directions is first calculated using the traditional weighted function phase analysis method, expressed as follows: , Then, the phases were respectively , Taking the derivative, we obtain the horizontal and vertical spacing distribution of the first image, represented as follows: , The above principle can be expressed mathematically as follows: ; .

[0045] Step S2: Using the spacing distribution of the first image before deformation as the length of the weight function window for phase reconstruction of the second image, the gray values ​​of the pixels within the window are weighted to obtain the weighted image gray values ​​in the horizontal and vertical directions of the deformed image.

[0046] In this embodiment, the weighting function windows include: rectangular windows, triangular windows, cosine windows, and Gaussian windows. These four types of window functions are core tools for weighting data blocks in image processing. Each has different characteristics in terms of "weight distribution shape, computational complexity, and distortion suppression capability," and the appropriate window function must be selected according to the specific application scenario. (The last sentence appears to be incomplete and possibly refers to a different implementation.) Represents the periodic pixel intervals in the image, where the image width is... w , length is h , If the weight value is a rectangular window weight, then the rectangular window weight is... The calculation formula is:

[0047] Triangular window weight calculation The formula is:

[0048] Cosine window weight calculation The formula is:

[0049] Gaussian window weight calculation The formula is:

[0050] in, This indicates the position of a pixel within the window, at the center of each window. The left and right edges of the window They are respectively equal to , ,in The length of the weight function window is specified as follows: .

[0051] In this embodiment, taking the horizontal x-direction as an example, the spacing distribution in the horizontal x-direction of the first image is utilized. The window length serves as the weighting function for phase reconstruction of the second image. When reconstructing the x-direction phase of the deformed second periodic structure image using a weighted phase analysis method with an adaptive window length, the gray value of each pixel within the window is multiplied by the weight of its corresponding position to obtain the weighted image gray value. The calculation formula is:

[0052] Wherein, the image width is , length is , Represented as the position of pixels within the window. Size range , For the weight function window, This indicates the weight type, which includes four types: Represented as a rectangular window type Represented as a triangular window type, Represented as a cosine window type, It is represented as a Gaussian window type.

[0053] Similarly, the weighted image grayscale in the vertical y-direction is also calculated using this principle.

[0054] Step S3: Use the spacing distribution of the previous undeformed image as the weight function window length for phase reconstruction of the next image, and execute the above weighting process until the grayscale of the last weighted image after deformation is obtained.

[0055] In this embodiment, after the calculation of the weighted image grayscale in the horizontal and vertical directions of the second image is completed, the method for calculating the weighted image grayscale of the third, fourth, ... nth images is also followed in the same way. The spacing distribution of the previous image before deformation is used as the length of the weight function window when reconstructing the phase of the next image, and the above weighting process is executed until the grayscale of the last weighted image after deformation is obtained.

[0056] Based on the above principles, the weighted image gray levels in the horizontal and vertical directions of the nth periodic structure image are respectively... , This can be expressed mathematically as:

[0057]

[0058] in, Let be the x-direction spacing distribution of the (n-1)th periodic structure image. The y-direction spacing distribution of the (n-1)th periodic structure image; This is the horizontal x-axis spacing distribution of the (n-1)th image. It is the vertical y-direction spacing distribution of the (n-1)th image.

[0059] It is clear that this iterative mechanism ensures that the window length always tracks the latest state of structural deformation—if a region in the previous frame image experiences compression deformation (spacing decreases), the window will automatically shrink during the processing of the current frame; if stretching deformation occurs (spacing increases), the window will be widened accordingly, thus maintaining the best fit to the local periodic structure throughout the entire deformation sequence.

[0060] Step S4: Perform local discrete Fourier transform on the gray levels of each weighted image, accumulate the values ​​to obtain the phase values ​​of the pixels at the center of the window, traverse all pixels to obtain the complete phase distribution in the horizontal and vertical directions of the image, and complete the phase analysis.

[0061] In this embodiment, after obtaining the weighted image grayscale, a local discrete Fourier transform is performed on each weighted grayscale value. The summation yields the relative value of the pixel position at the center point of the window. The local Fourier transform uses a sliding window to segment the image into blocks, with each window focusing on a local region. This allows periodic features (such as spacing and direction) at different locations to be extracted individually, thus adapting to spatial variations in the structure. By accumulating all weighted pixels within the window, the dominant frequency signal is highlighted in the frequency domain (suppressing noise and aperiodic components), ensuring the accuracy of phase extraction. If only a single pixel or an unweighted local region is used, noise will severely interfere with phase calculation, causing the result to lose its physical meaning.

[0062] Furthermore, by traversing all pixel positions in the image, the complete phase distribution in the horizontal and vertical directions is obtained, and phase analysis is completed. At this point, the phase of the nth periodic structure image can be expressed as: ; ; in, This is represented as the phase distribution in the x-direction obtained by traversing the weighted function window along the image width direction (x-direction). This is represented as the phase distribution in the x-direction obtained by traversing the weighted function window along the image width direction (y-direction), where the principle of this step can be derived from... Figure 3 As shown.

[0063] To verify the accuracy and noise resistance of the multi-frequency grating image phase reconstruction of this invention, a set of grating images with different degrees of deformation were simulated using Matlab, such as... Figure 4 As shown in (a). For analog raster images, their grayscale... It can be represented as:

[0064] Where P is 8 pixels. This represents random noise and is a built-in function in Matlab. The existence of a function can deform the grating. The degree of deformation is expressed as follows:

[0065]

[0066] Where n is the number of sheets. Figure 4(a) shows raster images with different distortion levels at 20% simulated noise, namely 20%, 60%, 100%, 140%, 180%, 220%, and 260%. The circular raster in the upper right corner is a magnified detail image of each raster, clearly showing the distortion as... As the function value increases, the deformation of the grating also increases, and the degree of distortion deepens. (Based on grayscale...) The formula can be used to calculate the theoretical phase value of the simulated grating image. for:

[0067] These grating images and theoretical grating phase values ​​were obtained. Figure 4 (b) Following this, to verify and compare the phase reconstruction accuracy of the present invention, taking the phase reconstruction result in the x-direction as an example, the grating phase in the x-direction was obtained using the traditional sampling moiré method. Figure 5 (a) and its absolute error diagram with respect to the theoretical value (a) Figure 5 (b)). Traditional phase analysis methods yield grating phase values ​​with relatively small errors compared to theoretical values ​​when analyzing small-deformation gratings, such as... Figure 5 As shown in (b1-b3). However, when analyzing large-deformation gratings, where the grating frequencies are no longer consistent, the absolute error of the grating phase calculated by traditional phase analysis methods increases significantly, such as... Figure 5 As shown in (b4-b7). When analyzing all simulated gratings using the weighted phase analysis method with adaptive window length proposed in this invention, the absolute error value is significantly reduced compared with the theoretical value and the traditional method. No obvious error is found in either small or large deformation grating images.

[0068] Using the weighted phase analysis method with adaptive window length proposed in this invention, the grating phase in the x-direction is obtained. Figure 6 (a) and its absolute error diagram with respect to the theoretical value (a) Figure 6 (b)). By Figure 5 As shown in (b), the traditional sampling moiré method exhibits a significant, non-negligible error when analyzing large-deformation grating images. However, the weighted phase analysis method with adaptive window length proposed in this invention provides a significantly better solution. Figure 6 (b) shows that the error value is significantly reduced, indicating that the present invention can perform high-precision phase reconstruction even for grating images with extremely severe deformation.

[0069] Secondly, to quantitatively verify the phase reconstruction accuracy of this invention, we extracted the theoretical phase value, the phase value calculated by the sampling moiré method, and the phase value calculated by the weighted phase analysis method with adaptive window length from the same pixel positions in the theoretical and calculated grating phase images under different degrees of deformation, and plotted them as follows. Figure 7 The line graph and error band diagram are shown.

[0070] Furthermore, by extracting the grating phase value, the method proposed in this invention is closer to the theoretical phase value than the traditional method under large deformation. The grating phase error band calculated by this invention is significantly smaller than that of the traditional method.

[0071] To verify the accuracy of the phase reconstruction of this invention and its advantages over traditional methods, the root mean square error (RMSE) is used to evaluate the phase error between the calculated value and the theoretical phase difference. The data evaluation area is a square region of 150×150 pixels, where the root mean square error RMSE can be expressed as:

[0072] in h, w These represent the length and width of the data evaluation area, respectively. Figure 8 As can be seen, the darker histogram data represents the root mean square error (RMSE) of the grating phase using the traditional method, while the lighter histogram data represents the RMSE of the grating phase using the method proposed in this invention. It can be clearly seen that when reconstructing grating phases with different degrees of deformation, the RMSE of the grating phase using the method proposed in this invention is within 0.04097 rad, verifying the accuracy of phase reconstruction. However, when the traditional method reconstructs a grating with 160% deformation, the RMSE error begins to increase and gradually increases with the degree of deformation, reaching 0.2344, indicating that the traditional method cannot accurately analyze grating images with large deformation. Compared with the traditional method, this invention can achieve high-precision analysis of grating images with different degrees of deformation, resulting in a higher level of phase reconstruction accuracy.

[0073] When performing phase reconstruction using this invention, it includes, but is not limited to, phase reconstruction of unidirectional gratings, orthogonal gratings, bidirectional gratings, tridirectional gratings, projected fringes, interference fringes, moiré patterns, periodic numeral patterns, periodic letter patterns, periodic text patterns, and near-periodic patterns, such as... Figure 9 As shown.

[0074] When using the weighted phase analysis method with adaptive window length of the present invention to measure displacement field and strain field, the specific measurement steps are as follows: 1. When the specimen is not under stress, a grating image of its surface is acquired as a reference image. A load is applied to the specimen to cause it to deform, and then a grating image of the deformed specimen is acquired. ; 2. Using the weighted phase analysis method with adaptive window length described in this invention, the phase distribution of the reference image is calculated respectively. Phase distribution of the deformed image ; 3. The phase change is obtained by calculating the difference in phase distribution before and after deformation. Based on the phase change and the carrier frequency of the grating Calculate the displacement field on the surface of the object. For example, the formula for calculating displacement in the x-direction is: ; 4. Finally, by numerically differentiating the displacement field data, the strain components of the entire field can be obtained. , , .

[0075] By implementing this measurement method, since the core step adopts the phase analysis technology of this invention, it is possible to process the grating frequency change caused by large deformation with high precision, so that the final displacement field and strain field results have higher accuracy and reliability.

[0076] When using the weighted phase analysis method with adaptive window length of the present invention to perform three-dimensional topography measurement, the specific measurement steps are as follows: 1. Project the designed digital sine stripe pattern onto the surface of the object to be measured using a projector. .

[0077] 2. The camera captures an image of the deformed stripes, modulated by the object's surface height, from another angle. Due to the height variations on the object's surface, the originally straight stripes become curved.

[0078] 3. Applying the weighted phase analysis method with adaptive window length described in this invention, the acquired deformed stripe image is analyzed. The analysis was performed to accurately calculate its phase distribution. .

[0079] 4. Through pre-calibrated systems, the mapping relationship between phase and real-world height can be obtained. Based on the phase distribution calculated in step 3... By combining known system parameters (such as the geometric relationship between the camera and the projector, and the fundamental frequency of the fringes), the height value of each point on the object's surface can be calculated. This allows for the reconstruction of the object's three-dimensional shape.

[0080] When implementing this measurement method, the projected fringe pattern will be severely distorted when the surface of the object being measured is complex, discontinuous, or has drastic slope changes. Because the core step employs the phase analysis technology of this invention, it can adaptively handle these variations in fringe density caused by height, thus offering a significant accuracy advantage over traditional fixed-window methods when measuring the morphology of complex objects.

[0081] To achieve the above embodiments, the present invention also proposes a weighted phase analysis device with adaptive window length. Figure 10 This is a schematic diagram of a weighted phase analysis device with adaptive window length provided in an embodiment of the present invention. Figure 10 As shown, the device includes: Spacing distribution acquisition module 100: Acquires a digital image containing a periodic structure, uses the average reference spacing in the horizontal and vertical directions of the first image as a fixed window length, calculates the phase of the first image using the traditional weight function method, and then differentiates the obtained phase to obtain the spacing distribution in the horizontal and vertical directions of the first image; Weighted grayscale calculation module 200: The spacing distribution of the first image before deformation is used as the length of the weight function window when reconstructing the phase of the second image after deformation. Then, the grayscale of the pixels in the window is weighted to obtain the weighted image grayscale of the deformed image in the horizontal and vertical directions. Phase distribution acquisition module 300: Performs discrete Fourier transform on the local grayscale values ​​of each weighted image, and accumulates the values ​​to obtain the phase values ​​of the pixels at the center of the window; traverses all pixels in the image to obtain the complete phase distribution in the horizontal and vertical directions of the image, thus completing the phase analysis process of the entire periodic structure image.

[0082] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0083] To implement the above embodiments, the present invention also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method provided in the foregoing embodiments.

[0084] To implement the above embodiments, the present invention also proposes a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided in the foregoing embodiments.

[0085] To implement the above embodiments, the present invention also proposes a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the foregoing embodiments.

[0086] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in this invention all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0087] It should be noted that personal information collected from users should be used for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. Furthermore, such collection / sharing should only be conducted after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign an agreement / authorization that includes authorization of relevant user information before the user uses the function. In addition, any necessary steps must be taken to protect and safeguard access to such personal information data and ensure that others with access to personal information data comply with their privacy policies and procedures.

[0088] This invention is intended to provide implementation schemes for users to selectively prevent the use or access to personal information data. That is, this disclosure is intended to provide hardware and / or software to prevent or block access to such personal information data. Once personal information data is no longer needed, risks can be minimized by restricting data collection and deleting data. Furthermore, where applicable, such personal information can be de-identified to protect user privacy.

[0089] In the foregoing descriptions of the embodiments, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0090] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0091] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of the invention pertain.

[0092] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0093] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0094] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0095] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0096] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

[0097] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0098] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A weighted phase analysis method with adaptive window length, characterized in that, Includes the following steps: S1. Obtain a digital image containing a periodic structure. Using the average horizontal and vertical reference spacing of the first image as a fixed window length, calculate its phase using the traditional weight function method and then differentiate it to obtain its horizontal and vertical spacing distribution. S2, using the spacing distribution of the first image before deformation as the length of the weight function window during phase reconstruction of the second image, weights the gray values ​​of the pixels within the window to obtain the weighted image gray values ​​in the horizontal and vertical directions of the deformed image; S3, using the spacing distribution of the previous image before deformation as the weight function window length for phase reconstruction of the next image, and performing the above weighting process until the grayscale of the last weighted image after deformation is obtained. S4 performs a local discrete Fourier transform on each weighted image gray level, accumulates the values ​​to obtain the phase values ​​of the pixels at the center of the window, traverses all pixels to obtain the complete phase distribution in the horizontal and vertical directions of the image, and completes the phase analysis.

2. The method according to claim 1, characterized in that, Digital images of periodic structures also include: At least one of the following: unidirectional grating, orthogonal grating, bidirectional grating, tridirectional grating, projection fringe, interference fringe, moiré pattern, periodic number pattern, periodic letter pattern, periodic text pattern, and near-periodic pattern.

3. The method according to claim 2, characterized in that, The horizontal and vertical spacing distributions are obtained by differentiating the phase using the traditional weight function method, and also include: The phase of the first image in the horizontal and vertical directions is first obtained using the traditional weighted function phase analysis method. , Then phase , Taking the derivative, we obtain the horizontal and vertical spacing distribution of the first image. , The above principle can be expressed by a mathematical formula, which is: ; ; in, The fixed weight function window length is The phase of the image in the horizontal x-direction is calculated using the traditional weighted function phase analysis method. The average x-direction spacing of the periodic structures was manually measured for the first image; For a fixed weight function window length of The phase of the image in the vertical y-direction is calculated using the traditional weighted function phase analysis method. The average y-direction spacing of the periodic structures was manually measured for the first image.

4. The method according to claim 3, characterized in that, Weighting function windows include: rectangular window, triangular window, cosine window, and Gaussian window; the spacing distribution of periodic structure images... Represents the periodic pixel intervals in the image, where the image width is... w , length is h , If the weight value is a rectangular window weight, then the rectangular window weight is... The calculation formula is: Triangular window weight calculation The formula is: Cosine window weight calculation The formula is: Gaussian window weight calculation The formula is: in, This indicates the position of a pixel within the window, at the center of each window. The left and right edges of the window They are respectively equal to , ,in The length of the weight function window is specified as follows: .

5. The method according to claim 4, characterized in that, The grayscale values ​​of pixels within the window are weighted to obtain the weighted image grayscale in the horizontal direction of the deformed image, which also includes: The weighted image grayscale is obtained by multiplying the grayscale values ​​of all pixels within the window by the weights of their corresponding positions. Represented as: in, Represented as the position of pixels in the window, the image width is... , length is , For the weight function window, This indicates the weight type, which includes four types: Represented as a rectangular window type Represented as a triangular window type, Represented as a cosine window type, It is represented as a Gaussian window type.

6. The method according to claim 5, characterized in that, Also includes: After executing steps S3 and S4, the phase representation of the nth periodic structure image is as follows: ; ; in, This can be represented as the phase distribution in the x-direction obtained by traversing the weighted function window along the image width x-direction. This is represented as the phase distribution in the x-direction obtained by traversing the weighted function window along the y-direction of the image width; This represents the weighted image gray level in the x-direction of the nth periodic structure image. Represents the weighted image gray level in the y-direction of the nth periodic structure image; Let be the x-direction spacing distribution of the (n-1)th periodic structure image. Let represent the y-direction spacing distribution of the (n-1)th periodic structure image.

7. A weighted phase analysis device with adaptive window length, characterized in that, include: Spacing distribution acquisition module: Acquires digital images containing periodic structures, uses the average reference spacing in the horizontal and vertical directions of the first image as a fixed window length, calculates the phase of the first image using the traditional weight function method, and then differentiates the obtained phase to obtain the spacing distribution in the horizontal and vertical directions of the first image; Weighted grayscale calculation module: The spacing distribution of the first image before deformation is used as the length of the weight function window when reconstructing the phase of the second image after deformation. Then, the grayscale of the pixels within the window is weighted to obtain the weighted image grayscale of the deformed image in the horizontal and vertical directions. Phase distribution acquisition module: Performs discrete Fourier transform on the local grayscale values ​​of each weighted image, and accumulates the values ​​to obtain the phase values ​​of the pixels at the center of the window; traverses all pixels in the image to obtain the complete phase distribution in the horizontal and vertical directions of the image, thus completing the phase analysis process of the entire periodic structure image.

8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-6.