A Shack-Hardemann wavefront detection method based on global spot matching
By adopting the global spot matching objective function and iterative matching algorithm in the Shakhardman wavefront sensor, the problem of limiting the maximum spot offset of the sensor is solved, and a larger dynamic range and robust wavefront measurement is achieved.
Patent Information
- Application Number
- CN202311694390.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-12
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2043-12-12
AI Technical Summary
The maximum spot offset of the existing Shakhardman wavefront sensor is limited to the range of a single microlens, resulting in limited maximum wavefront slope measurement capability and making it difficult to achieve wavefront measurement in a large dynamic range.
Using a detection method based on global spot matching, the global spot matching objective function and iterative matching algorithm are constructed to search for the incident wavefront closest to the measured spot image, thereby improving the maximum meterable spot offset and dynamic range measurement capability.
It greatly improves the dynamic range measurement capability of the Shakhardman wavefront sensor, and can achieve accurate spot matching and wavefront measurement without presetting the initial matching relationship between the spot and the microlens, and has strong robustness.
Smart Images

Figure CN117870879B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of wavefront measurement, in particular to a Shack-Hardemann wavefront detection method based on global spot matching. Background Art
[0002] Wavefront measurement technology can measure the phase distribution of light fields with high precision and has been widely used in biological imaging, astronomical detection, precision manufacturing, ophthalmic diagnosis and other fields. The Shack-Hartmann sensor is a non-interferometric wavefront measurement technology with the advantages of high measurement accuracy, fast measurement speed, and strong resistance to environmental interference. It has been widely used in astronomical detection, biological imaging, ophthalmic diagnosis and other fields. The Shack-Hartmann sensor is mainly composed of a microlens array and an image sensor. The microlens array samples the measured wavefront and images it as a spot array in the image sensor. By measuring the offset of the spot, the local slope of the wavefront can be determined, thereby reconstructing the wavefront. The maximum spot offset that can be matched by the traditional Shack-Hartmann sensor algorithm is limited to the corresponding microlens range, and the maximum wavefront slope that can be measured will be limited. Therefore, it is difficult for conventional Shack-Hartmann sensors to measure large dynamic range wavefronts.
[0003] In order to further broaden the dynamic range of the Shack-Hartmann sensor, researchers at home and abroad have proposed many solutions, which can be divided into two categories: hardware improvement and algorithm improvement. The former mainly adjusts the structure of the Shack-Hartmann sensor or adds additional devices to provide additional information for spot tracking, thereby breaking through the limitation of the spot offset to the range corresponding to the corresponding microlens and improving its measurement dynamic range. However, this method greatly increases the complexity of the system, and at the same time makes the measurement steps complicated and the measurement time greatly increased. Compared with the hardware improvement method, the algorithm improvement method does not need to change the original system. It uses algorithms such as unwrapping algorithm, iterative extrapolation method, neighborhood search method, and spot sorting method to determine the correspondence between the spot and the micromirror that exceeds the corresponding area of the microlens, thereby improving the dynamic range of the Shack-Hartmann sensor.
[0004] However, the proposed algorithm improvement methods have two shortcomings. First, they require certain prior knowledge to determine several sets of correct correspondences as initial conditions. Second, the principle of local information reasoning means that they can only search for the position of unmatched light spots beyond a certain area of the microlens, and the dynamic range expansion capability is limited. In particular, these algorithms are greedy algorithms in nature, hoping to obtain the global optimal solution by finding the local optimal solution. Once an error or failure occurs in a certain search process, the algorithm will fail. Summary of the invention
[0005] The purpose of the present invention is to provide a Shack-Hardemann wavefront detection method based on global spot matching in order to overcome the defect of the prior art that the maximum spot offset that the existing Shack-Hardemann wavefront sensor can match is limited within the range of a single microlens, resulting in limited maximum wavefront slope measurement capability.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] A Shack-Hardemann wavefront detection method based on global spot matching comprises the following steps:
[0008] Step 1: calibrate the Shack-Hardemann wavefront sensor to obtain the position of the characteristic points of the reference light spot; image the measured wavefront into a light spot array with a specific distribution through the Shack-Hardemann wavefront sensor to obtain a measurement light spot image;
[0009] Step 2: Segment the measured spot image into N sub-regions containing a single spot using a threshold segmentation algorithm; extract the feature point coordinates (x n ,y n ), the coordinates of the feature points of all the spots are combined into the measurement spot feature point set G = {(x n ,y n )} n=1,2,...,N ;
[0010] Step 3: Construct an optical model of the Shack-Hardemann wavefront sensor to simulate the light spot image formed by the incident wavefront being imaged by the Shack-Hardemann wavefront sensor;
[0011] Step 4: Randomly generate M groups of wavefront characterization parameters, and generate M groups of incident wavefronts {Φ m} m=1,2,...,M ;
[0012] Step 5: Input each incident wavefront into the constructed Shack-Hardemann wavefront sensor optical model to obtain M sets of estimated light spot feature point sets {E m} m=1,2,...,M ;
[0013] Step 6: Construct the global spot matching objective function and calculate the estimated spot feature point set {E m} m=1,2,...,M and the objective function values between the measured light spot feature point set G, respectively, {d m} m=1,2,...,M ;
[0014] Step 7: By using the objective function value {d m} m=1,2,...,M Input the iterative matching algorithm to update M groups of wavefront characterization parameters and regenerate M groups of incident wavefronts {Φm} m=1,2,...,M ;
[0015] Step 8: Repeat steps 4 to 7 until at least one of the M objective function values is less than the set objective function threshold, or the number of repetitions of steps 4 to 7 reaches the set repetition threshold. End the iteration and take the incident wavefront corresponding to the minimum target difference value as the optimal incident wavefront Φ op ;
[0016] Step 9: Set the optimal incident wavefront Φ op Input the Shack-Hardemann wavefront sensor optical model to calculate the estimated spot image, thereby calculating the optimal incident wavefront Φ op The corresponding estimated spot position; matching the focused spot position corresponding to each microlens in the Shack-Hardemann wavefront sensor from the measured spot image by nearest neighbor matching and the estimated spot position;
[0017] Step 10: According to the position of the light spot feature point corresponding to each micromirror and the position of the reference light spot feature point, the slope value of the measured wavefront sub-waveface corresponding to each micromirror is obtained, and the distribution of the measured wavefront is reconstructed according to the wavefront reconstruction algorithm.
[0018] Furthermore, the processing process of the threshold segmentation algorithm includes:
[0019] Step 201: setting a grayscale threshold, binarizing the spot image according to the grayscale threshold to convert it into a binary image, where the area greater than the grayscale threshold becomes 1, and the area less than the grayscale threshold becomes 0;
[0020] Step 202: performing an image dilation operation and an image erosion operation on the binary image in sequence to eliminate discrete noise points in the binary image;
[0021] Step 203: searching for a connected domain in the binary image, and taking out N regions with the largest areas in the connected domain as N light spot regions;
[0022] Step 204: extract the corresponding area in the light spot image according to the position of the light spot area, and obtain N sub-areas containing a single light spot.
[0023] Furthermore, the feature point is any one of the centroid, center and brightest point of the light spot.
[0024] Furthermore, the Shack-Hardemann wavefront sensor optical model is any one of a paraxial geometric optical model, an angular spectrum diffraction physical optical model, a Fresnel diffraction physical optical model and a Fraunhofer diffraction physical optical model.
[0025] Furthermore, the wavefront characterization parameter is any one of square domain Zernike polynomials, ring domain Zernike polynomials and Legendre polynomials.
[0026] Furthermore, the processing process of the global spot matching objective function includes:
[0027] Step 601: Sort the measurement spot feature point set G to obtain point set G s ;
[0028] Step 602: Take out the estimated light spot feature point set E1 = {e n} n=1,2,...,N A point e1 in the search point set G s The point g1 closest to point e1;
[0029] Step 603: Repeat step 602 until all other points in point set E1 are in point set G. s Search for the nearest points, which are g2, g3, ..., g N ;
[0030] Step 604: Calculate point set E m Each point in the point set G s The distances between the closest points are d(e1, g1), d(e2, g2), ..., d(e N , g N );
[0031] Step 605: Take d(e1, g1), d(e2, g2), ..., d(e N , g N ) is subtracted from the preset penalty factor to serve as the objective function value d1;
[0032] Step 606: Repeat steps 602-605 until E2, E3, ..., E M The objective function values d2, d3, ..., d M .
[0033] Furthermore, the penalty factor is a superposition value of one or more of the following: the number of repeated matching times of the light spots, the continuity of the slopes of the adjacent regions, and the degree of badness of the wavefront characterization parameters.
[0034] Furthermore, the iterative matching algorithm is any one of a particle swarm algorithm, a genetic algorithm, a simulated annealing algorithm, an evolutionary strategy, a gradient descent method, and a convolutional neural network.
[0035] Furthermore, when the iterative matching algorithm is a particle swarm algorithm, the processing process is as follows:
[0036] The particle swarm algorithm regards each set of wavefront characterization parameters as a particle to be searched. Each particle has K numerical parameters to be iteratively searched, and each particle is represented by characteristic parameter position and velocity:
[0037]
[0038]
[0039] In the formula, x m (t) is the position of the wavefront representation of the mth group in the tth iteration, is the Kth wavefront characterization position parameter, v m (t) is the velocity of the mth group of wavefront representation in the tth iteration, is the velocity parameter characterizing the Kth wavefront;
[0040] Before the iterative calculation of the iterative matching algorithm, the initial position x of the M groups of wavefront characterization parameters is m (0) and speed v m (0) Set to a random value; Calculate the objective function value of each particle The historical optimal value of each particle Set to the currently initialized M particles; set the group's historical optimal Set to The particle corresponding to the minimum objective function value in ;
[0041] In the iterative calculation of the iterative matching algorithm, each particle is first updated by the following formula, including position and velocity:
[0042]
[0043] In the formula, ω is, c1 is, r1 is, c2 is, r2 is;
[0044] Calculate the objective function value of the M particles after the update like Then Set to the updated particle; set the group's historical optimal Set to The particle corresponding to the minimum objective function value in the equation is repeated until the iteration ends. The position of is the optimal wavefront characterization parameter searched.
[0045] Furthermore, the wavefront reconstruction algorithm is any one of an iterative solution method, a matrix vector method and a Zernike pattern wavefront reconstruction method.
[0046] Compared with the prior art, the present invention has the following advantages:
[0047] (1) In order to overcome the problem that the maximum spot offset that can be matched by the existing Shack-Hardemann wavefront sensor is limited within the range of a single microlens, which leads to the limitation of the maximum wavefront slope measurement capability, the present invention constructs a global spot matching objective function to globally evaluate the difference between any spot image and the measurement spot image, and then searches for the incident wavefront closest to the measurement spot image through an iterative matching algorithm, thereby greatly improving the maximum measurable spot offset and the dynamic range measurement capability of the Shack-Hardemann wavefront sensor;
[0048] This solution does not require presetting of the initial matching relationship between the light spot and the microlens, and can complete global light spot matching without providing prior knowledge.
[0049] (2) The present invention has strong robustness and can achieve accurate matching of the light spot and the microlens and complete the measured wavefront measurement even when the light spot image is blocked and there are a large number of missing points.
[0050] (3) The present invention does not require changing the system structure of the Shack-Hardemann wavefront sensor and does not increase the manufacturing difficulty and cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic flow chart of a Shack-Hardemann wavefront detection method based on global spot matching provided in an embodiment of the present invention;
[0052] Figure 2 A schematic diagram of the principle of a Shack-Hardemann wavefront detection method based on global spot matching provided in an embodiment of the present invention;
[0053] Figure 3 A schematic diagram of the principle of a threshold segmentation algorithm provided in an embodiment of the present invention;
[0054] Figure 4a The measured wavefront phase distribution diagram provided in Embodiment 1 of the present invention;
[0055] Figure 4b The image of the light spot to be measured provided in Embodiment 1 of the present invention;
[0056] Figure 4c is the minimum objective function value curve for each iteration number provided in Example 1 of the present invention;
[0057] Figure 4d This is a result diagram after spot matching is completed according to the optimal incident wavefront provided in Example 1 of the present invention;
[0058] Figure 4e is the relative error value between the reconstructed wavefront and the measured wavefront provided in Embodiment 1 of the present invention;
[0059] Figure 5is the relative error value between 100 groups of different measured wavefront distributions and the reconstructed wavefront provided in Example 2 of the present invention, and each group of data takes the average relative error of all wavefront distributions;
[0060] Figure 6 It is a measurement spot image of the maximum measurable wavefront under the characterization of different Zernike terms (including astigmatism term, defocus term, trefoil term and coma term) provided in Example 3 of the present invention;
[0061] Figure 7 A comparison diagram of the peak-to-valley values of the maximum measurable wavefront under the characterization of the 3rd to 9th Zernike terms provided in Example 3 of the present invention and the peak-to-valley values of the maximum measurable wavefront of the traditional Shack-Hardemann wavefront sensor;
[0062] Figure 8 This is a spot matching result diagram when the measured spot image provided in Example 4 of the present invention has different missing conditions (including no missing spot, 13% missing spot in the edge area, 17% missing spot in the center area, and random missing of 10%, 30%, and 50% spots). DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0064] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0066] like Figure 1 and Figure 2 As shown, the present invention provides a Shack-Hardemann wavefront detection method based on global spot matching, comprising the following steps:
[0067] Step 1: calibrate the Shack-Hardemann wavefront sensor to obtain the position of the characteristic points of the reference light spot; image the measured wavefront into a light spot array with a specific distribution through the Shack-Hardemann wavefront sensor to obtain a measurement light spot image;
[0068] The imaging principle of the Shack-Hardemann wavefront sensor is as follows: the Shack-Hardemann wavefront sensor includes a microlens array and an image sensor. The microlens array focuses the incident wavefront and images it on the image sensor as a light spot array with a specific distribution.
[0069] Step 2: Segment the measured spot image into N sub-regions containing a single spot using a threshold segmentation algorithm; extract the feature point coordinates (x n ,y n ), the coordinates of the feature points of all the spots are combined into the measurement spot feature point set G = {(x n ,y n )} n=1,2,...,N ; N is the number of microlenses;
[0070] The application object of the threshold segmentation algorithm is the spot image, specifically the measured spot image or the estimated spot image, in which the gray value of the spot area is higher than the gray value of the background area;
[0071] Specifically, Figure 3 As shown, the processing process of the threshold segmentation algorithm includes:
[0072] Step 201: setting a grayscale threshold, binarizing the spot image according to the grayscale threshold to convert it into a binary image, where the area greater than the grayscale threshold becomes 1, and the area less than the grayscale threshold becomes 0;
[0073] Step 202: performing an image dilation operation and an image erosion operation on the binary image in sequence to eliminate discrete noise points in the binary image;
[0074] Step 203: searching for a connected domain in the binary image, and taking out N regions with the largest areas in the connected domain as N light spot regions;
[0075] Step 204: extract the corresponding area in the light spot image according to the position of the light spot area, and obtain N sub-areas containing a single light spot.
[0076] The feature point is any one of the centroid, center and brightest point of the light spot.
[0077] Step 3: Construct an optical model of the Shack-Hardemann wavefront sensor to simulate the light spot image formed by the incident wavefront being imaged by the Shack-Hardemann wavefront sensor;
[0078] The optical model of the Shack-Hardemann wavefront sensor is any one of a paraxial geometric optical model, an angular spectrum diffraction physical optical model, a Fresnel diffraction physical optical model and a Fraunhofer diffraction physical optical model.
[0079] Step 4: Randomly generate M groups of wavefront characterization parameters, and generate M groups of incident wavefronts {Φ m} m=1,2,...,M ;
[0080] The wavefront characterization parameter is any one of square domain Zernike polynomials, ring domain Zernike polynomials and Legendre polynomials.
[0081] Step 5: Input each incident wavefront into the constructed Shack-Hardemann wavefront sensor optical model to obtain M sets of estimated light spot feature point sets {E m} m=1,2,...,M ;
[0082] Step 6: Construct the global spot matching objective function and calculate the estimated spot feature point set {E m} m=1,2,...,M and the objective function values between the measured light spot feature point set G, respectively, {d m} m=1,2,...,M ;
[0083] Specifically, the processing process of the global spot matching objective function includes:
[0084] Step 601: Sort the measurement spot feature point set G to obtain point set G s ;
[0085] Step 602: Take out the estimated light spot feature point set E1 = {e n} n=1,2,...,N A point e1 in the search point set G s The point g1 closest to point e1;
[0086] Step 603: Repeat step 602 until all other points in point set E1 are in point set G. s Search for the nearest points, which are g2, g3, ..., g N ;
[0087] Step 604: Calculate point set E m Each point in the point set G s The distances between the closest points are d(e1, g1) and d(e2, g e ),…,d(e N , g N );
[0088] Step 605: Take d(e1, g1), d(e2, g2), ..., d(e N , g N ) is subtracted from the preset penalty factor to serve as the objective function value d1;
[0089] The penalty factor is one or more superposition values of the number of repeated matching of the light spot, the continuity of the slope of the adjacent area, and the bad value degree of the wavefront characterization parameter;
[0090] Step 606: Repeat steps 602-605 until E2, E3, ..., E M The objective function values d2, d3, ..., d M .
[0091] Step 7: By using the objective function value {d m} m=1,2,...,M Input the iterative matching algorithm to update M groups of wavefront characterization parameters and regenerate M groups of incident wavefronts {Φ m} m=1,2,...,M ;
[0092] The iterative matching algorithm is any one of a particle swarm algorithm, a genetic algorithm, a simulated annealing algorithm, an evolutionary strategy, a gradient descent method, and a convolutional neural network.
[0093] The processing process when the iterative matching algorithm is the particle swarm algorithm is as follows:
[0094] The particle swarm algorithm regards each set of wavefront characterization parameters as a particle to be searched. Each particle has K numerical parameters to be iteratively searched, and each particle is represented by characteristic parameter position and velocity:
[0095]
[0096]
[0097] In the formula, x m (t) is the position of the wavefront representation of the mth group in the tth iteration, is the Kth wavefront characterization position parameter, v m (t) is the velocity of the mth group of wavefront representation in the tth iteration, is the velocity parameter characterizing the Kth wavefront;
[0098] Before the iterative calculation of the iterative matching algorithm, the initial position x of the M groups of wavefront characterization parameters is m (0) and speed v m (0) Set to a random value; Calculate the objective function value of each particle The historical optimal value of each particle Set to the currently initialized M particles; set the group's historical optimal Set to The particle corresponding to the minimum objective function value in ;
[0099] In the iterative calculation of the iterative matching algorithm, each particle is first updated by the following formula, including position and velocity:
[0100]
[0101] In the formula, ω is, c1 is, r1 is, c2 is, r2 is;
[0102] Calculate the objective function value of M particles after update like Then Set to the updated particle; set the group's historical optimal Set to The particle corresponding to the minimum objective function value in the equation is repeated until the iteration ends. The position of is the optimal wavefront characterization parameter searched.
[0103] Step 8: Repeat steps 4 to 7 until at least one of the M objective function values is less than the set objective function threshold, or the number of repetitions of steps 4 to 7 reaches the set repetition threshold. End the iteration and take the incident wavefront corresponding to the minimum target difference value as the optimal incident wavefront Φ op ;
[0104] Step 9: Set the optimal incident wavefront Φ op Input the Shack-Hardemann wavefront sensor optical model to calculate the estimated spot image, thereby calculating the optimal incident wavefront Φ op The corresponding estimated spot position; matching the focused spot position corresponding to each microlens in the Shack-Hardemann wavefront sensor from the measured spot image by nearest neighbor matching and the estimated spot position;
[0105] Step 10: According to the position of the light spot feature point corresponding to each micromirror and the position of the reference light spot feature point, the slope value of the measured wavefront sub-wavefront corresponding to each micromirror is obtained, and the distribution of the measured wavefront is reconstructed according to the wavefront reconstruction algorithm;
[0106] The wavefront reconstruction algorithm is any one of an iterative solution method, a matrix vector method or a Zernike pattern wavefront reconstruction method.
[0107] The scheme of the present invention can be applied to the fields of biological imaging, astronomical detection, precision manufacturing, ophthalmic diagnosis, etc., and is suitable for large dynamic range Shack-Hardemann wavefront detection.
[0108] Example 1
[0109] This embodiment provides a Shack-Hardemann wavefront detection method based on global spot matching, and the specific process is as follows:
[0110] In this embodiment, the measured wavefront is a free-form surface wavefront with a wavelength λ of 532 nm. Figure 4aAs shown; the Shack-Hardemann wavefront sensor contains 19×19=361 microlenses, the microlens pitch is 150μm, the microlens aperture is 146μm, the microlens thickness is 1.2mm, the microlens non-convex position thickness is 0.5mm, the microlens curvature radius is 2.54mm, and the microlens focal length is 5.2mm; the image sensor is a CMOS sensor, the pixel size is 5.86μm, the image sensor pixel depth is 8 bits, the image sensor signal-to-noise ratio is 45.2dB, and the imaging distance between the microlens array and the CMOS sensor is 5.42mm;
[0111] The Shack-Hardemann wavefront sensor is calibrated by using multiple groups of spherical waves with different curvatures to estimate the position of the reference light spot feature points when the plane wave is incident on the Shack-Hardemann wavefront sensor; the measured wavefront is measured by the Shack-Hardemann wavefront sensor to obtain the measurement light spot image, such as Figure 4b As shown;
[0112] The grayscale value range of the spot area in the measured spot image is 100-255, and the grayscale value of the background area is 0-20. The measured spot image is segmented into 361 sub-areas containing a single spot through the threshold segmentation algorithm. The specific process is as follows:
[0113] Step a1: Set the grayscale threshold to 80, and perform binarization processing on the spot image according to the grayscale threshold to convert it into a binary image. The area greater than the grayscale threshold becomes 1, and the area less than the grayscale threshold becomes 0;
[0114] Step a2: taking one image dilation operation and one image erosion operation as a set of image closing operations, repeating five sets of image closing operations on the binary image to eliminate discrete noise points in the binary image;
[0115] Step a3: Search for connected domains in the binary image, and take out the 361 regions with the largest areas in the connected domains as 361 light spot regions;
[0116] Step a4: according to the position of the light spot area, the corresponding position is taken out in the light spot image to obtain 361 sub-areas containing a single light spot;
[0117] The centroid coordinates of 361 light spots are calculated by grayscale weighted centroid method as feature point coordinates, which are (x1, y1), (x2, y2), …, (x 361 ,y 361 ), the feature point coordinates are combined into a feature point set G = {(x1, y1), (x2, y2), ..., (x 361 ,y 361 )};
[0118] Previous 15-term square Zernike polynomials Z k(k = 1, 2, ..., 15) as the wavefront characterization parameters, randomly generate 20 different sets of 15-term Zernike polynomial coefficients Then 20 groups of incident wavefronts Φ with different phase distributions are generated. m (m=1, 2, ..., 20):
[0119]
[0120] The particle swarm algorithm regards each Zernike polynomial coefficient to be iteratively optimized as a particle, and each particle is represented by a position and a velocity; the initial position of the 20 particles is set to The initial speeds of 20 groups of particles are set according to random distribution. The historical optimal value of each particle Set to the currently initialized 20 particles; set the group's historical optimal Set to The particle corresponding to the minimum objective function value in ;
[0121] The optical model of Shack-Hardemann wavefront sensor is constructed based on paraxial geometric optics, and the center position of the microlens is Calculate the incident wavefront Φ m Estimated centroid position of the light spot after imaging by the microlens array
[0122]
[0123] Construct a global objective function based on Hausdorff distance and calculate M sets of estimated spot feature point sets {E m} m=1,2,...,M The Hausdorff distance between the feature point set G of the measured light spot is calculated as follows:
[0124] Step b1: Establish a binary tree of the measurement spot feature point set G, where each node has 0, 1, or 2 branches; take the horizontal coordinate x in G equal to {x n} n=1,2,...,361 The median coordinates of the spot centroid As the first-level node, As the boundary, all points are divided into two groups; when establishing the second-level binary tree node, the ordinate y in G is equal to The median coordinates of the spot centroid As the left node of the second level, set the ordinate y in G equal to The median coordinates of the spot centroid as the right node of the second level, and and As the boundary, the two groups of points are divided into two groups, becoming four groups of points; repeat the above process until all points are added as nodes of the binary tree, and the binary tree point set G is obtained. s ;
[0125] Step b2: Take out the estimated light spot feature point set E1 = {e n} n=1,2,...,361 The first point e1 in the binary tree is calculated from the first-level nodes of the binary tree. The Euclidean distance between each node and point e1 is calculated, and the point with the shortest Euclidean distance is found, which is recorded as point g1.
[0126] Step b3: Repeat step 2 until all other points in point set E1 are in point set G. s Search for the nearest points, which are g2, g3, ..., g 361 ;
[0127] Step b4: Calculate the point set E m Each point in the point set G s The Euclidean distances between the nearest points are d(e1, g1), d(e2, g2), ..., d(e 361 , g 361 );
[0128] Step b5: Calculate d(e1, g1), d(e2, g2), ..., d(e 361 , g 361 ), thereby obtaining 20 groups of Hausdorff distances as the objective function value d1;
[0129] Step b6: Repeat steps b2-b5 until E2, E3, ..., E 20 The global spot matching objective function values d2, d3, ..., d 20 ;
[0130] Re-update 20 sets of Zernike polynomial coefficients, including position and velocity, through the particle swarm algorithm:
[0131]
[0132] The inertia factor w is set to 0.5, the individual learning factors c1 and c2 are both set to 1.49, and r1 and r2 are both set to random numbers in the range of [0,1]. The corresponding With d m ,like Then Set to the updated particle; set the group's historical optimal Set to The particle corresponding to the minimum objective function value in ;
[0133] Randomly set r1 and r2, repeat the above steps 70 times, The corresponding position is set to the optimal Zernike polynomial coefficient C k op ; Through the optimal Zernike polynomial coefficients C k op Get the best incident wavefront Φ op ; The minimum objective function value curve under each iterative calculation is as follows Figure 4c As shown;
[0134] The optimal incident wavefront Φ op The estimated spot image is calculated by inputting the Shack-Hardemann wavefront sensor optical model, thereby calculating the estimated spot position corresponding to the optimal incident wavefront; the focus spot position corresponding to each microlens is accurately matched from the measured spot image through nearest neighbor matching and the estimated spot position, such as Figure 4d As shown;
[0135] According to the position of the characteristic point of the light spot corresponding to each micromirror and the position of the characteristic point of the reference light spot, the slope value of the sub-wavefront of the measured wavefront corresponding to each micromirror is obtained, and the distribution of the measured wavefront is reconstructed according to the wavefront reconstruction algorithm; the relative error distribution between the reconstructed wavefront and the measured wavefront is as follows: Figure 4e shown.
[0136] Example 2
[0137] This embodiment is substantially the same as the first embodiment, except that the present embodiment randomly generates 100 measured wavefronts with different distributions, and repeats the process of the first embodiment in sequence until 100 wavefronts are reconstructed by a large dynamic range Shack-Hardemann wavefront detection method provided by the present invention; the relative error distribution between the 100 measured wavefronts and the corresponding reconstructed wavefronts is calculated, and the average value of the relative errors of all points is calculated to obtain the average relative error; the 100 average relative errors are all less than 0.04%, such as Figure 5 shown.
[0138] Example 3
[0139] This embodiment is substantially the same as the embodiment 1, except that the wavefront characterization parameter in this embodiment is any Zernike polynomial coefficient from the 3rd to the 9th Zernike polynomial; the Zernike polynomial coefficient is incremented from 0 to 10. -4 The Zernike polynomial coefficients are gradually increased in increments, and the wavefront is reconstructed by a large dynamic range Shack-Hardemann wavefront detection method provided by the present invention until the average relative error of the reconstructed wavefront is greater than 0.1%, at which point the wavefront reconstruction fails; the reconstructed wavefront corresponding to the Zernike polynomial coefficients before the wavefront reconstruction fails is recorded as the maximum measurable wavefront;
[0140] like Figure 6Shown are the measured spot images of the maximum measurable wavefront under the characterization of the 3rd (astigmatism), 4th (defocus), 6th (trefoil), and 8th (coma) Zernike terms;
[0141] like Figure 7 The figure shows the comparison between the peak-to-valley values of the maximum measurable wavefront under the characterization of the 3rd to 9th Zernike terms and the peak-to-valley values of the maximum measurable wavefront of the traditional Shack-Hardemann wavefront sensor;
[0142] Example 3
[0143] This embodiment is substantially the same as the first embodiment, except that the number of light spots in the measured light spot image in this embodiment is missing, and the large dynamic range Shack-Hardemann wavefront detection method provided by the present invention can still achieve light spot matching when the light spots are missing;
[0144] like Figure 8 Shown is a spot matching result diagram when there are different missing conditions in the measured spot image (including no missing spot, 13% missing spot in the edge area, 17% missing spot in the center area, and random missing 10%, 30%, and 50% spots).
[0145] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A Shack-Hardemann wavefront detection method based on global spot matching, characterized in that: The following steps are involved: Step 1: calibrate the Shack-Hardemann wavefront sensor to obtain the position of the characteristic points of the reference light spot; image the measured wavefront into a light spot array with a specific distribution through the Shack-Hardemann wavefront sensor to obtain a measurement light spot image; Step 2: Segment the measured spot image into N sub-regions containing a single spot using a threshold segmentation algorithm; extract the feature point coordinates (x n ,y n ), the coordinates of the feature points of all the spots are combined into the measurement spot feature point set G = {(x n ,y n )} n=1,2,...,N ; Step 3: Construct an optical model of the Shack-Hardemann wavefront sensor to simulate the light spot image formed by the incident wavefront being imaged by the Shack-Hardemann wavefront sensor; Step 4: Randomly generate M groups of wavefront characterization parameters, and generate M groups of incident wavefronts {Φ m } m=1,2,...,M ; Step 5: Input each incident wavefront into the constructed Shack-Hardemann wavefront sensor optical model to obtain M sets of estimated light spot feature point sets {E m } m=1,2,...,M ; Step 6: Construct the global spot matching objective function and calculate the estimated spot feature point set {E m } m=1,2,...,M and the objective function values between the measured light spot feature point set G, respectively, {d m } m=1,2,...,M ; Step 7: By using the objective function value {d m } m=1,2,...,M Input the iterative matching algorithm to update M groups of wavefront characterization parameters and regenerate M groups of incident wavefronts {Φ m } m=1,2,...,M ; Step 8: Repeat steps 4 to 7 until at least one of the M objective function values is less than the set objective function threshold, or the number of repetitions of steps 4 to 7 reaches the set repetition threshold. End the iteration and take the incident wavefront corresponding to the minimum target difference value as the optimal incident wavefront Φ op ; Step 9: Set the optimal incident wavefront Φ op Input the Shack-Hardemann wavefront sensor optical model to calculate the estimated spot image, thereby calculating the optimal incident wavefront Φ op The corresponding estimated spot position; matching the focused spot position corresponding to each microlens in the Shack-Hardemann wavefront sensor from the measured spot image by nearest neighbor matching and the estimated spot position; Step 10: According to the position of the light spot feature point corresponding to each micromirror and the position of the reference light spot feature point, the slope value of the measured wavefront sub-waveface corresponding to each micromirror is obtained, and the distribution of the measured wavefront is reconstructed according to the wavefront reconstruction algorithm.
2. The Shack-Hardemann wavefront detection method based on global spot matching according to claim 1, characterized in that: The processing process of the threshold segmentation algorithm includes: Step 201: setting a grayscale threshold, binarizing the spot image according to the grayscale threshold to convert it into a binary image, where the area greater than the grayscale threshold becomes 1, and the area less than the grayscale threshold becomes 0; Step 202: performing an image dilation operation and an image erosion operation on the binary image in sequence to eliminate discrete noise points in the binary image; Step 203: searching for a connected domain in the binary image, and taking out N regions with the largest areas in the connected domain as N light spot regions; Step 204: extract the corresponding area in the light spot image according to the position of the light spot area, and obtain N sub-areas containing a single light spot.
3. The Shack-Hardemann wavefront detection method based on global spot matching according to claim 1, characterized in that: The feature point is any one of the centroid, center and brightest point of the light spot.
4. The Shack-Hardemann wavefront detection method based on global spot matching according to claim 1, characterized in that: The Shack-Hardemann wavefront sensor optical model is any one of a paraxial geometric optical model, an angular spectrum diffraction physical optical model, a Fresnel diffraction physical optical model and a Fraunhofer diffraction physical optical model.
5. The Shack-Hardemann wavefront detection method based on global spot matching according to claim 1, characterized in that: The wavefront characterization parameter is any one of square domain Zernike polynomials, ring domain Zernike polynomials and Legendre polynomials.
6. The Shack-Hardemann wavefront detection method based on global spot matching according to claim 1, characterized in that: The processing process of the global spot matching objective function includes: Step 601: Sort the measurement spot feature point set G to obtain point set G s ; Step 602: Take out the estimated light spot feature point set E1 = {e n } n=1,2,...,N A point e1 in the search point set G s The point g1 closest to point e1; Step 603: Repeat step 602 until all other points in point set E1 are in point set G. s Search for the nearest points, which are g2, g3, ..., g N ; Step 604: Calculate point set E m Each point in the point set G s The distances between the closest points are d(e1, g1), d(e2, g2), ..., d(e N , g N ); Step 605: Take d(e1, g1), d(e2, g2), ..., d(e N , g N ) is subtracted from the preset penalty factor to serve as the objective function value d1; Step 606: Repeat steps 602-605 until E2, E3, ..., E M The objective function values d2, d3, ..., d M .
7. The Shack-Hardemann wavefront detection method based on global spot matching according to claim 6, characterized in that: The penalty factor is one or more superposition values of the number of repeated matching of light spots, the continuity of slopes of adjacent regions, and the degree of bad values of wavefront characterization parameters.
8. The Shack-Hardemann wavefront detection method based on global spot matching according to claim 1, characterized in that: The iterative matching algorithm is any one of a particle swarm algorithm, a genetic algorithm, a simulated annealing algorithm, an evolutionary strategy, a gradient descent method, and a convolutional neural network.
9. The Shack-Hardemann wavefront detection method based on global spot matching according to claim 8, characterized in that: When the iterative matching algorithm is a particle swarm algorithm, the processing process is as follows: The particle swarm algorithm regards each set of wavefront characterization parameters as a particle to be searched. Each particle has K numerical parameters to be iteratively searched, and each particle is represented by characteristic parameter position and velocity: In the formula, x m (t) is the position of the wavefront representation of the mth group in the tth iteration, is the Kth wavefront characterization position parameter, v m (t) is the velocity of the mth group of wavefront representation in the tth iteration, is the velocity parameter characterizing the Kth wavefront; Before the iterative calculation of the iterative matching algorithm, the initial position x of the M groups of wavefront characterization parameters is m (0) and speed v m (0) Set to a random value; Calculate the objective function value for each particle The historical optimal value of each particle Set to the currently initialized M particles; set the group's historical optimal Set to The particle corresponding to the minimum objective function value in ; In the iterative calculation of the iterative matching algorithm, each particle is first updated by the following formula, including position and velocity: In the formula, w, c1 and c2 are all hyperparameters of the particle swarm algorithm, representing the inertia factor, individual learning factor and group learning factor respectively, and r1 and r2 are random numbers; Calculate the objective function value of M particles after update like Then Set to the updated particle; The best historical Set to The particle corresponding to the minimum objective function value in the random setting of r1 and r2 is calculated repeatedly until the iteration ends. The position of is the optimal wavefront characterization parameter searched.
10. The Shack-Hardemann wavefront detection method based on global spot matching according to claim 1, characterized in that: The wavefront reconstruction algorithm is any one of an iterative solution method, a matrix vector method and a Zernike pattern wavefront reconstruction method.
Citation Information
Patent Citations
Method for introducing wavefront distortion on basis of micro deformation mirror
CN105866939A
Machine learning fast aberration measuring system and method based on wave-front sensor
CN110346340A