Zernike polynomial Euclidean fitting distortion correction method based on condition number optimization
By fitting the distortion error of optical elements and optimizing the condition number of the Zernike polynomial matrix, the problem of low distortion correction accuracy in traditional optical data processing is solved, and high-precision and efficient optical element surface correction is achieved.
Patent Information
- Application Number
- CN202410739609.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-10-15
AI Technical Summary
In traditional optical data processing, the distortion correction method for optical surface detection is not very accurate, especially in complex off-axis aspherical or free-form surface optical elements, which requires a large number of marking points and is not very accurate, and the location of the marking points depends on manual selection. The process is cumbersome.
By fitting the distortion error on the actual shape of the optical element, a Zernike polynomial matrix is established, and the position of the marking points is solved through condition number optimization. The condition number of the Zernike polynomial matrix is optimized to improve the correction accuracy, and a small number of marking points are used for correction.
It significantly improves the distortion correction accuracy of optical element surface shape detection, reduces the number of marking points, and improves detection efficiency. The error after correction is less than 4 times that of the traditional method.
Smart Images

Figure CN118779993A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of optical polishing, and in particular relates to a method for correcting distortion errors of optical surface detection data and selecting marking points in optical data processing. Background Art
[0002] In modern optical processing, numerically controlled sub-aperture polishing is an important processing method to achieve nanometer-level high-precision surface errors. Its basic principle is to use a grinding head that is much smaller than the diameter of the workpiece to control the dwell time of each dwell point on the workpiece through a computer according to the surface error data to achieve quantitative removal of materials at each point on the surface. In the final stage of optical processing and trimming of off-axis aspheric and parabolic mirrors, the mirror surface image detected by using a laser interferometer with a compensator or a hologram will have a large distortion, and it needs to be corrected before it can be used as a reference for subsequent processing. The traditional distortion correction method is completed with the help of an optical design model. The coordinate correspondence between the mirror coordinates and the computational holographic plane is calculated by ray tracing. However, the coordinates on the optical surface of the compensator to the pixel coordinates on the image plane of the interferometer are still not linearly mapped, resulting in distortion correction errors or poor results, which makes the distortion correction results given by this method not accurate. Another commonly used correction method is to make a series of marking points on the measured mirror. The horizontal coordinates of the marking points on the measured mirror are calibrated. By finding the pixel coordinates corresponding to each marking point in the interference pattern, the corresponding relationship between the pixel coordinates on the interferometer image plane and the horizontal coordinates on the measured mirror can be established. For complex off-axis aspheric surfaces or free-form surfaces with severe distortion, hundreds of marking points in a two-dimensional array are required, and the positions of the marking points are generally selected based on manual experience. The process is cumbersome and the accuracy is not high. Summary of the invention
[0003] In order to solve the distortion problem existing in the process of non-spherical optical element surface shape detection, the present invention provides an optical element surface shape detection image distortion correction method, which can be used for distortion correction of optical elements of different shapes. The method first fits the distortion error on the actual shape of the element, and then modifies its own matrix shape according to the fitted error matrix so that it corresponds to the error of each data point on the distorted surface shape, and then corrects the distortion error. And by establishing a Zernike polynomial matrix of the marking point and optimizing its condition number to find the marking point position when the condition number is the smallest, so as to obtain the Zernike matrix with the highest stability, so that the error of the solved Zernike polynomial coefficient is minimized, which will be beneficial to improve the accuracy of distortion correction.
[0004] To solve the above problems, the technical solution of the present invention is as follows:
[0005] A method for solving the optimal marking point in polynomial distortion correction based on condition number optimization includes the following steps:
[0006] S1. Determination of the actual shape and size of the optical element: Measure the actual size of the optical element, and construct a matrix data A of the corresponding size based on the shape and size of the optical element. The value in the surface shape can be set to NaN.
[0007] S2. Select the number of Zernike terms and initial marking points: According to the distortion situation, select the first n Zernike polynomials to fit the distortion error, then select m (m ≥ n) initial marking points in the initial surface shape and record their position coordinates.
[0008] S3. Establishment of Zernike polynomial matrix: Calculate the value of the corresponding position of the marker point in each Zernike polynomial according to the position information of the initial marker point, and establish the Zernike polynomial matrix M. Each row in this matrix corresponds to the value of each point in the first n polynomials, and each column corresponds to the value of these m points in each term of the Zernike polynomial. The Zernike polynomial matrix M is as follows:
[0009]
[0010] S4. Calculate the condition number of the Zernike polynomial matrix M: Use the matrix condition number formula ||M||||M -1 ||, establish the condition number function of the Zernike polynomial matrix M.
[0011] S5. Optimize the final coordinates of the marking points: set K initial points with different positions to make the marking points evenly distributed on the surface, optimize the condition number function of the corresponding Zernike polynomial matrix M, continuously iterate the position of the marking points, and find the coordinates of the marking points when the condition number is the smallest.
[0012] S6. Determine the error of the surface shape at the marked point: detect the optical element with the marked point through an interferometer, obtain the position coordinates of the marked point after distortion, subtract them from the actual coordinates of the marked point, and obtain the error values of each point in the x and y directions respectively.
[0013] S7. Calculate the coefficients of the Zernike polynomials: Use the error I in the x and y directions of the surface shape at the optimal marking point and the Zernike polynomial matrix M at the marking point to establish the matrix equation MX=I, where S represents the elements in the matrix M, and solve the coefficients X of the Zernike polynomials by the least squares method.
[0014]
[0015] S8. Fitting the errors in the x and y directions on the actual surface shape: Based on the constructed matrix data A of the actual element size, create a Zernike polynomial matrix of the corresponding size, multiply it by the coefficient X of each item, and add them up to obtain the distortion values in the x and y directions on the entire surface shape, which has the same size as the constructed matrix A.
[0016] S9. Calculate the errors in the x and y directions of the distorted surface shape: modify the coordinate value of each point on the error matrix in the x and y directions of the actual shape obtained by fitting according to the value of each data point, and obtain the error value matrix in the x and y directions of the distorted surface shape, and perform linear interpolation on it so that the coordinate value of each point is an integer.
[0017] S10. Correcting the distorted surface data: subtracting the coordinate value of each data point on the distorted surface from the errors in the x and y directions on the distorted surface obtained in S9 to obtain corrected surface data.
[0018] S11. Correction completed: linear interpolation is performed on the corrected face shape data to obtain the corrected face shape.
[0019] Further, in S4, the condition number calculation method of the matrix M is:
[0020] For any reversible matrix A, its condition number is
[0021] cond(A)=|A||||A -1 |
[0022] Wherein, the symbol cond(·) represents the condition number. ||A|| represents the norm of the matrix A. The present invention adopts the 2-norm of the matrix, namely:
[0023] where λ max (A T A) means A T The largest eigenvalue of A.
[0024] Further, the method for solving the marking points in S5 is as follows:
[0025] Define F as the condition number function of the matrix M, F = cond(M), and the independent variable is the polar coordinate position (ρ, θ) of each marking point, where ρ and θ are vectors with m rows and 1 column. Suppose the initial marking point position coordinates are (ρ0, θ0), and the coordinates after each iteration are (ρ1, θ1), (ρ2, θ2)...(ρ i ,θ i )..., and record the F value of each iteration. The iteration method is:
[0026] make
[0027] Among them, K is the step size of each iteration, which can be selected according to the actual situation. Set the iteration termination threshold, and stop the iteration when the value of the condition number F is less than the termination threshold, and obtain the coordinates of each marking point at this time. At the same time, you can randomly set the position coordinates of multiple initial points, but try to make the initial points evenly distributed on the surface shape, and then perform iterative optimization separately to obtain the local minimum values of the condition number F and the position coordinates of the marking points at this time, and find the position of the marking point with the smallest F as the final marking point.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] Compared with the traditional method of fitting distortion with polynomials, the present invention uses the actual shape of the optical element to fit the distortion error, and calculates the selection position of the optimal marking point, so that the condition number of the constructed Zernike polynomial matrix is smaller, so that the error of the fitting coefficient obtained by solving is smaller, and the accuracy of distortion correction is higher. After simulation comparison, the rms error after correction using this method is about 4 times smaller than that of the original method. In addition, other existing methods require the use of a large number of marking points for fitting, while this method only needs to use a small number of marking points, making the detection efficiency higher. The present invention can calculate the optimal position of the marking points of optical elements of various shapes, and can select different Zernike polynomials to fit the distortion according to the type of distortion, and has wide applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a flow chart of the distortion correction method based on Zernike polynomials of the present invention;
[0031] Figure 2 It is the facial image before and after correction;
[0032] Figure 3 To compare the error between the original image and the image after the distortion is corrected using this method and without using this method;
[0033] Figure 4 To correct the optimal marking point position of the circular element using the first 3, 4, 6, 8, 10, 11, and 15 terms of the Zernike polynomials;
[0034] Figure 5 The optimal marking point positions for correcting square elements using the first 3, 4, 6, 8, 10, 11, and 15 terms of the Zernike polynomials. DETAILED DESCRIPTION
[0035] The specific steps of the method in this embodiment are as follows:
[0036] (1) Determination of the shape and size of the actual optical element: The actual surface data matrix used in the experiment is 1000*1000 in size and circular in shape. The data outside the circular area is NaN.
[0037] (2) Selecting the number of Zernike terms and initial marking points: In this experiment, the first six Zernike polynomials are selected to fit the distortion error. Six initial marking points are randomly selected in the initial surface shape and their position coordinates are recorded.
[0038] (3) Establishment of Zernike polynomial matrix: Calculate the value of the corresponding position of the marker point in each Zernike polynomial according to the position information of the initial marker point, and establish a six-row and six-column Zernike polynomial matrix M. Each row in this matrix corresponds to the value of each point in the first six polynomials, and each column corresponds to the value of these six points in each term of the Zernike polynomial. The Zernike polynomial matrix M is as follows:
[0039]
[0040] (4) Calculate the condition number of the Zernike polynomial matrix M: Use the matrix condition number formula ||M||||M -1 ||, establish the condition number function of the Zernike polynomial matrix M. Among them,
[0041] (5) Optimize the final marking point position coordinates: randomly set K initial points with different positions. In this example, K is 100. Optimize the condition number function of the corresponding Zernike polynomial matrix M. Continuously iterate the position of the marking point to find the position coordinates of the marking point when the condition number is the smallest. The optimal marking point position is shown in the attached figure. Figure 4 The third picture in the figure. The optimal iterative marking method is as follows:
[0042] Define F as the condition number function of the matrix M, F = cond(M), and the independent variable is the polar coordinate position (ρ, θ) of each marking point, where ρ and θ are vectors with 6 rows and 1 column. Suppose the initial marking point position coordinates are (ρ0, θ0), and the coordinates after each iteration are (ρ1, θ1), (ρ2, θ2)...(ρ i ,θ i )..., and record the F value of each iteration. The iteration method is:
[0043] make
[0044] Among them, K is the step size of each iteration, which can be set according to the actual situation. Set the iteration termination threshold. When the value of the condition number F decreases less than the termination threshold, stop the iteration and obtain the coordinates of each marked point at this time. The step size set in this experiment is 0.005 and the termination threshold is 0.01. At the same time, 100 initial point position coordinates are randomly set for iterative optimization, and the local minimum values of the condition number F and the position coordinates of the marked point at this time are obtained respectively. The position of the marked point with the smallest F is found as the final marked point.
[0045] (6) Determine the error of the surface shape at the marked point: mark the marked point at the corresponding optimal position on the component, detect it through interferometer, obtain the position coordinates of the marked point after distortion, subtract them from the actual coordinates of the marked point, and obtain the error value of each point in the x and y directions respectively.
[0046] (7) Obtaining the coefficients of the Zernike polynomials: Using the surface shape error I in the x and y directions at the optimal marking point and the Zernike polynomial matrix M at the marking point, a matrix equation MX = I is established, where S represents the elements in the matrix M. The coefficients X of the Zernike polynomials are obtained by the least squares method.
[0047]
[0048] (8) Fitting the errors in the x and y directions on the actual surface shape: Based on the constructed matrix data A of the actual element size, create a Zernike polynomial matrix of the corresponding size, multiply the coefficient X of each item, and add them together to obtain the distortion values in the x and y directions on the entire surface shape, which is the same size as the constructed matrix A.
[0049] (9) Calculate the errors in the x and y directions of the distorted surface shape: modify the coordinate value of each point on the error matrix in the x and y directions of the actual shape obtained by fitting according to the value of each data point, and obtain the error value matrix in the x and y directions of the distorted surface shape, and perform linear interpolation on it so that the coordinate value of each point is an integer.
[0050] (10) Correcting the distorted surface data: Subtract the coordinate value of each data point on the distorted surface from the error in the x and y directions on the distorted surface obtained by S9 to obtain the corrected surface data.
[0051] (11) Correction completed: Linear interpolation is performed on the corrected face shape data to obtain the corrected face shape.
[0052] Figure 2 The distribution of face shape data before and after correction using the above method is shown in Figure 2. Figure 2 (a) before correction, Figure 2 (b) After correction. Figure 3 The rms error of subtracting the original image after the distortion correction by this method is 9.17nm, and the rms error of subtracting the original image after correction directly on the distortion image without using this method is 36.67nm. It can be seen that the accuracy after correction using this method is higher.
Claims
1. A Zernike polynomial Euclidean fitting distortion correction method based on condition number optimization, characterized in that: The following steps are involved: S1. Determination of the actual shape and size of the optical element: Measure the actual size of the optical element, and construct a matrix data A of the corresponding size according to the shape and size of the optical element. The value in the surface shape can be set to NaN; S2. Select the number of Zernike terms and initial marking points: According to the distortion situation, select the first n Zernike polynomials to fit the distortion error, then select m (m ≥ n) initial marking points in the initial surface shape and record their position coordinates. S3. Establishment of Zernike polynomial matrix: Calculate the value of the corresponding position of the marker point in each Zernike polynomial according to the position information of the initial marker point, and establish the Zernike polynomial matrix M. Each row in this matrix corresponds to the value of each point in the first n polynomials, and each column corresponds to the value of these m points in each term of the Zernike polynomial. The Zernike polynomial matrix M is as follows: S4. Calculate the condition number of the Zernike polynomial matrix M: establish the condition number function of the Zernike polynomial matrix M through the matrix condition number formula; S5. Optimize the final coordinates of the marking points: set K initial points with different positions to make the marking points evenly distributed on the surface, optimize the condition number function of the corresponding Zernike polynomial matrix M, and continuously iterate the positions of the marking points to find the coordinates of the marking points when the condition number is the minimum; S6. Determine the error of the surface shape at the marked point: detect the optical element with the marked point through an interferometer, obtain the position coordinates of the marked point after distortion, subtract them from the actual coordinates of the marked point, and obtain the error values of each point in the x and y directions respectively; S7. Find the coefficients of the Zernike polynomials: Use the error I of the surface shape in the x and y directions at the optimal marking point and the Zernike polynomial matrix M at the marking point to establish a matrix equation MX=I, where S represents the elements in the matrix M, and solve the coefficients X of the Zernike polynomials by the least squares method; S8. Fitting the errors in the x and y directions on the actual surface shape: Based on the constructed matrix data A of the actual element size, create a Zernike polynomial matrix of the corresponding size, multiply the coefficient X of each item, and add them together to obtain the distortion values in the x and y directions on the entire surface shape, which has the same size as the constructed matrix A; S9. Calculate the errors in the x and y directions of the distorted surface shape: modify the coordinate value of each point on the error matrix in the x and y directions of the actual shape obtained by fitting according to the value of each data point, and obtain the error value matrix in the x and y directions of the distorted surface shape, and perform linear interpolation on it so that the coordinate value of each point is an integer. S10. Correcting the distorted face shape data: subtracting the coordinate value of each data point on the distorted face shape from the error in the x and y directions on the distorted face shape obtained in S9 to obtain the corrected face shape data; S11. Correction completed: linear interpolation is performed on the corrected face shape data to obtain the corrected face shape.
2. The Zernike polynomial Euclidean fitting distortion correction method based on condition number optimization according to claim 1, characterized in that: S4, calculates the condition number of the Zernike matrix M: For any reversible matrix A, its condition number is cond(A)=||A||||A -1 || Wherein, the symbol cond(·) represents the condition number. ||A|| represents the norm of the matrix A. The present invention adopts the 2-norm of the matrix, namely: where λ max (A T A) means A T The largest eigenvalue of A.
3. The Zernike polynomial Euclidean fitting distortion correction method based on condition number optimization according to claim 1, characterized in that: S5, optimizes the position of the marking point: Define F as the condition number function of the matrix M, F = cond(M), the independent variable is the polar coordinate position of each marking point (ρ, 0), where ρ and θ are vectors with m rows and 1 column. Suppose the initial marking point position coordinates are (ρ0, θ0), and the coordinates after each iteration are (ρ1, θ1), (ρ2, θ2)...(ρ i ,θ i )..., and record the F value of each iteration. The iteration method is: make Among them, K is the step size of each iteration, which can be selected according to the actual situation. Set the iteration termination threshold, and stop the iteration when the value of the condition number F is less than the termination threshold, and obtain the coordinates of each marking point at this time. At the same time, you can randomly set the position coordinates of multiple initial points, but try to make the initial points evenly distributed on the surface shape, and then perform iterative optimization separately to obtain the local minimum values of the condition number F and the position coordinates of the marking points at this time, and find the position of the marking point with the smallest F as the final marking point.
