Shack-Hartmann Wavefront Sensing Method and System Based on Cross-Domain Correspondence Model
The mapping relationship between the Shaker-Hartmann spot pattern and the real wavefront phase is established through the cross-domain corresponding model, which solves the problem of the limitation of spatial resolution and dynamic range of traditional Shaker-Hartmann wavefront sensors, and realizes high-precision wavefront reconstruction and correction in complex biological tissues and low signal environments.
Patent Information
- Application Number
- CN202510588691.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-05-08
AI Technical Summary
Traditional Shaker-Hartman wavefront sensors have difficulty improving spatial resolution and dynamic range without increasing hardware, especially in complex biological tissue and low signal-to-noise ratio problems. The wavefront reconstruction accuracy is insufficient in complex biological tissue and low signal environments.
Using a cross-domain correspondence model, by constructing a cross-domain feature alignment subnet and a phase reconstruction subnet, a nonlinear mapping relationship between the Shaker-Hartmann spot map and the real wavefront phase is established, and combined with the physical consistency loss function, the direct mapping of the spot domain and the phase domain is realized, and spatial resolution and dynamic range are improved.
Without adding hardware, the spatial resolution of the Shaker-Hartmann sensor is increased from 16×16 to 28×28, and the dynamic range is increased from 0.99λ to 2.25λ. The root mean square error of complex aberration reconstruction is reduced by 90%, improving the wavefront measurement capability and reconstruction accuracy, and is suitable for complex biological tissues and low signal environments.
Smart Images

