A cross-region phase unwrapping method, device and computer-readable storage medium
By acquiring phase images of multi-connected regions in optical interference detection, using Zernike polynomials to expand and fit the standard plane, and calculating the period number difference between the phase unpacking results of each region and the fitted standard plane, we solve the problem in the existing technology. The problem of incomplete unpacking of discontinuous surface phase images is solved, and accurate cross-region phase unpacking is achieved.
Patent Information
- Application Number
- CN202410854988.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-28
AI Technical Summary
When the existing technology processes phase images of discontinuous surfaces, the unpacking results are incomplete and inaccurate, and cannot effectively correlate each independent phase region.
By obtaining the phase image of multi-connected regions, select the connected region with the largest area for phase unpacking operation, and use Zernike polynomials to expand and fit the standard plane, and calculate the number of cycles between the phase unpacking results of each region and the fitted standard plane. Differences to achieve cross-regional phase unpacking.
The correlation of the unpacking results of each area is realized, complete and accurate phase unpacking results are obtained, and the phase period correction and unpacking problem of discontinuous surfaces is solved.
Smart Images

Figure CN118565329B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of optical interference detection technology, and in particular to a cross-region phase unwrapping method, device and computer-readable storage medium. Background Art
[0002] Phase unwrapping is a key step in the optical interferometry process and is widely used in many technologies such as phase shift interferometry (PSI), vortex phase interferometry (VPSI) and speckle pattern interferometry (DSPI). It mainly unwraps the truncated phase (wrapped phase) confined to a 2π period to achieve phase information unfolding, thereby restoring the phase distribution to a true and continuous form. Since the phase unwrapping effect will have a direct impact on the accuracy and precision of the final detection results, it is of great importance and positive significance to carry out relevant research and exploration work on it.
[0003] However, the current unwrapping algorithm is mainly for the phase image of a single area, that is, the phase value of each pixel in the image is continuously distributed. In the actual detection process, affected by factors such as the surface shape of the detection element, the occlusion of the clamping device, and the surface defects of the test piece, the phase image may be decomposed into multiple areas of different sizes and irregular shapes, and there is a certain amount of truncation (interval) between each area, which means that the unwrapping results obtained by the conventional unwrapping algorithm are independent of each other between the areas, which leads to incomplete and inaccurate final results. Summary of the invention
[0004] To this end, the present application provides a cross-region phase unpacking method, device and computer-readable storage medium to solve the problem of incomplete and inaccurate unpacking results when unpacking phase images of discontinuous surfaces in the prior art.
[0005] In order to achieve the above objectives, this application provides the following technical solutions:
[0006] In a first aspect, a cross-region phase unwrapping method includes:
[0007] Step 1: Obtain a phase image of multiple connected regions, and determine the area of each connected region in the phase image;
[0008] Step 2: Select the connected region with the largest area in the phase image to perform phase unpacking operation and obtain the unpacking result;
[0009] Step 3: Perform Zernike polynomial expansion on the unpacked result, and obtain the first four Zernike expansion terms and the coefficients corresponding to each term;
[0010] Step 4: Perform plane fitting in the area to be unwrapped according to the first four Zernike expansion terms and the corresponding coefficients of each term to obtain the fitting standard plane;
[0011] Step 5: Calculate the phase unpacking result of each connected region, and determine the difference in the number of cycles between the phase unpacking result of each connected region and the fitting standard plane;
[0012] Step 6: Add the phase unpacking result of each connected region and its corresponding period number difference to obtain the final cross-region phase unpacking result.
[0013] Optionally, in step 3, the expression of the Zernike polynomial is:
[0014]
[0015] In the formula, , represents the result of Zernike polynomial expansion, represents the polar diameter, represents the polar angle, j represents the number of expansion terms, and represent Zernike polynomials and corresponding coefficients respectively.
[0016] Optionally, in step 3, the first four terms after the expansion of the Zernike polynomial are the translation amount, the tilt amount along the x-axis direction, the tilt amount along the y-axis direction and the defocus amount.
[0017] Optionally, in step 4, the expression for fitting the standard plane is:
[0018]
[0019] In the formula, a, b, c, and d represent the coefficients of the first four Zernike expansion terms, represents the first term of the Zernike expansion, represents the second term of the Zernike expansion, represents the third term of the Zernike expansion, represents the fourth term of the Zernike expansion.
[0020] Optionally, the step 5 is specifically:
[0021] Step 501: Calculate the phase unpacking result of each connected region;
[0022] Step 502: Calculate the phase difference between the phase unpacking result of each connected region and the fitting standard plane;
[0023] Step 503: Calculate the average phase difference of all pixels in each connected domain to obtain the average value between each connected region and the fitting standard plane;
[0024] Step 504: Obtain the cycle number difference between the phase unpacking result of each connected region and the fitting standard plane according to the average value and the phase change amount of the pixel within one cycle.
[0025] Optionally, in step 504, the phase change of the pixel in one period is 2π.
[0026] Optionally, in step 504, the difference expression of the number of cycles between the phase unpacking result of each connected region and the fitting standard plane is:
[0027]
[0028] In the formula, represents the difference in the number of cycles between the phase unpacking result of the connected region and the fitting standard plane; i represents the serial number of the connected region, N represents the number of pixels contained in the connected region, represents the phase difference, and 2π represents the phase change of the pixel in one cycle.
[0029] In a second aspect, a cross-region phase unwrapping device includes:
[0030] A phase image acquisition module, used to acquire a phase image of multiple connected regions and determine the area of each connected region in the phase image;
[0031] A phase unpacking operation module is used to select the connected region with the largest area in the phase image to perform phase unpacking operation and obtain an unpacking result;
[0032] A polynomial expansion module, used for performing Zernike polynomial expansion on the unpacked result and obtaining the first four Zernike expansion terms and the coefficients corresponding to each term;
[0033] The standard plane fitting module is used to perform plane fitting in the unwrapped area according to the first four Zernike expansion terms and the corresponding coefficients of each term to obtain a fitting standard plane;
[0034] A cycle number difference calculation module, used to calculate the phase unpacking result of each connected area, and determine the cycle number difference between the phase unpacking result of each connected area and the fitting standard plane;
[0035] The cross-region phase unpacking module is used to add the phase unpacking result of each connected region and its corresponding period number difference to obtain the final cross-region phase unpacking result.
[0036] In a third aspect, a computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a cross-region phase unwrapping method.
[0037] In a fourth aspect, a computer program product includes a computer program or instructions, which, when executed by a processor, implement the steps of a cross-region phase unwrapping method.
[0038] Compared with the prior art, this application has at least the following beneficial effects:
[0039] The present application provides a cross-region phase unwrapping method, device and computer-readable storage medium, which obtains the phase image of multiple connected regions and determines the area of each connected region in the phase image; selects the connected region with the largest area in the phase image to perform phase unwrapping operation and obtains the unwrapping result; performs Zernike polynomial expansion on the unwrapping result and obtains the first four Zernike expansion terms and the corresponding coefficients of each term; performs plane fitting in the region to be unwrapped according to the first four Zernike expansion terms and the corresponding coefficients of each term to obtain a fitting standard plane; calculates the phase unwrapping result of each connected region and determines the periodic number difference between the phase unwrapping result of each connected region and the fitting standard plane; adds the phase unwrapping result of each connected region and the corresponding periodic number difference to obtain the final cross-region phase unwrapping result. The present application is based on Zernike polynomial fitting of the standard plane, and determines the periodic number difference by calculating the difference between the standard plane and the phase unwrapping results of each region, so that the unwrapping results of each region are correlated, and the final complete and accurate phase unwrapping result is obtained, thereby realizing the phase period correction and phase unwrapping of discontinuous surfaces. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more intuitively illustrate the prior art and the present application, exemplary drawings are given below. It should be understood that the specific shapes and structures shown in the drawings should not generally be regarded as limiting conditions for implementing the present application; for example, those skilled in the art are capable of easily making conventional adjustments or further optimizations to the addition / reduction / attribution division, specific shapes, positional relationships, connection methods, dimensional ratios, etc. of certain units (components) based on the technical concepts and exemplary drawings disclosed in the present application.
[0041] Figure 1 A schematic diagram of the principle of a cross-region phase unwrapping method provided in Example 1 of the present application;
[0042] Figure 2 A flow chart of a cross-region phase unwrapping method provided in Example 1 of the present application;
[0043] Figure 3A structural diagram of a cross-region phase unwrapping method provided in Example 1 of the present application. DETAILED DESCRIPTION
[0044] The present application is further described below in detail through specific embodiments in conjunction with the accompanying drawings.
[0045] In the description of this application: unless otherwise specified, "plurality" means two or more. The terms "first", "second", "third", etc. in this application are intended to distinguish the objects referred to, and do not have special meanings in terms of technical connotations (for example, they should not be understood as emphasizing the importance or order, etc.). Expressions such as "including", "comprising", "having", etc. also mean "not limited to" (certain units, components, materials, steps, etc.).
[0046] The terms such as "upper", "lower", "left", "right", "middle", etc. cited in this application are usually used to indicate the general relative position relationship for the purpose of intuitive understanding by referring to the drawings, and are not absolute limitations on the position relationship in the actual product.
[0047] Embodiment 1
[0048] See also Figure 1 In the phase image of the multi-connected region to be unwrapped, the phase distribution of each pixel is in a periodic truncated form. The phase change of the pixel in one cycle is 2π, and the jump amount of the pixel between each cycle is 2kπ (k represents the number of cycles). Therefore, the phase unwrapping algorithm essentially corrects the truncated phase distribution to a real, continuous form by adding (subtracting) 2kπ to the pixel phase in each cycle.
[0049] See also Figure 2 and Figure 3 Based on the above analysis, this embodiment provides a cross-region phase unwrapping method, including:
[0050] S1: Obtain a phase image of multiple connected regions and determine the area of each connected region in the phase image;
[0051] In this step, the phase image of the multiply connected region refers to a phase image in which the phase distribution of each pixel is in a periodic truncation form.
[0052] S2: Select the connected region with the largest area in the phase image to perform phase unpacking operation and obtain the unpacking result;
[0053] In this step, the connected region with the largest area in the phase image refers to the connected region containing the largest number of pixels.
[0054] S3: Perform Zernike polynomial expansion on the unpacked result and obtain the first four Zernike expansion terms and the corresponding coefficients of each term;
[0055] Specifically, in this step, the Zernike polynomial is established based on the polar coordinate system, and its expression is:
[0056] (1)
[0057] In formula (1), represents the Zernike polynomial expansion result, represents the polar diameter, represents the polar angle, j represents the number of expansion terms, and represent Zernike polynomials and corresponding coefficients respectively.
[0058] Based on formula (1), the expanded terms The expression is:
[0059] (2)
[0060] In formula (2), m and n represent two parameters of the polynomial, which are used to determine the number of terms after expansion. R represents the radial polynomial, which is expressed as follows:
[0061] (3)
[0062] According to equations (2) and (3), the first four terms after the expansion of the Zernike polynomial are expressed as:
[0063] (4)
[0064] In formula (4), the first four terms after the expansion of the Zernike polynomial are the translation, the tilt along the x-axis, the tilt along the y-axis, and the defocus.
[0065] S4: Perform plane fitting in the area to be unwrapped according to the first four Zernike expansion terms and the corresponding coefficients of each term to obtain the fitting standard plane;
[0066] Specifically, in this step, the expression for fitting the standard plane is:
[0067] (5)
[0068] In the formula, a, b, c, and d represent the coefficients of the first four Zernike expansion terms, represents the first term of the Zernike expansion, represents the second term of the Zernike expansion, represents the third term of the Zernike expansion, represents the fourth term of the Zernike expansion.
[0069] S5: calculating the phase unpacking result of each connected region, and determining the difference in the number of cycles between the phase unpacking result of each connected region and the fitted standard plane;
[0070] S5 is as follows:
[0071] S501: Calculate the phase unpacking result of each connected area;
[0072] S502: Calculate the phase difference (in pixels) between the phase unpacking result of each connected region and the fitted standard plane;
[0073] Specifically, the calculation formula of the phase difference is:
[0074] (6)
[0075] In formula (6), represents the phase difference, Indicates the serial number of the connected area, represents the standard plane of fitting, Represents the phase unpacking results for each connected region.
[0076] S503: Calculate the average phase difference of all pixels in each connected domain to obtain the average value between each connected region and the fitting standard plane;
[0077] S504: Obtain the cycle number difference between the phase unpacking result of each connected region and the fitting standard plane according to the average value and the phase change amount of the pixel within one cycle.
[0078] Specifically, in this step, the difference expression of the number of cycles between the phase unpacking result of each connected region and the fitted standard plane is:
[0079] (7)
[0080] In formula (7), represents the difference in the number of cycles between the phase unpacking result of the connected region and the fitting standard plane; i represents the serial number of the connected region, N represents the number of pixels contained in the connected region, represents the phase difference, and 2π represents the phase change of the pixel in one cycle.
[0081] S6: Add the phase unpacking result of each connected region and its corresponding period number difference to obtain the final cross-region phase unpacking result.
[0082] Specifically, in this step, adding the phase unpacking result of each connected region and the corresponding period number difference can eliminate the problem of the first phase period being 1 caused by regional discretization, thereby obtaining the final cross-region phase unpacking result.
[0083] The final cross-region phase unpacking result is expressed as:
[0084] (8)
[0085] In formula (8), Represents the phase unwrapping result of the i-th connected region.
[0086] A cross-region phase unwrapping method provided in this embodiment solves the phase unwrapping problem of discontinuous surfaces such as the phase image being decomposed into multiple regions of different sizes and irregular shapes due to factors such as the surface shape of the detection element, obstruction of the clamping device, and surface defects of the test piece during actual detection through low-order Zernike polynomial plane fitting.
[0087] This embodiment is based on Zernike polynomial fitting of the standard plane, and determines the difference in the number of periods by calculating the difference between the standard plane and the phase unwrapping results of each region, so that the unwrapping results of each region are correlated with each other, and the final complete and accurate phase unwrapping results are obtained, thereby realizing the phase period correction and phase unwrapping of discontinuous surfaces.
[0088] Embodiment 2
[0089] This embodiment provides a cross-region phase unwrapping device, including:
[0090] A phase image acquisition module, used to acquire a phase image of multiple connected regions and determine the area of each connected region in the phase image;
[0091] A phase unpacking operation module is used to select the connected region with the largest area in the phase image to perform phase unpacking operation and obtain an unpacking result;
[0092] A polynomial expansion module, used for performing Zernike polynomial expansion on the unpacked result and obtaining the first four Zernike expansion terms and the coefficients corresponding to each term;
[0093] The standard plane fitting module is used to perform plane fitting in the unwrapped area according to the first four Zernike expansion terms and the corresponding coefficients of each term to obtain a fitting standard plane;
[0094] A cycle number difference calculation module, used to calculate the phase unpacking result of each connected area, and determine the cycle number difference between the phase unpacking result of each connected area and the fitting standard plane;
[0095] The cross-region phase unpacking module is used to add the phase unpacking result of each connected region and its corresponding period number difference to obtain the final cross-region phase unpacking result.
[0096] For the specific implementation content of each module in a cross-regional phase unwrapping device, please refer to the above definition of a cross-regional phase unwrapping method, which will not be repeated here.
[0097] Embodiment 3
[0098] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of a cross-region phase unwrapping method are implemented.
[0099] Embodiment 4
[0100] This embodiment provides a computer program product, including a computer program or instructions, which implements the steps of a cross-region phase unwrapping method when executed by a processor.
[0101] The technical features of the above embodiments may be arbitrarily combined (as long as there is no contradiction in the combination of these technical features). In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described; these embodiments that are not explicitly written should also be considered to be within the scope of this specification.
Claims
1. A cross-region phase unwrapping method, characterized in that: include: Step 1: Obtain a phase image of multiple connected regions, and determine the area of each connected region in the phase image; The phase image of the multiply connected region refers to a phase image in which the phase distribution of each pixel is in a periodic truncation form; Step 2: Select the connected region with the largest area in the phase image to perform phase unpacking operation and obtain the unpacking result; Step 3: Perform Zernike polynomial expansion on the unpacked result, and obtain the first four Zernike expansion terms and the coefficients corresponding to each term; Step 4: Perform plane fitting in the area to be unwrapped according to the first four Zernike expansion terms and the corresponding coefficients of each term to obtain the fitting standard plane; Step 5: Calculate the phase unpacking result of each connected region, and determine the difference in the number of cycles between the phase unpacking result of each connected region and the fitting standard plane; Step 6: Add the phase unpacking result of each connected region and its corresponding period number difference to obtain the final cross-region phase unpacking result; The step 5 is specifically as follows: Step 501: Calculate the phase unpacking result of each connected region; Step 502: Calculate the phase difference between the phase unpacking result of each connected region and the fitting standard plane; Step 503: Calculate the average phase difference of all pixels in each connected domain to obtain the average value between each connected region and the fitting standard plane; Step 504: Obtain the cycle number difference between the phase unpacking result of each connected region and the fitting standard plane according to the average value and the phase change amount of the pixel within one cycle.
2. The cross-region phase unwrapping method according to claim 1, characterized in that: In step 3, the expression of the Zernike polynomial is: , In the formula, represents the Zernike polynomial expansion result, represents the polar diameter, represents the polar angle, j Indicates the number of expanded items, and represent Zernike polynomials and corresponding coefficients respectively.
3. The cross-region phase unwrapping method according to claim 1, characterized in that: In step 3, the first four terms after the expansion of the Zernike polynomial are the translation amount, the tilt amount along the x-axis direction, the tilt amount along the y-axis direction and the defocus amount.
4. The cross-region phase unwrapping method according to claim 1, characterized in that: In step 4, the expression for fitting the standard plane is: , In the formula, a, b, c, and d represent the coefficients of the first four Zernike expansion terms, represents the first term of the Zernike expansion, represents the second term of the Zernike expansion, represents the third term of the Zernike expansion, represents the fourth term of the Zernike expansion.
5. The cross-region phase unwrapping method according to claim 1, characterized in that: In step 504, the phase change of the pixel in one period is 2π.
6. The cross-region phase unwrapping method according to claim 5, characterized in that: In step 504, the difference in the number of cycles between the phase unpacking result of each connected region and the fitted standard plane is expressed as: , In the formula, The difference in the number of cycles between the phase unpacking result of the connected region and the fitted standard plane; i Indicates the serial number of the connected area, N Indicates the number of pixels contained in the connected area. represents the phase difference, and 2π represents the phase change of the pixel in one cycle.
7. A cross-region phase unwrapping device, characterized in that: include: A phase image acquisition module, used to acquire a phase image of multiple connected regions and determine the area of each connected region in the phase image; The phase image of the multiply connected region refers to a phase image in which the phase distribution of each pixel is in a periodic truncation form; A phase unpacking operation module is used to select the connected region with the largest area in the phase image to perform phase unpacking operation and obtain an unpacking result; A polynomial expansion module, used for performing Zernike polynomial expansion on the unpacked result and obtaining the first four Zernike expansion terms and the coefficients corresponding to each term; The standard plane fitting module is used to perform plane fitting in the unwrapped area according to the first four Zernike expansion terms and the corresponding coefficients of each term to obtain a fitting standard plane; The cycle number difference calculation module is used to calculate the phase unpacking result of each connected area, and determine the cycle number difference between the phase unpacking result of each connected area and the fitting standard plane; specifically: calculate the phase unpacking result of each connected area; calculate the phase difference between the phase unpacking result of each connected area and the fitting standard plane; Calculate the average phase difference of all pixels in each connected domain to obtain the average value between each connected area and the fitting standard plane; obtain the cycle number difference between the phase unpacking result of each connected area and the fitting standard plane according to the average value and the phase change of the pixel within one cycle; The cross-region phase unpacking module is used to add the phase unpacking result of each connected region and its corresponding period number difference to obtain the final cross-region phase unpacking result.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Minimum discontinuousness two-dimension phase unwrapping method based on phase discontinuousness area detection
CN101276323A
Method for detecting and correcting unpacking phase error based on phase distribution
CN110793463A
Phase unwrapping method based on Zernike polynomial and WKF
CN112179269A
Absolute phase recovery method based on object lateral dimension assistance
CN113503832A
Discontinuous region phase unwrapping method and device
CN117576039A