Figure CN120102514B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of adaptive optics technology, and in particular, to a wavefront sensing and correction system and method. Background Art
[0002] The traditional Shack-Hartmann Wavefront Sensor (SHWS) divides the incident distorted light beam through a microlens array and forms a spot array on the detector plane. By combining centroid localization and wavefront reconstruction algorithms, wavefront information can be obtained. Due to its simple structure, this method has been widely used in fields such as astronomical observation, biomedical imaging, eye optics, and laser communication.
[0003] However, the Shack-Hartmann wavefront sensor faces the following inherent challenges:
[0004] 1. Limitation of the Spatial-Bandwidth Product (SBP): The spatial-bandwidth product defines the total amount of wavefront information that can be detected by a wavefront sensing system per unit time, which is manifested as a trade-off between spatial resolution and dynamic range. The more microlens arrays there are and the smaller the unit aperture size, the higher the spatial sampling resolution can be obtained. However, the range of focal spot offset that can be accommodated by a single microlens also becomes correspondingly narrower, thus limiting the dynamic range of the system. Conversely, if the microlens aperture is increased to expand the dynamic range, the resolution will be sacrificed, making it difficult to effectively capture high-order aberration information.
[0005] 2. Performance degradation when facing biological tissue aberrations: In microscopic imaging, due to the uneven refractive index and strong scattering effect of biological tissues, the wavefront distortion caused often contains a large number of high-frequency components and random perturbations, resulting in severe distortion or even splitting of the spots focused by the microlens array, causing the wavefront reconstruction algorithm relying on centroid localization to fail.
[0006] 3. Performance degradation due to limited photon numbers: In deep biological imaging, the number of photons in fluorescence or laser signals is limited, resulting in a decrease in the signal-to-noise ratio of the system, further exacerbating centroid localization noise and reconstruction errors, and further limiting complex wavefront measurements.
[0007] To overcome the above deficiencies, existing methods have made improvements to the spatial resolution and dynamic range of the Shack-Hartmann wavefront sensor from both hardware and algorithm aspects. Hardware-based modifications, such as using metasurface microlenses, introducing electrically tunable liquid crystal modules, or adopting special dual-structure microlens arrays and other strategies, have improved the system spatial resolution, but generally face problems such as system complexity, sacrifice of integrability, and time resolution. Algorithm-based solutions, such as adaptive point matching algorithms and neural wavefront normal perception algorithms, have expanded the dynamic range, but still rely on the morphology of the focal spots.
[0008] In recent years, deep learning methods have been used to directly map from Shack - Hartmann spot diagrams to phase diagrams, effectively circumventing the dependence on centroid localization, which can improve the aberration reconstruction accuracy to a certain extent or achieve complex aberration reconstruction. However, it still faces the following limitations: First, the output phase form is limited by the Zernike modal representation and cannot represent the complex forms of high - frequency aberrations; second, it still relies on the sufficient sampling of the microlens array and lacks an effective mapping and recognition mechanism for the missing, overlapping, and deformed focal spots under insufficient sampling conditions; third, most are only trained on ideal simulated spot diagram datasets and have low generalization ability on real optical systems and biological tissues.
[0009] In summary, the existing methods generally adopt a strategy of "sacrificing one end to preserve the other" when improving the sensing ability of Shack - Hartmann sensors, and have not effectively expanded the available range of the spatial bandwidth product of Shack - Hartmann sensors to achieve precise correction of aberrations in complex biological tissues. Summary of the Invention
[0010] The purpose of the present invention is to provide a Shack - Hartmann wavefront sensing method and system based on a cross - domain correspondence model. The method of the present invention can, without adding additional hardware compared with traditional Shack - Hartmann wavefront sensors, break through the bottleneck that it is difficult to have both high spatial resolution and large dynamic range in traditional Shack - Hartmann sensors through a cross - domain correspondence model, expand the spatial bandwidth product, synergistically improve the spatial resolution and dynamic range, and achieve high - precision and stable reconstruction and adaptive correction of aberrations in the face of non - ideal scenarios such as complex aberrations, biological tissue - induced aberrations, and weak signals.
[0011] The technical solution adopted by the present invention is as follows:
[0012] 1. A Shack - Hartmann wavefront sensing method based on a cross - domain correspondence model
[0013] The Shack - Hartmann wavefront sensing method includes the following steps:
[0014] S1) Construct a true wavefront phase under different wavefront distortion conditions, and obtain the Shack - Hartmann spot diagram corresponding to the true wavefront phase through a Shack - Hartmann wavefront sensing optical system. Construct each Shack - Hartmann spot diagram and its corresponding true wavefront phase into a sample pair, and all sample pairs form a sample dataset
[0015] The specific steps of step S1 are as follows: First, construct a variety of different wavefront aberration conditions through numerical simulation or experimental methods; then use the phase modulator in the Shack-Hartmann wavefront sensing and correction optical system to load various wavefront aberration conditions, and record the original Shack-Hartmann spot patterns under different wavefront aberration conditions through the detector in the Shack-Hartmann wavefront sensing and correction optical system. After randomly adding noise to each original Shack-Hartmann spot pattern within a preset signal-to-noise ratio range, obtain the Shack-Hartmann spot patterns under different wavefront aberration conditions (i.e., the Shack-Hartmann spot patterns after adding noise), and use the wavefront aberration conditions corresponding to the Shack-Hartmann spot patterns as the true wavefront phase.
[0016] In step S1, the process of constructing a variety of different wavefront aberration conditions is specifically as follows: within the amplitude range corresponding to the Zernike polynomial aberration, generate multiple Zernike polynomial aberrations with different amplitudes; within the amplitude range and spatial frequency range corresponding to the random scattering aberration, generate a variety of random scattering aberrations with different amplitude and spatial frequency combinations; then, for a variety of different combinations of Zernike polynomial aberrations and random scattering aberrations, superimpose them according to different perturbation intensities and superposition ratios to obtain composite aberrations with different characteristics. All Zernike polynomial aberrations with different amplitudes, random scattering aberrations with different amplitude and spatial frequency combinations, and composite aberrations with different characteristics together constitute all wavefront aberration conditions.
[0017] S2) Construct a cross-domain correspondence model and its loss function; the loss function of the cross-domain correspondence model includes a wavefront reconstruction loss, a physical consistency loss, and a regularization loss. In step S2, the cross-domain correspondence model refers to a deep learning model that establishes a non-linear correspondence relationship between the spot intensity image collected by the Shack-Hartmann sensor (source domain, specifically the image intensity domain here) and its corresponding true wavefront phase map (target domain, specifically the phase domain here). Specifically, the cross-domain correspondence model includes a cross-domain feature alignment sub-network and a phase reconstruction sub-network. The cross-domain feature alignment sub-network is used to map the features of the Shack-Hartmann spot pattern under any wavefront aberration condition and the corresponding true wavefront phase to a shared feature space and align them, and then output the aligned features. The phase reconstruction sub-network is used to generate a reconstructed wavefront phase based on the aligned features and output it.
[0018] Optionally, the cross-domain feature alignment sub-network includes two parallel feature extractors, namely the first feature extractor and the second feature extractor. The inputs of the first feature extractor and the second feature extractor are the Shack-Hartmann spot pattern and the corresponding true wavefront phase respectively. The outputs of the first feature extractor and the second feature extractor are the extracted features corresponding to the Shack-Hartmann spot pattern and the extracted features corresponding to the true wavefront phase respectively. After the outputs of the two feature extractors are analyzed by the correlation matrix, the aligned features in the shared feature space are obtained. The phase reconstruction sub-network adopts a U-Net encoder, a Generative Adversarial Network (GAN), an Encoder-Decoder structure, or a Variational Autoencoder (VAE). In the phase reconstruction sub-network, the normalization operations are all performed using Spatially-Adaptive Denormalization (SPADE), Adaptive Instance Normalization (AdaIN), Feature-wise Linear Modulation (FiLM), or other normalization modules that can preserve semantic information during normalization.
[0019] Preferably, in the cross-domain feature alignment sub-network, each feature extractor includes a plurality of cascaded convolutional downsampling modules. Each convolutional downsampling module is mainly composed of a convolutional layer, a normalization layer, an activation function layer, a residual structure, a squeeze-and-excitation module, and a CBAM attention mechanism module in series. The residual structure contains a main path and a bypass connection. The main path includes two consecutive 3×3 convolutional layers, a BatchNormalization layer, and a LeakyReLU activation function. The bypass connection includes a 1×1 convolutional layer and a BatchNormalization layer in series. In each convolutional downsampling module, the output of the activation function layer is connected to the inputs of the main path and the bypass connection respectively. The outputs of the main path and the bypass connection are added and then input to the squeeze-and-excitation module. The input of the first convolutional downsampling module of the first feature extractor is the Shack-Hartmann spot pattern, and the output of the last convolutional downsampling module is the extracted feature corresponding to the Shack-Hartmann spot pattern. The input of the second feature extractor is the true wavefront phase, and the output of the last convolutional downsampling module is the extracted feature corresponding to the true wavefront phase. After the two extracted features are processed by the correlation matrix, the aligned features are obtained.
[0020] The phase reconstruction sub-network adopts a generative adversarial network, including a generator and a discriminator. The generator includes multiple upsampling modules connected in series, and each upsampling module is mainly composed of an upsampling layer, a convolutional layer, and a spatially adaptive inverse normalization module connected in series in sequence; the discriminator includes multiple residual structures connected in series in sequence, a pooling layer, and a fully connected layer. Each residual structure contains a main path and a bypass connection. The main path contains two 3×3 convolutional layers, a BatchNormalization layer, and a LeakyReLU activation function connected in sequence. The bypass connection contains a 1×1 convolutional layer and a BatchNormalization layer connected in sequence. The main path and the bypass connection receive the output before the residual structure, and the two obtained outputs are added and then sent to the next structure.
[0021] Among them, the main path and the bypass connection receive the output before the residual structure, and the two obtained outputs are added and then sent to the next structure means that: the main path and the bypass connection in the first residual structure both receive the input of the discriminator, that is, the reconstructed wavefront phase output by the generator. The main path and the bypass connection in the remaining residual structures both receive the output of the previous residual structure. The outputs of the main path and the bypass connection of the last residual structure are added and then sent to the pooling layer in the discriminator, and the outputs of the main path and the bypass connection of the remaining residual structures are added and then sent to the next residual structure.
[0022] During the training process, the aligned features are respectively input into the spatially adaptive inverse normalization modules of each upsampling module. The input of the first upsampling module of the generator is a randomly initialized vector, the output of the last upsampling module is the reconstructed wavefront phase, the input of the first residual structure of the discriminator is the reconstructed wavefront phase output by the generator, the output of the fully connected layer is the authenticity discrimination score for the reconstructed wavefront phase output by the generator, and the last fully connected layer of the discriminator outputs D(Φ) and D(Φ’).
[0023] In the above preferred implementation, the loss function of the cross-domain correspondence model further includes a generative adversarial loss. The loss function of the cross-domain correspondence model and the generative adversarial loss are respectively set according to the following formulas:
[0024] L = λ1L phase + λ2L phys + λ3L adv + λ4L TV
[0025] L adv = E[log(D(Φ))] + E[log(1 - D(Φ’))]
[0026] In the formula, L represents the total loss, λ1, λ2, λ3, and λ4 respectively represent the wavefront reconstruction loss weight, the physical consistency loss weight, the generative adversarial loss weight, and the regularization loss weight, Lphase 、L phys 、L adv 、L TV represent the wavefront reconstruction loss, physical consistency loss, generative adversarial loss, and regularization loss respectively. Φ represents the true wavefront phase corresponding to the Shack - Hartmann spot pattern, Φ’ represents the reconstructed wavefront phase corresponding to the Shack - Hartmann spot pattern, E[ ] represents the expected value of the distribution, and D( ) represents the output of the discriminator of the generative adversarial network adopted in the phase reconstruction sub - network.
[0027] Specifically, the wavefront reconstruction loss, physical consistency loss, and regularization loss are set according to the following formulas respectively:
[0028] L phase =‖Φ’ - Φ‖1 or ‖Φ’ - Φ‖2
[0029] L phys =‖I’ SH (Φ’) - I SH (Φ)‖2
[0030] L TV =‖▽ 2 Φ’‖1
[0031] In the formula, L phase 、L phys 、L TV represent the wavefront reconstruction loss, physical consistency loss, and regularization loss respectively. Φ represents the true wavefront phase corresponding to the Shack - Hartmann spot pattern, Φ’ represents the reconstructed wavefront phase corresponding to the Shack - Hartmann spot pattern, || ||1 represents the L1 norm, || ||2 represents the L2 norm, I SH (Φ) represents the simulated spot pattern generated according to the true wavefront phase, I’ SH (Φ’) represents the simulated spot pattern generated according to the reconstructed wavefront phase, and ▽ 2 is the Laplace operator.
[0032] S3) Use the sample data set obtained in step S1, combine with the loss function constructed in step S2, and train the cross - domain correspondence model obtained in step S2 to obtain a trained cross - domain correspondence model; [[ID= 51]]
[0033] S4) Obtain the Shack - Hartmann spot pattern of the biological tissue to be predicted, combine with the trained cross - domain correspondence model obtained in step S3 to achieve adaptive correction of the induced distortion wavefront of the biological tissue to be predicted. When the residual wavefront of the system meets the requirements, obtain the predicted wavefront phase of the biological tissue to be predicted.
[0034] The biological tissue to be predicted includes transparent tissue sections and / or incompletely transparent tissue sections.
[0035] The specific steps of step S4 are as follows:
[0036] S41) Use a Shack - Hartmann wavefront sensing and correction optical system to collect the Shack - Hartmann spot pattern of the biological tissue to be predicted;
[0037] S42) Input the Shack - Hartmann spot pattern into the first feature extractor of the trained cross - domain correspondence model. The first feature extractor performs feature extraction processing on the Shack - Hartmann spot pattern and inputs the extracted features into the phase reconstruction sub - network. The phase reconstruction sub - network generates and outputs the reconstructed wavefront phase according to the extracted features;
[0038] In the above - mentioned preferred implementation, in step S42, the extracted features corresponding to the Shack - Hartmann spot pattern of the biological tissue to be predicted are input into the spatial adaptive inverse normalization modules of each up - sampling module of the generator of the phase reconstruction sub - network. The output of the last up - sampling module of the generator is the reconstructed wavefront phase;
[0039] S43) Load the conjugate phase of the reconstructed wavefront phase onto the phase modulator of the Shack - Hartmann wavefront sensing and correction optical system, re - collect the current Shack - Hartmann spot pattern, and obtain the peak intensity of the point spread function of the Shack - Hartmann wavefront sensing and correction optical system. Compare the peak intensity of the point spread function at the system focus point with the preset peak intensity threshold. If the peak intensity reaches or exceeds the preset threshold, it is determined that the residual wavefront of the system meets the requirements, and the reconstructed wavefront phase is used as the predicted wavefront phase of the biological tissue to be predicted, and the adaptive correction ends; if the peak intensity is less than the preset peak intensity threshold, it is determined that the residual wavefront of the system does not meet the requirements, and the reconstructed wavefront phase is used as the previous reconstructed wavefront phase, and enter step S44;
[0040] S44) Process the current Shack - Hartmann spot pattern collected in step S43 according to step S42 to obtain the current reconstructed wavefront phase, add the current reconstructed wavefront phase and the previous reconstructed wavefront phase to obtain a new reconstructed wavefront phase, and return to step S43.
[0041] II. A Shack - Hartmann wavefront sensing and correction optical system applied to the above - mentioned Shack - Hartmann wavefront sensing method
[0042] The Shack - Hartmann wavefront sensing and correction optical system includes:
[0043] A laser for emitting a laser beam;
[0044] An incident unit. After the laser beam passes through the incident unit, a laser beam to be modulated is generated;
[0045] The wavefront modulation unit includes a phase modulator and a first 4f (Four Focal Length) lens group. After the laser beam to be modulated passes through the phase modulator and the first 4f lens group in sequence, a wavefront-modulated laser beam is generated.
[0046] The imaging unit includes a first objective lens, a sample stage, and a second objective lens. The wavefront-modulated laser beam is focused by the first objective lens onto the sample plane on the sample stage to generate a sample outgoing beam, which is collected by the second objective lens. The rear pupil plane of the first objective lens is conjugated to the phase modulator through the first 4f lens group to ensure that the phase modulation applied by the phase modulator acts accurately on the sample wavefront.
[0047] The polarization beam splitter splits the sample outgoing beam into a wavefront measurement beam and a monitoring beam after spectroscopic processing.
[0048] The first detector is used to receive and monitor the system point spread function based on the monitoring beam.
[0049] The Shack-Hartmann wavefront sensing unit includes a fifth lens, a sixth lens, a microlens array, and a second detector. The fifth lens is arranged on the beam transmission path between the polarization beam splitter and the second objective lens. The fifth lens and the sixth lens form a relay 4f lens group for projecting the wavefront measurement beam onto the microlens array. The sample-introduced aberration (i.e., the sample-induced distorted wavefront) is equivalent to the rear pupil plane of the second objective lens and is conjugated to the pupil plane of the microlens array through the fifth lens and the sixth lens. The wavefront measurement beam forms a focused spot array image on the imaging surface of the second detector after passing through the microlens array, serving as the Shack-Hartmann spot pattern.
[0050] The calculation unit stores a trained cross-domain correspondence model.
[0051] Specifically, the incident unit includes a half-wave plate, a first lens, a first field stop, a second lens, and a first mirror arranged in sequence along the optical path of the laser beam. The laser beam first passes through the half-wave plate to adjust its own beam polarization direction, then undergoes beam expansion through the first lens, and then the edge diffraction is removed through the first field stop. Subsequently, it is collimated through the second lens to generate the laser beam to be modulated.
[0052] Specifically, the first 4f lens group includes a third lens, a second field stop, and a fourth lens arranged in sequence along the optical path of the laser beam to be modulated. The third lens and the fourth lens form a Fourier transform optical system, and the second field stop is placed at the Fourier plane between the third lens and the fourth lens to remove the unmodulated diffraction orders.
[0053] Optionally, the phase modulator uses a spatial light modulator or a deformable mirror.
[0054] Further, the Shack-Hartmann wavefront sensing unit further includes a third field stop and a fourth field stop sequentially arranged along the optical path of the wavefront measurement beam. The wavefront measurement beam generated by the polarization beam splitter first passes through the third field stop to filter out the high-order diffraction components entering the wavefront sensing module, and then passes through the fourth field stop to remove background noise before entering the sixth lens.
[0055] Further, the optical system further includes a first mirror, a second mirror, and a third mirror; the first mirror is disposed on the beam transmission path between the incident unit and the phase modulator for guiding the laser beam to be modulated into the phase modulator; the second mirror is disposed on the beam transmission path between the first 4f lens group and the first objective lens for guiding the wavefront-modulated laser beam into the first objective lens; the third mirror is disposed on the beam transmission path between the second objective lens and the fifth lens for guiding the sample outgoing beam into the polarization beam splitter.
[0056] In summary, the present invention proposes a method for Shack-Hartmann wavefront sensing using a cross-domain correspondence model. By mapping the spot pattern and phase distribution collected by the sensor to a shared feature domain and imposing physical consistency constraints, the spatial resolution and dynamic range of the traditional Shack-Hartmann sensor are synergistically improved, breaking through its inherent spatial bandwidth product constraint, and enabling high-precision wavefront measurement and correction in complex aberration, undersampling, and low signal-to-noise ratio environments.
[0057] The beneficial effects of the present invention are as follows:
[0058] 1. The present invention proposes a wavefront sensing method based on a cross-domain correspondence model. By establishing a direct mapping relationship between the spot domain and the phase domain, the available range of the spatial bandwidth product of the Shack-Hartmann sensor is increased by nearly 4 times, enabling the spatial resolution of the Shack-Hartmann sensor to be improved from 16×16 to 28×28, and the dynamic range (the measurable peak-to-valley value of the aberration within the sub-aperture is increased from 0.99λ to 2.25λ). It can reconstruct high-frequency complex aberrations for which the modal method based on centroid reconstruction fails, and for complex aberrations under other conditions, the average reconstruction root mean square error is reduced by 90%, improving the wavefront measurement ability and reconstruction accuracy.
[0059] 2. The present invention proposes a deep learning model integrating physical priors, combined with physical consistency losses based on angular spectrum transmission or diffraction propagation model constraints, to improve the physical consistency and generalization ability of wavefront reconstruction. Compared with existing deep learning methods, it improves the applicability of wavefront measurement in complex aberration environments and biological sample aberration scenarios, and can achieve aberration correction of real biological tissue samples.
[0060] 3. The present invention proposes a wavefront sensing method based on a cross - domain correspondence model, which decouples the wavefront reconstruction process from the physical sampling density of the microlens array through the cross - domain correspondence model. Without making any hardware modifications to the Shack - Hartmann sensor, the spatial resolution and dynamic range of the Shack - Hartmann sensor are improved through the cross - domain correspondence model, and it is easy to integrate. Description of the Drawings
[0061] Figure 1 is a schematic diagram of the Shack - Hartmann wavefront sensing and correction system in the present invention.
[0062] Figure 2 is a schematic flowchart of the Shack - Hartmann wavefront sensing method and system based on the cross - domain correspondence model in the present invention.
[0063] Figure 3 is a schematic diagram of different types and amplitudes of aberrations and their corresponding Shack - Hartmann spot diagrams in the present invention. Among them, (a1) is a combination of low - order and high - order aberrations characterized by Zernike polynomials, and (a2) is the spot diagram corresponding to the aberration shown in (a1); (b1) is a schematic diagram of high - frequency random aberration Figure 1 , (b2) is the spot diagram corresponding to the aberration shown in (b1); (c1) is a schematic diagram of high - frequency random aberration Figure 2 , (c2) is the spot diagram corresponding to the aberration shown in (c1); (d1) is a schematic diagram of the superimposed aberration of the aberration characterized by Zernike polynomials and high - frequency random aberration, and (d2) is the spot diagram corresponding to the aberration shown in (d1).
[0064] Figure 4 is a schematic diagram of the structure of the cross - domain correspondence model adopted in the present invention.
[0065] Figure 5 is a schematic diagram of the result of loading the validation set aberration for the correction system in the present invention. Among them, (a) is the wavefront reconstruction effect (the reconstructed wavefront phase output by the cross - domain correspondence model after correction), (b) is the Shack - Hartmann spot diagram corresponding to the complex aberration scenario, (c) is the Shack - Hartmann spot diagram after correction, (d) is the system point spread function corresponding to the complex aberration scenario, and (e) is the system point spread function after correction.
[0066] Figure 6It is a schematic diagram for comparing the results of using the present invention and the centroid-based modal reconstruction method to correct the aberration of the system loading verification set. Among them, (a1) is the complex aberration to be corrected, (a2) is the wavefront reconstruction effect of the present invention, and (a3) is the wavefront reconstruction effect of the centroid-based modal reconstruction method; (b1) is the system point spread function corresponding to the complex aberration to be corrected, (b2) is the system point spread function corrected by the method of the present invention, and (b3) is the system point spread function corrected by the centroid-based modal reconstruction method; (c1) is the Shack-Hartmann spot pattern corresponding to the complex aberration to be corrected, (c2) is the Shack-Hartmann spot pattern corrected by the method of the present invention, and (c3) is the Shack-Hartmann spot pattern corrected by the centroid-based modal reconstruction method.
[0067] Figure 7 It is a schematic diagram of the sensing result of the present invention for obtaining a 300-μm-thick mouse brain slice. Among them, (a) is the system point spread function corresponding to the aberration of the mouse brain slice sample before correction, and (b) is the system point spread function corresponding to the aberration of the mouse brain slice sample after correction. Detailed implementation manners
[0068] The optical system and wavefront correction method of the present invention will be exemplarily described below in conjunction with the accompanying drawings and specific experimental devices.
[0069] The present invention proposes a Shack-Hartmann computational adaptive optical wavefront sensing method and system based on a cross-domain correspondence model. By mapping the Shack-Hartmann spot pattern belonging to the source domain and the corresponding phase distribution belonging to the target domain to a shared feature domain, and combining optical physical constraints with end-to-end training of a deep learning network, the spatial resolution and dynamic range of the Shack-Hartmann sensor are improved, realizing high-precision complex aberration measurement without hardware modification of the Shack-Hartmann sensor. Specifically: The present invention uses a cross-domain correspondence model to establish a high-dimensional mapping between the spot distortion morphology within a sub-aperture and the global phase distribution, and through combining physical consistency constraint loss, the complex aberration is accurately restored through a phase reconstruction sub-network, decoupling the wavefront reconstruction process from the physical sampling density of the microlens array, effectively expanding the spatial resolution and dynamic range.
[0070] First, the present invention constructs a cross-domain correspondence model to learn the non-linear mapping relationship between the Shack-Hartmann spot pattern and the corresponding true wavefront phase during the training process. Through the joint learning of the cross-domain feature alignment sub-network and the phase reconstruction sub-network, this model reconstructs the high-frequency wavefront details that cannot be directly sampled by the microlens array in the shared feature space. Thus, under the condition that the aperture sampling rate of the microlens array is fixed, the reconstruction of the high-frequency aberration change within the sub-aperture is realized from the undersampled Shack-Hartmann focal spot pattern, equivalently improving the spatial resolution of the Shack-Hartmann wavefront sensor.
[0071] Meanwhile, in the training process of the present invention, a physical consistency loss term based on the angular spectrum propagation model is introduced, enabling the model to learn the physical consistency between the reconstructed wavefront and the spot pattern during training. This loss function strongly constrains the physical feasibility of the model output, allowing the model to effectively model and recover high-amplitude wavefront distortions even when the aberration slope exceeds the maximum tolerance range of centroid localization, enhancing the system's measurement ability for large-range phase tilts and thus improving the dynamic range.
[0072] The above mechanism realizes the collaborative improvement of the spatial resolution and dynamic range of the Shack-Hartmann wavefront sensor, thereby effectively expanding the spatial bandwidth product of the Shack-Hartmann sensor.
[0073] In addition, when constructing the training dataset, the present invention systematically covers Zernike multi-order aberrations, random scattering aberrations with different intensity and spatial frequency combinations, and their composite perturbation forms, and acquires the corresponding Shack-Hartmann spot patterns under different light intensities and signal-to-noise ratios. This dataset has the advantages of comprehensive coverage, realistic simulation conditions, and strong adaptability, enhancing the robustness and recognition ability of the model under non-ideal conditions such as focal spot splitting, undersampling, and signal-to-noise ratio degradation, enabling the cross-domain correspondence model to accurately reconstruct the wavefront phase even under conditions of missing or severely distorted sub-aperture information, and constituting an important basis for the present invention to achieve the expansion of the spatial bandwidth product and the correction of aberrations in real biological tissues.
[0074] The method of the present invention can be widely applied to occasions that require high-precision wavefront measurement or correction, such as adaptive optical microscopy imaging, eye aberration measurement, and atmospheric turbulence aberration correction.
[0075] The first aspect of the present invention discloses a Shack-Hartmann wavefront sensing method based on a cross-domain correspondence model. Figure 2 It is a schematic flow chart of the Shack-Hartmann wavefront sensing method based on the cross-domain correspondence model in the present invention, showing the processes of dataset construction, network training, and phase reconstruction and correction.
[0076] As Figure 2 shown, the method of the present invention includes the following steps:
[0077] S1) Construct the true wavefront phase under different wavefront distortion conditions, and through the Shack-Hartmann wavefront sensing and correction optical system, obtain the Shack-Hartmann spot pattern corresponding to the true wavefront phase. Construct each Shack-Hartmann spot pattern and its corresponding true wavefront phase into a sample pair, and all sample pairs form a sample dataset.
[0078] Step S1 is specifically as follows: First, construct various different wavefront aberration conditions through numerical simulation or experimental methods. Then, use the phase modulator in the Shack-Hartmann wavefront sensing and correction optical system to load various wavefront aberration conditions. Record the original Shack-Hartmann spot patterns under different wavefront aberration conditions through the detector in the Shack-Hartmann wavefront sensing and correction optical system. After randomly adding noise to each original Shack-Hartmann spot pattern within a preset signal-to-noise ratio range, obtain the Shack-Hartmann spot patterns under different wavefront aberration conditions (i.e., the Shack-Hartmann spot patterns after adding noise). Take the wavefront aberration conditions corresponding to the original Shack-Hartmann spot patterns as the true wavefront phase.
[0079] Specifically, as Figure 3 shown, the training data of the method of the present invention cover various aberrations such as low-order, high-order aberrations, random aberrations characterized by Zernike polynomials, or any form of superposition of the first three. The Shack-Hartmann spot patterns corresponding to various aberrations can be obtained under different light intensity and signal-to-noise ratio conditions to enhance the generalization ability of the network in complex environments. Among them, Figure 3 (a1) of is a combination of low-order and high-order aberrations characterized by Zernike polynomials, Figure 3 (a2) of is Figure 3 the spot pattern corresponding to the aberration shown in (a1) of, Figure 3 (b1) of is a schematic diagram of high-frequency random aberration Figure 1 , Figure 3 (b2) of is Figure 3 the spot pattern corresponding to the aberration shown in (b1) of, Figure 3 (c1) of is a schematic diagram of high-frequency random aberration Figure 2 , Figure 3 (c2) of is Figure 3 the spot pattern corresponding to the aberration shown in (c1) of, Figure 3 (d1) of is a schematic diagram of the superposition aberration of the aberration characterized by Zernike polynomials and high-frequency random aberration, Figure 3 (d2) of is Figure 3 the spot pattern corresponding to the aberration shown in (d1) of.
[0080] Preferably, in step S1, the process of constructing a variety of different wavefront aberration conditions is specifically as follows: within the amplitude range corresponding to the Zernike polynomial aberration, generate multiple Zernike polynomial aberrations with different amplitudes; within the amplitude range and spatial frequency range corresponding to the random scattering aberration, generate a variety of random scattering aberrations with different combinations of amplitudes and spatial frequencies; then, for various different combinations of the Zernike polynomial aberration and the random scattering aberration, superimpose them according to different perturbation intensities and superposition ratios to obtain composite aberrations with different characteristics. All the Zernike polynomial aberrations with different amplitudes, the random scattering aberrations with different combinations of amplitudes and spatial frequencies, and the composite aberrations with different characteristics together constitute all the wavefront aberration conditions. The sample data set constructed by the method of the present invention covers a variety of sample types (including typical low-order Zernike aberrations, high-order Zernike combinations, random perturbations of different intensities, and composite aberrations of various ratios). Each type of aberration sample covers different ranges of amplitude and spatial frequency, ensuring that the model can identify the characteristics of wavefronts with different properties. The Shack-Hartmann spot diagrams collected corresponding to the above-mentioned aberrations will also correspondingly include different degrees of distortion, and also cover different signal-to-noise ratio levels. Within the applicable range, since the training data set has fully covered a variety of wavefront aberration types, perturbation intensities, spatial frequencies, and signal-to-noise ratio conditions, for target samples measured under the same system and having similar physical properties, generally no additional adjustment needs to be made to the training samples or the network structure, and high-precision wavefront reconstruction can be directly carried out. However, if the characteristics of the target sample are significantly different from those of the original training set, such as the aberration distribution mode of the sample is significantly different from that of general biological tissues or the transparency is very low, or the Shack-Hartmann optical system used is significantly different from the system designed in the present invention in terms of imaging path, sampling density, or imaging noise model, it may be necessary to re-collect the training samples and specifically optimize the network parameters or perform additional fine-tuning training on the model to adapt to the new application environment.
[0081] The cross-domain deep learning model constructed and trained in the present invention is applicable to the spot image data based on a Shack-Hartmann wavefront sensor, where the laser can transmit through the sample and retain coherence, ensuring that the wavefront information can be effectively detected. It is particularly applicable to sample types with a certain tissue transparency, where the light can transmit through and form recognizable focal spots on the microlens array. The laser can transmit through the sample and retain coherence, ensuring that the wavefront information can be effectively detected.
[0082] The biological tissues to be predicted applicable to the method of the present invention include transparent tissue sections and incompletely transparent tissue sections. Among them, the transparent tissue section refers to a sample with good tissue optical uniformity and high light transmittance, which is manifested as the range of the normalized cross-correlation coefficient between the Shack-Hartmann spot array formed through the sample in the system of the present invention and the spot pattern under the aberration-free condition is (0.8, 1]. Such samples include brain tissue sections, organ tissue sections, and retina sections that have undergone tissue clearing treatment. The incompletely transparent tissue section refers to a tissue sample that can transmit a certain proportion of laser light at the working wavelength to form a Shack-Hartmann spot pattern. However, due to obvious scattering, absorption, or structural non-uniformity inside the tissue, the focused spots in some sub-apertures of the spot pattern are blurred, distorted, split, or have energy attenuation, thus presenting complex high-order aberration characteristics. It is manifested as the range of the normalized cross-correlation coefficient between the Shack-Hartmann spot array formed through the sample in the system of the present invention and the spot pattern under the aberration-free condition is (0.3, 0.8]. Such samples include brain tissue sections, organ tissue sections, and retina sections that have not undergone tissue clearing treatment.
[0083] It should be noted that the method of the present invention is particularly applicable to incompletely transparent tissue sections, and shows better wavefront reconstruction and correction performance than existing methods in such samples with complex high-frequency aberrations, local scattering, and attenuation interference. Transparent tissue sections can be used compatibly with the system of the present invention because such samples usually have a high light transmittance and relatively low requirements for wavefront sensing. Some existing methods can also be applicable to such conditions, and the present invention can still adapt to such samples and achieve high-precision aberration reconstruction.
[0084] For highly scattering or opaque samples (such as dense tissues, bone tissues, etc.), it is manifested as the range of the normalized cross-correlation coefficient between the Shack-Hartmann spot array formed through the sample in the system of the present invention and the spot pattern under the aberration-free condition is (0, 0.3]. Since the Shack-Hartmann spot pattern cannot be accurately formed, the overall wavefront reconstruction accuracy of the system may be limited.
[0085] S2) Construct a cross-domain correspondence model and its loss function. The loss function of the cross-domain correspondence model includes a wavefront reconstruction loss, a physical consistency loss, and a regularization loss.
[0086] Among them, the loss function of the cross-domain correspondence model including a wavefront reconstruction loss, a physical consistency loss, and a regularization loss means that the loss function of the cross-domain correspondence model can be represented by the weighted sum of the wavefront reconstruction loss, the physical consistency loss, and the regularization loss. Among them, the wavefront reconstruction loss, the physical consistency loss, and the regularization loss are set according to the following formulas respectively:
[0087] L phase =‖Φ’ - Φ‖1 or ‖Φ’ - Φ‖2
[0088] L phys =‖I’ SH (Φ’)-I SH (Φ)‖2
[0089] L TV =‖▽ 2 Φ’‖1
[0090] In the formula, L phase 、L phys 、L TV respectively represent the wavefront reconstruction loss, the physical consistency loss, and the regularization loss. Φ represents the true wavefront phase corresponding to the Shack-Hartmann spot pattern, Φ’ represents the reconstructed wavefront phase corresponding to the Shack-Hartmann spot pattern, || ||1 represents the L1 norm, || ||2 represents the L2 norm, I SH (Φ) represents the simulated spot pattern generated according to the true wavefront phase, I’ SH (Φ’) represents the simulated spot pattern generated according to the reconstructed wavefront phase, and ▽ 2 is the Laplace operator.
[0091] In step S2, the cross-domain correspondence model includes a cross-domain feature alignment sub-network and a phase reconstruction sub-network. The cross-domain feature alignment sub-network is used to map the feature maps of the Shack-Hartmann spot pattern under any wavefront distortion condition and the corresponding true wavefront phase to a shared feature space and align them, and then output the aligned features. The phase reconstruction sub-network is used to generate the reconstructed wavefront phase according to the aligned features and output the cross-domain correspondence model.
[0092] The cross-domain feature alignment sub-network includes two parallel feature extractors, which are the first feature extractor F A 、the second feature extractor F B . The inputs of the first feature extractor and the second feature extractor are the Shack-Hartmann spot pattern and the corresponding true wavefront phase respectively. After the outputs of the two feature extractors are processed by the correlation matrix, the aligned features are obtained. In the shared feature domain S, the similarity between the features of the Shack-Hartmann spot pattern and the corresponding true wavefront phase is calculated and a correlation matrix is constructed to match the feature correspondence relationship between each region in the Shack-Hartmann pattern and the target phase distribution region.
[0093] Optionally, in the cross-domain feature alignment sub-network, both feature extractors can use structures such as convolutional neural networks or feature pyramids to perform multi-scale feature extraction, and combine physical priors (such as angular spectrum transmission models, diffraction propagation models) to ensure that the learned cross-domain relationships conform to the optical physical propagation laws.
[0094] Preferably, in the cross-domain feature alignment sub-network, both feature extractors adopt an encoder structure based on the U-Net encoder.
[0095] Preferably, in the cross-domain feature alignment sub-network, each feature extractor includes a plurality of serially connected convolutional downsampling modules. Each convolutional downsampling module is mainly composed of a convolutional layer, a normalization layer, an activation function layer, a residual structure, a squeeze-and-excitation module, and a CBAM attention mechanism module connected in series in sequence; the residual structure contains a main path and a bypass connection. The main path includes two consecutive 3×3 convolutional layers, a BatchNormalization layer, and a LeakyReLU activation function. The bypass connection includes a 1×1 convolutional layer and a BatchNormalization layer connected in sequence. In each convolutional downsampling module, the output of the activation function layer is respectively connected to the inputs of the main path and the bypass connection. After the outputs of the main path and the bypass connection are added together, they are input into the squeeze-and-excitation module; the input of the first convolutional downsampling module of the first feature extractor is the Shack-Hartmann spot pattern, and the output of the last convolutional downsampling module is the extracted feature corresponding to the Shack-Hartmann spot pattern. The input of the second feature extractor is the true wavefront phase, and the output of the last convolutional downsampling module is the extracted feature corresponding to the true wavefront phase; after the two extracted features are processed by the correlation matrix, the aligned features are obtained.
[0096] Optionally, the phase reconstruction sub-network adopts a U-Net encoder, a Generative Adversarial Network (GAN), an Encoder-Decoder structure, or a Variational Autoencoder (VAE). In the phase reconstruction sub-network, the normalization operation is performed using Spatially-Adaptive Denormalization (SPADE), Adaptive Instance Normalization (AdaIN), Feature-wise Linear Modulation (FiLM), or other normalization modules that can preserve semantic information during normalization.
[0097] Specifically, in the loss function of the cross-domain correspondence model, during training, the physical consistency loss compares the simulated spot pattern obtained by propagating the reconstructed phase through the diffraction propagation model or the angular spectrum transmission model with the simulated spot pattern obtained by passing the training set label phase through the same transmission process, and uses the L2 norm or the correlation coefficient to measure the error.
[0098] Preferably, the phase reconstruction sub-network adopts a generative adversarial network, including a generator and a discriminator. The generator includes multiple upsampling modules connected in series, and each upsampling module is mainly composed of an upsampling layer, a convolutional layer, and a spatially adaptive inverse normalization module connected in series in sequence; the discriminator includes multiple residual structures connected in series in sequence, a pooling layer, and a fully connected layer. Each residual structure contains a main path and a bypass connection. The main path contains two 3×3 convolutional layers, a BatchNormalization normalization layer, and a LeakyReLU activation function connected in sequence. The bypass connection contains a 1×1 convolutional layer and a BatchNormalization normalization layer connected in sequence. The main path and the bypass connection receive the output before the residual structure, and the two obtained outputs are added and then sent to the next structure. Among them, the main path and the bypass connection receive the output before the residual structure, and the two obtained outputs are added and then sent to the next structure means that: the main path and the bypass connection in the first residual structure both receive the input of the discriminator, that is, the reconstructed wavefront phase output by the generator. The main path and the bypass connection in the remaining residual structures both receive the output of the previous residual structure. The outputs of the main path and the bypass connection in the last residual structure are added and then sent to the pooling layer in the discriminator, and the outputs of the main path and the bypass connection in the remaining residual structures are added and then sent to the next residual structure.
[0099] During the training process, the aligned features are respectively input into the spatially adaptive inverse normalization modules of each upsampling module. The input of the first upsampling module of the generator is a randomly initialized vector, the output of the last upsampling module is the reconstructed wavefront phase, the input of the first residual structure of the discriminator is the reconstructed wavefront phase output by the generator, the output of the fully connected layer is the authenticity discrimination score for the reconstructed wavefront phase output by the generator, and the last fully connected layer of the discriminator outputs D(Φ) and D(Φ’).
[0100] In step S4, the extracted features corresponding to the Shack-Hartmann spot pattern of the biological tissue to be predicted are input into the spatially adaptive inverse normalization modules of each upsampling module of the generator, and the output of the last upsampling module of the generator is the reconstructed wavefront phase.
[0101] When the phase reconstruction sub-network adopts a generative adversarial network, the loss function of the cross-domain correspondence model further includes a generative adversarial loss, and the loss function of the cross-domain correspondence model is set according to the following formula:
[0102] L = λ1L phase + λ2L phys + λ3L adv + λ4L TV
[0103] L phase = ‖Φ’ - Φ‖1 or ‖Φ’ - Φ‖2
[0104] L phys =‖I’ SH (Φ’)-I SH (Φ)‖2
[0105] L adv =E[log(D(Φ))]+E[log(1 - D(Φ’))]
[0106] L TV =‖▽ 2 Φ’‖1
[0107] In the formula, L represents the total loss, λ1, λ2, λ_{3}, λ_{4} respectively represent the wavefront reconstruction loss weight, physical consistency loss weight, generative adversarial loss weight, and regularization loss weight, L phase 、L phys 、L adv 、L TV respectively represent the wavefront reconstruction loss, physical consistency loss, generative adversarial loss, and regularization loss, Φ represents the true wavefront phase corresponding to the Shack - Hartmann spot pattern, Φ’ represents the reconstructed wavefront phase corresponding to the Shack - Hartmann spot pattern, || ||1 represents the L1 norm, || ||2 represents the L2 norm, I SH (Φ) represents the simulated spot pattern generated according to the true wavefront phase, I’ SH (Φ’) represents the simulated spot pattern generated according to the reconstructed wavefront phase, E[ ] represents the expected value of the distribution, D( ) represents the output of the discriminator in the phase reconstruction sub - network, ▽ 2 is the Laplace operator.
[0108] S3) Use the sample data set obtained in step S1, combine with the loss function constructed in step S2, and train the cross - domain correspondence model obtained in step S2 to obtain a trained cross - domain correspondence model.
[0109] Specifically, use the Adam or AdamW optimizer for iterative training until the network converges.
[0110] S4) Obtain the Shack - Hartmann spot pattern of the biological tissue to be predicted and input it into the trained cross - domain correspondence model obtained in step S3 to obtain the reconstructed wavefront phase of the biological tissue to be predicted. Load the conjugate phase of the reconstructed wavefront phase of the biological tissue to be predicted onto the phase modulator to achieve adaptive correction of the induced aberration wavefront of the biological tissue to be predicted. When the residual wavefront of the system meets the requirements, obtain the predicted wavefront phase of the biological tissue to be predicted.
[0111] Step S4 is specifically:
[0112] S41) Use the Shack - Hartmann wavefront sensing and correction optical system to collect the Shack - Hartmann spot pattern of the biological tissue to be predicted;
[0113] Under initial conditions, the phase modulator is set to not load aberration compensation phase;
[0114] Furthermore, under initial conditions, the phase modulator can be set to load system aberration correction phase;
[0115] S42) Input the Shack-Hartmann spot pattern into the first feature extractor of the trained cross-domain correspondence model. The first feature extractor performs feature extraction processing on the Shack-Hartmann spot pattern, and inputs the extracted features into the phase reconstruction sub-network. The phase reconstruction sub-network generates and outputs the reconstructed wavefront phase according to the extracted features
[0116] S43) Load the conjugate phase of the reconstructed wavefront phase onto the phase modulator of the Shack-Hartmann wavefront sensing and correction optical system, re-collect the current Shack-Hartmann spot pattern, and obtain the peak intensity of the point spread function of the Shack-Hartmann wavefront sensing and correction optical system; compare the peak intensity of the point spread function of the system focus point with the preset peak intensity threshold. If the peak intensity reaches or exceeds the preset threshold, it is determined that the system residual wavefront meets the requirements, and the reconstructed wavefront phase corresponding to the conjugate phase initially loaded onto the phase modulator in this step is used as the predicted wavefront phase of the biological tissue to be predicted, and the adaptive correction ends, that is, this sensing method ends; if the peak intensity is less than the preset peak intensity threshold, it is determined that the system residual wavefront does not meet the requirements, and the reconstructed wavefront phase corresponding to the conjugate phase initially loaded onto the phase modulator in this step is used as the previous reconstructed wavefront phase, and enter step S44;
[0117] S44) Process the current Shack-Hartmann spot pattern collected in step S43 according to step S42 to obtain the current reconstructed wavefront phase corresponding to the current Shack-Hartmann spot pattern, add the current reconstructed wavefront phase and the previous reconstructed wavefront phase (that is, the reconstructed wavefront phase corresponding to the conjugate phase loaded onto the phase modulator in the previous step S43) to obtain a new reconstructed wavefront phase, and return to step S43.
[0118] Specifically, the phase modulator is a spatial light modulator 7 or a deformable mirror.
[0119] In specific implementation, only single or multiple corrections are required to make the system residual wavefront meet the requirements.
[0120] Before using the Shack-Hartmann wavefront sensing and correction optical system to collect the Shack-Hartmann spot pattern, it is also necessary to calibrate the Shack-Hartmann wavefront sensing and correction optical system. The calibration process is specifically as follows: During the system calibration process, use a reference plane wave or a known low-order aberration beam to measure the spot array pattern formed on the detector, and obtain the reference spot positions of each microlens. The aberration calibration of the system is realized by loading a known phase pattern (such as Zernike polynomial) and measuring the spot offset.
[0121] Furthermore, the predicted wavefront phase can be used in microscopy imaging, wavefront shaping, or astronomical adaptive optics to achieve precise measurement and correction of complex aberrations. In a microscopy imaging system, the conjugate phase of the predicted wavefront phase can be loaded into a spatial light modulator or a deformable mirror to compensate for the optical aberrations caused by the imaging sample, thereby improving the imaging resolution and contrast of the imaging system; in a wavefront shaping system, the predicted wavefront phase can be used to guide the phase of a laser or a probe beam so that it can still maintain the target shape of wavefront shaping after passing through a non-ideal medium; in an astronomical adaptive optics system, the predicted wavefront phase can be applied to a phase modulator to compensate in real time for the wavefront perturbations caused by atmospheric turbulence, improve the spatial resolution of a ground-based telescope, and assist astronomical observations.
[0122] The second aspect of the present invention provides a Shack-Hartmann wavefront sensing and correction optical system applied to the above-mentioned Shack-Hartmann wavefront sensing method. Figure 1 is a schematic diagram of the Shack-Hartmann wavefront sensing and correction system in the present invention.
[0123] As Figure 1 shown, the optical system of the present invention includes:
[0124] A laser 1 for emitting a laser beam;
[0125] An incident unit, after the laser beam passes through the incident unit, a laser beam to be modulated is generated;
[0126] A wavefront modulation unit, including a phase modulator and a first 4f lens group, after the laser beam to be modulated passes through the phase modulator and the first 4f lens group in sequence, a laser beam after wavefront modulation is generated;
[0127] An imaging unit, including a first objective lens 12, a sample stage, and a second objective lens 13, the laser beam after wavefront modulation is focused by the first objective lens 12 onto the sample plane on the sample stage to generate a sample output beam and is collected by the second objective lens 13; the rear pupil plane of the first objective lens 12 and the modulation plane of the phase modulator are conjugated to each other through the first 4f lens group to ensure that the phase modulation applied by the phase modulator acts accurately on the sample wavefront;
[0128] A polarization beam splitter 16, after the sample output beam is split by the polarization beam splitter 16, a wavefront measurement beam and a monitoring beam are generated;
[0129] A first detector 17 for receiving and monitoring the system point spread function according to the monitoring beam;
[0130] The Shack-Hartmann wavefront sensing unit includes a fifth lens 15, a sixth lens 20, a microlens array 21, and a second detector 22. The fifth lens 15 is arranged on the light beam transmission path between the polarization beam splitter 16 and the second objective lens 13. The fifth lens 15 and the sixth lens 20 form a relay 4f lens group for projecting the wavefront measurement light beam onto the microlens array 21. The sample-introduced aberration (i.e., the sample-induced distorted wavefront) is equivalent to the rear pupil plane of the second objective lens 13 and is conjugated to the front focal plane of the microlens array 21 through the fifth lens 15 and the sixth lens 20 to ensure the accuracy of the wavefront information sampled by sub-apertures. The wavefront measurement light beam is imaged onto the second detector 22 after passing through the microlens array 21, and a focused spot array image is formed on the imaging surface of the second detector 22 as the Shack-Hartmann spot pattern to ensure the wavefront measurement accuracy.
[0131] The calculation unit stores a trained cross-domain correspondence model and is used to execute the simulation and calculation processes in the above method.
[0132] Specifically, the incident unit includes a half-wave plate 2, a first lens 3, a first field stop 4, a second lens 5, and a first mirror 6 arranged in sequence along the optical path of the laser beam. The laser beam first passes through the half-wave plate 2 to adjust its own beam polarization direction to meet the optimal working conditions of the phase modulator, then undergoes beam expansion through the first lens 3, and then passes through the first field stop 4 to remove edge diffraction, and then is collimated through the second lens 5 to generate the laser beam to be modulated.
[0133] Specifically, the first 4f lens group includes a third lens 8, a second field stop 9, and a fourth lens 10 arranged in sequence along the optical path of the laser beam to be modulated. The third lens 8 and the fourth lens 10 form a Fourier transform optical system, and the second field stop 9 is placed at the Fourier plane between the third lens 8 and the fourth lens 10 to remove the unmodulated diffraction orders.
[0134] Specifically, the Shack-Hartmann wavefront sensing unit further includes a third field stop 18 and a fourth field stop 19 arranged in sequence along the optical path of the wavefront measurement light beam. The wavefront measurement light beam generated by the polarization beam splitter 16 first passes through the third field stop 18 to filter out the high-order diffraction components entering the wavefront sensing module, and then passes through the fourth field stop 19 to remove the background noise and then enters the sixth lens 20.
[0135] Further, the optical system further includes a first mirror 6, a second mirror 11, and a third mirror 14; the first mirror 6 is disposed on the beam transmission path between the second lens 5 and the phase modulator in the incident unit, and is used to guide the laser beam to be modulated into the phase modulator; the second mirror 11 is disposed on the beam transmission path between the first 4f lens group and the first objective lens 12, and is used to guide the laser beam after wavefront modulation into the first objective lens 12; the third mirror 14 is disposed on the beam transmission path between the second objective lens 13 and the fifth lens 15, and is used to guide the sample outgoing beam into the polarization beam splitter 16.
[0136] Further, the first mirror 6, the second mirror 11, and the third mirror 14 can be replaced with other optical components having a beam commutation function, such as lenses or prisms with specific radii of curvature, to achieve beam steering and path adjustment. These components can change the propagation direction of the beam through the principles of refraction or reflection, so as to guide the beam to transmit along a predetermined path in the optical system.
[0137] Preferably, both detectors can be a high-speed camera or one of CCD / CMOS / sCMOS detectors, and are used to acquire the spot pattern.
[0138] Preferably, the phase modulation device is a spatial light modulator 7 or a deformable mirror.
[0139] In the system of the present invention, the system optical conjugate relationship includes:
[0140] The modulation plane of the spatial light modulator 7 and the rear pupil plane of the first objective lens 12 are conjugated to each other through the third lens 8 and the fourth lens 10, ensuring that the phase modulation loaded by the spatial light modulator can accurately act on the sample wavefront;
[0141] The sample-introduced aberration (i.e., the sample-induced distorted wavefront) is equivalent to the rear pupil plane of the second objective lens 13, and is conjugated to the pupil plane of the microlens array 21 through the lens group including the fifth lens 15 and the sixth lens 20, ensuring accurate sampling of the sample wavefront information by the microlens array;
[0142] The modulation plane of the spatial light modulator 7 and the front focal plane of the microlens array 21 are conjugated to each other through the relay optical system, ensuring that the phase information loaded by the spatial light modulator can be accurately mapped to the sub-aperture spots on the microlens array, so as to be accurately detected by the second detector 22.
[0143] The specific embodiments of the present invention are as follows:
[0144] Embodiment
[0145] This embodiment is only used to describe the specific implementation manner of the present invention, and is not the only implementation manner. Those skilled in the art can adjust the configuration and parameters according to actual application requirements.
[0146] The implementation process of the embodiments of the present invention is as follows:
[0147] 1. Construction and calibration of the Shack - Hartmann wavefront sensing and correction optical system
[0148] ① Construction of the optical system:
[0149] Laser: Laser 1 uses a continuous - wave laser, specifically the 920nm Spark ALCOR 920 - 4, which is used to generate a stable Gaussian beam.
[0150] Incident unit: The half - wave plate 2 is used to adjust the polarization direction of the beam to meet the optimal working conditions of the spatial light modulator 7. The first lens 3 (focal length 50mm) and the second lens 5 (focal length 200mm) are respectively used for beam expansion and collimation, so that the beam diameter reaches 8mm. The first field stop 4 is located in the collimation optical path to remove edge diffraction, ensure uniform beam incidence, and improve the beam quality. The first mirror 6 guides the beam into the spatial light modulator 7. The specific incident path is: The laser beam emitted from the laser 1 first passes through the half - wave plate 2 to adjust its own beam polarization direction, then undergoes beam expansion through the first lens 3, then passes through the first field stop 4 to remove edge diffraction, and then undergoes collimation through the second lens 5 to generate a laser beam to be modulated. The laser beam to be modulated is reflected by the first mirror 6 to the spatial light modulator 7.
[0151] Wavefront modulation unit: The spatial light modulator 7 uses a Holoeye Photonics PLUTO - NIR - 011 - A, which is used to load phase patterns to achieve wavefront modulation; the phase modulation range of the spatial light modulator 7 can cover 0 ∼ 2π, which is used to simulate different wavefront aberrations or compensate for the measured wavefront errors. The surface of the spatial light modulator 7 and the rear pupil plane of the first objective lens 12 are conjugated through the lens group, the third lens 8 and the fourth lens 10, to ensure that the phase modulation applied by the spatial light modulator 7 acts accurately on the sample wavefront. The first 4f lens group is composed of the third lens 8 and the fourth lens 10, forming a Fourier - transform optical system; a second field stop 9 is placed at the Fourier plane between the third lens 8 and the fourth lens 10 to remove unmodulated diffraction orders. The second mirror 11 guides the beam into the imaging unit. The specific wavefront modulation path is: The laser beam to be modulated first undergoes different phase modulations by the spatial light modulator 7, and then passes through the third lens 8, the second field stop 9, and the fourth lens 10 in sequence to generate a wavefront - modulated laser beam. The wavefront - modulated laser beam is reflected by the second mirror 11 to the first objective lens 12.
[0152] Imaging unit: The first objective lens 12 focuses the beam onto the sample plane. The second objective lens 13 collects the sample's outgoing beam and is conjugated with the first objective lens to ensure complete wavefront information transmission. The third reflector 14 guides the beam into the spectrometer. The imaging unit's path is as follows: the wavefront-modulated laser beam is focused by the first objective lens 12 onto the sample plane on the sample stage, generating a sample-outgoing beam that is collected by the second objective lens 13.
[0153] Beam splitting unit: The polarization beam splitter 16 is responsible for separating the wavefront measurement beam and the monitoring beam.
[0154] Monitoring unit: The first detector 17 is used to monitor the point spread function of the system and adopts DMK 23UV024.
[0155] Shack-Hartmann wavefront sensor unit: The third field aperture 18 is used to filter out high-order diffraction components entering the wavefront sensor module; the fifth lens 15 (focal length 200mm) and the sixth lens 20 form a relay 4f lens group, which projects the light beam to the microlens array 21. The Shack-Hartmann wavefront sensor consists of a microlens array 21 and a second detector 22. The microlens array 21 uses Edmund Optics 64-483 and contains 16×16 microlenses. Each microlens has a focal length of f L =43.6mm, aperture D L =500μm; the aberration is conjugated to the pupil plane of the microlens array 21 through the lens group (fifth lens 15 and sixth lens 20), ensuring the accuracy of the wavefront information of the sub-aperture sampling and improving the accuracy of wavefront reconstruction; the subsequent image of the microlens array 21 is transmitted to the second detector 22, forming a focused spot array image on the detector imaging surface to ensure the accuracy of wavefront measurement; the second detector 22 uses an Andor Zyla4.2 high-resolution sCMOS camera to record the spot data formed by the microlens array; the fourth field stop 19 is used to remove background noise and improve the signal-to-noise ratio.
[0156] Computing unit: The computing unit is equipped with an NVIDIA RTX 4090 GPU and uses the Pytorch 1.13.0 framework to analyze spot data through a cross-domain learning network, reconstruct the wavefront and calculate the correction phase; perform deep learning inference and real-time correction control; and control the phase loading of the spatial light modulator.
[0157] ②Calibration of optical system:
[0158] Before using the spatial light modulator, perform interferometry or other calibration methods. In the absence of aberrations, apply a plane wavefront to the spatial light modulator 7 and record the spot position as a system benchmark. Calibrate the Shack-Hartmann sensor response by applying a known phase pattern (such as a Zernike polynomial) and measuring the spot offset.
[0159] 2. Construction of Sample Data Set and Training of Cross-Domain Correspondence Model
[0160] ① Construction of Sample Data Set
[0161] To enhance the generalization ability of the deep learning network and enable it to achieve robust wavefront reconstruction in wavefront perturbation environments with different complexities, the present invention constructs a training data set containing various perturbation amplitudes, spatial frequencies, and signal-to-noise ratios. The generation of the sample data set includes four steps: phase distortion modeling, experimental data acquisition, data preprocessing, and sample pairing.
[0162] 1) Phase distortion modeling: By numerical simulation or experimental methods, construct phase distortions of different intensities and types, including:
[0163] a) Zernike polynomial aberration: A combination of low-order and high-order Zernike aberrations, with the amplitudes of items 1 - 3 being 0, the amplitude range of items 4 - 30 being [-π, π], the amplitude range of items 31 - 60 being [-0.3π, 0.3π], and the amplitude range of items 61 - 120 being [-0.1π, 0.1π];
[0164] b) Random scattering aberration: Use numerical simulation to simulate the high-frequency random aberrations generated by complex biological tissues, scattering media, etc., with the amplitude range being [±1.5π, ±2π] and the spatial frequency range being [λ / 2, 2λ] / μm;
[0165] c) Composite aberration: A superposition combination of the above two types of aberrations, with the perturbation intensity range being the intensity range after the superposition of the above two types of aberrations, and the superposition ratio being 1:1.
[0166] 2) Experimental data acquisition: Load complex aberrations of different amplitudes and forms (such as Zernike polynomial combinations, high-frequency random perturbations, scattering absorption models, etc.) through a spatial light modulator 7, and capture Shack-Hartmann spot diagrams (including complex spot information corresponding to different offsets, overlaps, defocusing, etc.), while recording (or calculating) the corresponding wavefront phase diagrams;
[0167] 3) Data preprocessing: After randomly applying noise to all Shack-Hartmann spot diagrams, perform normalization operations to meet the network input requirements; use an appropriate pupil range mask for the phase diagrams;
[0168] 4) Sample pairing: The captured Shack-Hartmann spot diagrams and their corresponding phase distributions (true wavefront phases) form training samples, which are subsequently input into the cross-domain correspondence model for training to learn the non-linear mapping relationship between Shack-Hartmann spot diagrams and wavefront phases.
[0169] ② Construction of Cross-Domain Correspondence Model
[0170] The structure of the cross-domain correspondence model (Cross-Domain Shack-Hartmann Wavefront Sensing, hereinafter referred to as CoSH) constructed in this embodiment is as follows Figure 4 As shown, the cross-domain correspondence network model CoSH mainly consists of two parts: a cross-domain feature alignment sub-network and a phase reconstruction sub-network
[0171] 1) Cross-Domain Alignment Network
[0172] In this embodiment, the feature extractor is based on the U-Net encoder, and extracts multi-scale features through a multi-layer convolutional and downsampling network structure. Each feature extractor contains 4 convolutional downsampling modules, and each module is mainly composed of a convolutional layer, Instance Normalization, a LeakyReLU activation function, a residual structure, a Squeeze-and-Excitation (SE) module, and a Convolutional Block Attention Module (CBAM) attention mechanism module in series. Among the 4 convolutional downsampling modules, the number of channels of the convolutional layer is 64, 128, 256, and 512 in sequence. The residual structure contains a main path and a bypass connection. The main path contains two consecutive 3×3 convolutional layers, a Batch Normalization layer, and a LeakyReLU activation function. The bypass connection contains a 1×1 convolutional layer and a Batch Normalization layer in sequence. The output of the activation function layer is connected to the input of the main path and the bypass connection, and the outputs of the main path and the bypass connection are added and then input to the squeeze excitation module
[0173] The process of mapping the spot pattern and the phase pattern to the shared feature space S through the feature extractor can be expressed as:
[0174] X S =F A (I SH,system ;θ A )
[0175] Y S =F B (Φ;θ B )
[0176] where I SH,system represents the Shack-Hartmann spot pattern, Φ represents the true phase distribution corresponding to the spot pattern, F A represents the feature extractor of the spot image, that is, the first feature extractor, and its learnable parameter is θ A , F BThe feature extractor representing the true phase distribution, i.e., the second feature extractor, whose learnable parameter is θ B , X S represents the extracted features corresponding to the Shack - Hartmann spot pattern, Y S represents the extracted features corresponding to the true phase distribution.
[0177] In this embodiment, in the shared feature space S, the similarity between the feature vectors at corresponding positions u and v is represented by the correlation matrix M(u, v). Through the correlation matrix M(u, v), the alignment and correspondence learning of features in the spot domain and the phase domain at multiple scales are realized. Among them, M(u, v) can be set as the cosine similarity of the two - position feature vectors, such as:
[0178] M(u, v)=(X S (u) T Y S (v)) / (||X’ S (u)||2||S’ S (v)||2)
[0179] Among them, X S (u), Y S (v) respectively represent the feature vectors at positions u and v in the shared feature space, and || ||2 represents the L2 norm of the vector. This correlation matrix is used to learn the cross - domain alignment relationship between the spot pattern region and the phase pattern region, and its correct alignment is constrained in the loss function.
[0180] 2) Phase Reconstruction Sub - network (Phase Translation Network)
[0181] In this embodiment, the structure of the phase reconstruction sub - network is based on the generative adversarial network GAN. The aligned features are input into the generator G of the phase reconstruction sub - network, and at the same time, the spatially adaptive de - normalization SPADE module is adopted to obtain the reconstructed phase Φ’ layer by layer. The phase reconstruction sub - network includes two parts: a generator and a discriminator. The generator is based on the U - Net decoding structure and is composed of 7 up - sampling modules connected in series. Each up - sampling module structure includes an up - sampling layer, a convolutional layer, and a SPADE module connected in series. The discriminator contains 5 residual structures connected in series in turn, a pooling layer, and a convolutional layer. Each residual structure contains a main path and a bypass connection. The main path contains two 3×3 convolutional layers, a BatchNormalization normalization layer, and a LeakyReLU activation function connected in sequence. The bypass connection contains a 1×1 convolutional layer and a BatchNormalization normalization layer connected in sequence. The process of generating the reconstructed phase by the generator can be expressed as:
[0182] Φ’=G(z,T(X S,Y S );θ G )
[0183] Among them, z is a randomly initialized vector, and T(⋅) represents the features after injecting cross-domain alignment (such as correlation matrix processing), and θ G are the learnable parameters of the phase reconstruction self-network.
[0184] ③ Training of the cross-domain correspondence model
[0185] For the cross-domain correspondence network model CoSH constructed in the above process, taking the Shack-Hartmann spot pattern as the input and the corresponding true phase distribution, that is, the true wavefront phase, as the expected output, using the sample data set, the cross-domain correspondence model is trained and the network parameters are updated by optimizing the loss function. Through backpropagation, the optimizer iteratively updates the network weights, so that the network can effectively learn the mapping between the Shack-Hartmann spots and phases with different complexities within the distortion range covered by a large number of training samples. In this embodiment, the Adam or AdamW optimizer is used for iterative training until the network converges.
[0186] The optimized loss function includes:
[0187] a) Phase reconstruction error: Comparing the network output and the true phase;
[0188] b) Physical consistency error: The comparison difference between the simulated spot pattern obtained by propagating the network output phase through the diffraction propagation model or the angular spectrum transmission model and the simulated spot pattern obtained by passing the phase of the training set label through the same transmission process;
[0189] c) Regularization constraint: Used to suppress the non-physical non-smoothness or multi-solution problem of the phase;
[0190] The network loss function adopted in the embodiment of the present invention is as follows:
[0191] Wavefront reconstruction loss L phase : The difference between the phase (reconstructed wavefront phase) output by the network and the true phase;
[0192] L phase =‖Φ’ - Φ‖1 or ‖Φ’ - Φ‖2
[0193] Among them, || ||1 represents the L1 norm, and || ||2 represents the L2 norm. It is used to constrain the network output phase and the true phase to be as close as possible in the large-scale range and overall distribution.
[0194] Physical consistency loss L phys : Generating a simulated spot pattern I’ by propagating the reconstructed wavefront phase Φ’ through the diffraction propagation model or the angular spectrum transmission model SH , and comparing it with the simulated spot pattern I obtained by passing the true phase distribution Φ of the training set label through the same transmission processSH Comparison. For example, the L2 norm can be used:
[0195] L phys = ‖I’ SH (Φ’) - I SH (Φ)‖2
[0196] The generative adversarial loss L adv :
[0197] L adv = E[log(D(Φ))] + E[log(1 - D(Φ’))]
[0198] where E[ ] represents the expected value of the distribution, and D( ) represents the output of the discriminator in the phase reconstruction sub-network.
[0199] Regularization loss: includes priors such as total variation (TV) or sparsity, suppressing non-physical non-smoothness or multi-solution problems of the phase. For example:
[0200] L TV = ‖▽ 2 Φ’‖1
[0201] where ▽ 2 is the Laplacian operator.
[0202] Finally, the total loss is obtained comprehensively:
[0203] L = λ1L phase + λ2L phys + λ3L adv + λ4L TV
[0204] where λ i is the weight coefficient, which can be set according to the experimental tuning data. In this embodiment, λ1, λ2, λ3, and λ4 are set to 1.0, 0.3, 0.5, and 0.05 respectively.
[0205] 3. Experimental wavefront reconstruction and correction
[0206] Specifically, it includes the following steps:
[0207] 1) During actual measurement, obtain the spot pattern of the measured light beam on the detector after passing through the microlens array, and input it into the trained cross-domain correspondence model;
[0208] 2) The network outputs the reconstructed wavefront phase in real time;
[0209] 3) Load the conjugate phase of the reconstructed phase onto the spatial light modulator to achieve the correction of high-order aberrations; in the detection of tissue aberrations, higher resolution or clearer fluorescence signals or laser focus points can be obtained at deep tissue locations (such as brain tissue, organ tissue).
[0210] 4) If closed-loop control is required, the cycle of collecting the spot pattern - reconstructing the model phase - applying correction can be repeated until the residual wavefront of the system meets the requirements.
[0211] Among them, the system residual wavefront meeting the requirements means that the peak intensity of the point spread function of the system focus point after correction is greater than or equal to the preset threshold.
[0212] The method of the embodiment of the present invention is used for the wavefront reconstruction and correction effect verification set as Figure 5 shown in (a) of Figure 5 shown in (e) of
[0213] As Figure 5 shown, the experimental results show that, as Figure 5 shown in (b) of Figure 5 under the condition of actually loading complex wavefront aberrations, obvious spot splitting and deformation appear in the Shack - Hartmann spot pattern without correction, indicating that there are high - frequency components and local drastic changes in the original wavefront, and it exceeds the dynamic range and spatial sampling ability of the used Shack - Hartmann wavefront sensor. After applying the method of the embodiment of the present invention for wavefront reconstruction and loading conjugate phase, as Figure 5 shown in (c) of
[0214] the spot pattern presents a regular arrangement state, and the spots are concentrated at the center of each microlens aperture, indicating that the method of the embodiment of the present invention has achieved high - precision reconstruction and correction of complex wavefronts, showing its effectiveness in improving the system dynamic range and spatial resolution. As Figure 6 shown in (d) and (e) of
[0215] As Figure 6 shown, the experimental results show that, compared with the traditional centroid - based modal reconstruction method, the wavefront sensing method based on the cross - domain correspondence model proposed by the present invention shows significant advantages in the reconstruction and correction of complex wavefront aberrations. Specifically, Figure 6 (a1) of Figure 6 shows the complex wavefront phase to be corrected, which contains obvious aberration characteristics of high - frequency and local drastic changes. In Figure 6 (a2) of Figure 6 the wavefront reconstructed by the method of the embodiment of the present invention can more accurately recover Figure 6The root mean square error of (a1) is 0.0318λ, showing high-precision reconstruction for complex aberrations; while Figure 6 In (a3), obvious high-frequency detail loss appears in the reconstruction result of the centroid-based modal reconstruction method, compared with the true wavefront aberration ( Figure 6 The root mean square error of (a1) is 0.2912λ, making it difficult to accurately restore the complex true wavefront aberration. The corresponding system point spread function results further confirm the above differences. Figure 6 (b1) shows the system point spread function corresponding to the complex aberration to be corrected, Figure 6 (b2) shows the point spread function corrected by the method of the embodiment of the present invention. Its focusing morphology is close to the ideal Airy disk, indicating that the system residual aberration is small and the correction effect is good; while Figure 6 In (b3), the point spread function corrected by the centroid-based modal reconstruction method still has obvious deformation and distortion phenomena, and the focusing quality is not significantly improved, indicating that it cannot effectively reconstruct complex aberrations, showing that it is limited by the limited spatial resolution and dynamic range of the Shack-Hartmann sensor. In addition, in terms of the Shack-Hartmann spot pattern, Figure 6 (c2) shows the spot pattern corrected by the method of the present invention. The focusing spot morphology under each microlens is regular and the positions are concentrated, which is significantly better than Figure 6 The corrected result shown in (c3), and the latter still has offset and deformed sub-region spots, indicating its limited correction ability.
[0216] From the above results, it can be seen that the method proposed by the present invention can achieve high-precision reconstruction and correction of complex wavefronts at high dynamic range and high spatial resolution by learning the cross-domain relationship between the spot structure in the sub-aperture and the overall wavefront without making hardware modifications to the Shack-Hartmann sensor. Compared with traditional methods such as the centroid-based modal reconstruction method, it has obvious advantages in dealing with high-frequency aberrations, local strong distortions and low signal-to-noise ratio conditions.
[0217] Next, the method of this embodiment was used to implement the reconstructed phase distribution of a mouse brain slice and perform aberration correction. The specific process is as follows:
[0218] Fixed brain tissues from adult C57BL / 6 mice were selected. The brain tissues were fully fixed with 4% paraformaldehyde solution and then stored in PBS solution. The slice thickness was 300 µm. During the experiment, the brain slices were encapsulated in a metal gasket with a coverslip and a glass slide, and the mounting medium was a 1:1 PBS solution and glycerol. The sample was clamped by the stage and placed between the first objective lens and the second objective lens.
[0219] The result of using the method of the embodiment of the present invention to obtain the reconstructed phase distribution of the mouse brain slice is as Figure 7As shown. The experimental results show that due to the strong optical scattering and absorption in brain tissue, the point spread function obtained under uncorrected conditions exhibits obvious distortion phenomena and has a low peak intensity. After loading the conjugate phase of the reconstructed phase obtained by the method of the embodiment of the present invention onto the spatial light modulator, the focusing morphology of the system point spread function is significantly improved, the brightness is enhanced, and the focusing performance of the system is significantly improved, indicating that the method of the embodiment of the present invention can detect and correct the aberration of biological tissue in an imaging environment with a certain tissue thickness and significant signal attenuation caused by non-uniform absorption.
[0220] In summary, the present invention is based on the Shack-Hartmann wavefront sensing and correction optical system, uses the cross-domain correspondence model to establish the cross-domain characteristics of the spot distortion morphology and the global phase distribution within the sub-aperture, and through combining the physical consistency constraint loss, uses the phase reconstruction network to accurately restore complex aberrations, decoupling the wavefront reconstruction process from the physical sampling density of the microlens array. Compared with traditional methods, without increasing the sampling number of the microlens array or increasing the sub-aperture range, the present invention can reconstruct a wavefront with higher-frequency changes and larger local wavefront tilt beyond the spatial resolution and dynamic range of the Shack-Hartmann wavefront sensor by identifying the spot morphology information within the sub-aperture, achieving simultaneous improvement of the spatial resolution and dynamic range of the Shack-Hartmann wavefront sensor, and is applicable to high-precision wavefront reconstruction and correction in scenarios such as complex aberrations, biological tissues, and weak signals. Those skilled in the art can understand that the above embodiments are only illustrative descriptions. The embodiments of the present invention can be appropriately modified and deformed without departing from its core idea, and all belong to the protection scope of the present invention. The Shack-Hartmann cross-domain reconstruction scheme formed by the method of the present invention can be applied to optical systems using Shack-Hartmann sensors, and can also be further extended to microscopic imaging and atmospheric turbulence aberration correction, and is also adaptable to complex diffraction and off-axis scattering and other situations.
[0221] The preferred embodiments of the present invention have been described in detail above in conjunction with the accompanying drawings. However, the present invention is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present invention, various simple modifications can be made to the technical solutions of the present invention, and these simple modifications all belong to the protection scope of the present invention.
[0222] In addition, it should be noted that in the above specific embodiments, the various specific technical features described can be combined in any appropriate manner without conflict. To avoid unnecessary repetition, the present invention does not separately describe various possible combination methods.
Claims
1. A Shack-Hartmann wavefront sensing method based on a cross-domain correspondence model, characterized in that It includes the following steps: S1) Construct the true wavefront phase under different wavefront distortion conditions, and obtain the Shack-Hartmann spot pattern corresponding to the true wavefront phase through the Shack-Hartmann wavefront sensing optical system. Construct each Shack-Hartmann spot pattern and its corresponding true wavefront phase into a sample pair, and all sample pairs form a sample data set; In step S1, the process of obtaining the true wavefront phase and the corresponding Shack-Hartmann spot pattern under different wavefront distortion conditions is specifically as follows: First, construct a variety of different wavefront distortion conditions through numerical simulation or experimental methods; then use a phase modulator to load various wavefront distortion conditions, record the original Shack-Hartmann spot pattern through a detector, and after randomly adding noise, obtain the Shack-Hartmann spot pattern under different wavefront distortion conditions, and use the wavefront distortion condition corresponding to the Shack-Hartmann spot pattern as the true wavefront phase; The process of constructing a variety of different wavefront distortion conditions is specifically as follows: within the amplitude range corresponding to the Zernike polynomial aberration, generate multiple Zernike polynomial aberrations with different amplitudes, within the amplitude range and spatial frequency range corresponding to the random scattering aberration, generate a variety of random scattering aberrations with different amplitude and spatial frequency combinations, and then for a variety of different combinations of Zernike polynomial aberrations and random scattering aberrations, superimpose them according to different perturbation intensities and superposition ratios to obtain compound aberrations with different characteristics. All Zernike polynomial aberrations, random scattering aberrations, and compound aberrations together constitute all wavefront distortion conditions; The biological tissue to be predicted includes transparent tissue sections and / or incompletely transparent tissue sections; S2) Construct a cross-domain correspondence model and its loss function; the loss function of the cross-domain correspondence model includes a wavefront reconstruction loss, a physical consistency loss, and a regularization loss; In step S2, the cross-domain correspondence model includes a cross-domain feature alignment sub-network and a phase reconstruction sub-network. The cross-domain feature alignment sub-network is used to map the features of the Shack-Hartmann spot pattern and the corresponding true wavefront phase to a shared feature space and align them, and then output the aligned features. The phase reconstruction sub-network is used to generate a reconstructed wavefront phase according to the aligned features and output it; The cross-domain feature alignment sub-network includes two parallel feature extractors, which are the first feature extractor and the second feature extractor respectively. The inputs of the first feature extractor and the second feature extractor are the Shack-Hartmann spot pattern and the corresponding true wavefront phase respectively. After the outputs of the two feature extractors are processed by a correlation matrix, the aligned features are obtained; The phase reconstruction sub-network adopts a generative adversarial network. In the phase reconstruction sub-network, the normalization operation is performed using a spatial adaptive inverse normalization, an adaptive instance normalization, a feature-level linear modulation, or other normalization modules that can retain semantic information during normalization; The loss function of the cross-domain correspondence model also includes a generative adversarial loss. The loss function of the cross-domain correspondence model and the generative adversarial loss are set according to the following formulas respectively: L = λ1L phase + λ2L phys + λ3L adv + λ4L TV L adv = E[log(D(Φ))] + E[log(1 - D(Φ’))] Wherein, L represents the total loss, and λ1, λ2, λ3, and λ4 respectively represent the wavefront reconstruction loss weight, the physical consistency loss weight, the generative adversarial loss weight, and the regularization loss weight. L phase , L phys , L adv , L TV respectively represent the wavefront reconstruction loss, the physical consistency loss, the generative adversarial loss, and the regularization loss. Φ represents the true wavefront phase corresponding to the Shack-Hartmann spot pattern, Φ’ represents the reconstructed wavefront phase corresponding to the Shack-Hartmann spot pattern, E[ ] represents the expected value of the distribution, and D( ) represents the output of the discriminator in the phase reconstruction sub-network; The wavefront reconstruction loss, the physical consistency loss, and the regularization loss are set according to the following formulas respectively: L phase =‖Φ’ - Φ‖1 or ‖Φ’ - Φ‖2 L phys =‖I’ SH (Φ’)-I SH (Φ)‖2 L TV =‖▽ 2 Φ’‖1 where L phase , L phys , L TV represent the wavefront reconstruction loss, the physical consistency loss, and the regularization loss respectively, Φ represents the true wavefront phase corresponding to the Shack-Hartmann spot pattern, Φ’ represents the reconstructed wavefront phase corresponding to the Shack-Hartmann spot pattern, || ||1 represents the L1 norm, || ||2 represents the L2 norm, I SH (Φ) represents the simulated spot pattern generated according to the true wavefront phase, I’ SH (Φ’) represents the simulated spot pattern generated according to the reconstructed wavefront phase, ▽ 2 is the Laplacian operator; S3) Using the sample data set obtained in step S1 and combining with the loss function constructed in step S2, train the cross-domain correspondence model obtained in step S2 to obtain a trained cross-domain correspondence model; S4) Obtain the Shack-Hartmann spot pattern of the biological tissue to be predicted, and combine with the trained cross-domain correspondence model to achieve adaptive correction of the induced aberration wavefront of the biological tissue to be predicted. When the residual wavefront of the system meets the requirements, obtain the predicted wavefront phase of the biological tissue to be predicted.
2. The Shack-Hartmann wavefront sensing method based on the cross-domain correspondence model according to claim 1, characterized in that: In the cross-domain feature alignment sub-network, each feature extractor includes a plurality of serially connected convolutional downsampling modules. Each convolutional downsampling module is mainly composed of a convolutional layer, a normalization layer, an activation function layer, a residual structure, a squeeze-and-excitation module, and a CBAM attention mechanism module connected in series in sequence; the residual structure contains a main path and a bypass connection. The main path includes two convolutional layers, a BatchNormalization normalization layer, and a LeakyReLU activation function connected in sequence. The bypass connection includes a convolutional layer and a BatchNormalization normalization layer connected in sequence; the output of the activation function layer is respectively connected to the inputs of the main path and the bypass connection, and the outputs of the main path and the bypass connection are added and then input into the squeeze-and-excitation module; The phase reconstruction sub-network adopts a generative adversarial network, including a generator and a discriminator. The generator includes a plurality of serially connected upsampling modules. Each upsampling module is mainly composed of an upsampling layer, a convolutional layer, and a spatially adaptive inverse normalization module connected in series in sequence; the discriminator includes a plurality of residual structures, a pooling layer, and a fully connected layer connected in series in sequence. Each residual structure contains a main path and a bypass connection. The main path includes two convolutional layers, a BatchNormalization normalization layer, and a LeakyReLU activation function connected in sequence. The bypass connection includes a convolutional layer and a BatchNormalization normalization layer connected in sequence. The main path and the bypass connection receive the output before the residual structure, and the two obtained outputs are added and then sent to the next structure.
3. The Shack - Hartmann wavefront sensing method based on the cross - domain correspondence model according to claim 1, characterized in that: Step S4 is specifically as follows: S41) Use the Shack-Hartmann wavefront sensing and correction optical system to collect the Shack-Hartmann spot pattern of the biological tissue to be predicted; S42) Input the Shack-Hartmann spot pattern into the first feature extractor of the trained cross-domain correspondence model. The first feature extractor performs feature extraction processing on the Shack-Hartmann spot pattern and inputs the extracted features into the phase reconstruction sub-network, and the phase reconstruction sub-network outputs the reconstructed wavefront phase; S43) Load the conjugate phase of the reconstructed wavefront phase onto the phase modulator of the Shack-Hartmann wavefront sensing and correction optical system, re-collect the current Shack-Hartmann spot pattern, and simultaneously obtain the peak intensity of the point spread function; Compare the peak intensity of the point spread function with a preset peak intensity threshold. If the peak intensity is less than the preset peak intensity threshold, it is determined that the residual wavefront of the system does not meet the requirements, and the reconstructed wavefront phase is used as the previous reconstructed wavefront phase, and go to step S44; Otherwise, it is determined that the residual wavefront of the system meets the requirements, and the reconstructed wavefront phase is used as the predicted wavefront phase of the biological tissue to be predicted; S44) Process the currently acquired Shack - Hartmann spot pattern in step S43 according to step S42 to obtain the current reconstructed wavefront phase; perform an addition process on the current reconstructed wavefront phase and the previous reconstructed wavefront phase to obtain a new reconstructed wavefront phase, and return to step S43.
4. A Shack-Hartmann wavefront sensing and correction optical system applied to the Shack-Hartmann wavefront sensing method according to any one of claims 1 to 3, characterized in that, Including: A laser (1) for emitting a laser beam; An incident unit, after the laser beam passes through the incident unit, a laser beam to be modulated is generated; A wavefront modulation unit, including a phase modulator and a first 4f lens group. After the laser beam to be modulated passes through the phase modulator and the first 4f lens group in sequence, a laser beam with modulated wavefront is generated; An imaging unit, including a first objective lens (12), a sample stage, and a second objective lens (13). The laser beam with modulated wavefront is focused by the first objective lens (12) onto the sample plane on the sample stage to generate a sample outgoing beam, which is collected by the second objective lens (13); The rear pupil plane of the first objective lens (12) and the phase modulator are conjugated to each other through the first 4f lens group; A polarization beam splitter (16). After the sample outgoing beam is split by the polarization beam splitter (16), a wavefront measurement beam and a monitoring beam are generated; A first detector (17) for receiving and monitoring the system point spread function according to the monitoring beam; A Shack - Hartmann wavefront sensing unit, including a fifth lens (15), a sixth lens (20), a microlens array (21), and a second detector (22). The fifth lens (15) is arranged between the polarization beam splitter (16) and the second objective lens (13). The fifth lens (15) and the sixth lens (20) form a relay 4f lens group for projecting the wavefront measurement beam onto the microlens array (21). The sample - introduced aberration is equivalent to the rear pupil plane of the second objective lens (13) and is conjugated to the pupil plane of the microlens array (21) through the fifth lens (15) and the sixth lens (20). The wavefront measurement beam is imaged onto the second detector (22) after passing through the microlens array (21), and a Shack - Hartmann spot pattern is formed on the imaging surface of the second detector (22); A calculation unit, storing a trained cross - domain correspondence model, for performing the simulation and calculation processes in the Shack - Hartmann wavefront sensing method described in any one of claims 1 to 3.
5. The Shack-Hartmann wavefront sensing and correction optical system according to claim 4, wherein: The incident unit includes a half - wave plate (2), a first lens (3), a first field stop (4), a second lens (5), and a first mirror (6) arranged in sequence along the optical path of the laser beam. The laser beam first passes through the half - wave plate (2) to adjust the beam polarization direction, then passes through the first lens (3) for beam expansion, then passes through the first field stop (4) to remove edge diffraction, and then passes through the second lens (5) for collimation to generate a laser beam to be modulated; The first 4f lens group includes a third lens (8), a second field stop (⑨), and a fourth lens (10) arranged in sequence along the optical path of the laser beam to be modulated. The third lens (8) and the fourth lens (10) form a Fourier transform optical system, and the second field stop (9) is placed at the Fourier plane between the third lens (8) and the fourth lens (10); The Shack-Hartmann wavefront sensing unit further includes a third field stop (18) and a fourth field stop (19) sequentially arranged along the optical path of the wavefront measurement beam. After passing through the third field stop (18) and the fourth field stop (19), the wavefront measurement beam generated by the polarization beam splitter (16) enters the sixth lens (20). The phase modulator uses a spatial light modulator (7) or a deformable mirror.
6. The Shack-Hartmann wavefront sensing and correcting optical system according to claim 4, characterized in that: The optical system further includes a first mirror (6), a second mirror (11), and a third mirror (14). The first mirror (6) is disposed between the incident unit and the phase modulator and is used to guide the laser beam to be modulated into the phase modulator. The second mirror (11) is disposed between the first 4f lens group and the first objective lens (12) and is used to guide the laser beam after wavefront modulation into the first objective lens (12). The third mirror (14) is disposed between the second objective lens (13) and the fifth lens (15) and is used to guide the sample output beam into the polarization beam splitter (16).
Citation Information
Patent Citations
Method for directly detecting optical distortion phase by high-speed single image based on deep learning
CN111626997A