Coherent diffraction imaging automatic focusing method and system

By adopting the near-field propagation model and wavelet transform method in coherent diffraction imaging to calculate the clarity and weightedly update the axial distance, the problem of axial distance measurement error in coherent diffraction imaging is solved, and high-quality automatic focusing and reconstruction effects are achieved.

CN119574504BActive Publication Date: 2025-09-30HUAZHONG UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411638995.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-09-30
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

Existing coherent diffraction imaging autofocus algorithms have defects in axial distance measurement accuracy and clarity evaluation, resulting in blur and artifacts in the reconstructed image, especially in the case of multiple diffraction field information, where the calculation error is large.

Method used

The near-field propagation model is used to simulate the sample under test at different axial distances. The wavelet coefficients are obtained through wavelet transform, the clarity is calculated and the axial distance is updated weightedly. The operator in the frequency domain is used to evaluate the image clarity, gradually approaching the actual axial distance to achieve automatic focusing.

Benefits of technology

The convergence speed, convergence accuracy and initial error robustness of the focusing algorithm are improved, which can better adapt to samples with different patterns and enhance the clarity and generalization of the reconstructed image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119574504B_ABST
    Figure CN119574504B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of coherent diffraction imaging, and specifically discloses a method and system for automatic focusing of coherent diffraction imaging. The present application simulates multiple groups of samples to be tested at different positions through a near-field propagation model, performs wavelet transformation on the simulated samples to be tested to obtain wavelet coefficients, calculates clarity based on the wavelet coefficients, and uses the clarity weights of all simulated samples to update the axial distance to gradually approach the actual value of the axial distance between the sample and the detector, thereby achieving automatic focusing of coherent diffraction imaging. The present application proposes for the first time the use of operators in the frequency domain to calculate the clarity of the reconstructed image. This method has higher axial contrast and noise robustness, greatly improving the convergence speed, accuracy and robustness; through wavelet transform, the detail components of the image in the horizontal, vertical and diagonal directions are extracted in the frequency domain to evaluate the clarity of the reconstructed image, and the weights of different directions can be flexibly adjusted, which has better generalization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of coherent diffraction imaging, and more specifically, relates to a coherent diffraction imaging automatic focusing method and system. Background Art

[0002] Coherent diffraction imaging is a lensless phase imaging technique. A detector records the diffraction field resulting from the interaction between an illuminating probe and the sample under test in reciprocal space. An iterative algorithm is then used to determine the complex amplitude information of the illumination probe and the sample under test, enabling the technique to achieve diffraction-limited resolution. Because it is lens-free, coherent diffraction imaging has broad application prospects in imaging applications involving extreme ultraviolet (EUV), X-ray, and electron beam radiation sources, where high-quality optical imaging components are difficult to fabricate. Consequently, it has been extensively researched and various improvements have emerged.

[0003] The focal length of coherent diffraction imaging refers to the axial distance between the sample to be measured and the detector target surface, which will directly affect the clarity of the coherent diffraction imaging and is the main source of error in coherent diffraction. The wrong axial distance causes the light field propagation distance calculated in the coherent diffraction imaging algorithm to be different from the actual distance, resulting in the light field information in the algorithm being unable to correspond to the real light field, and then causing the coherent diffraction reconstructed image to become blurred due to scaling and artifacts; in coherent diffraction imaging using multiple diffraction field information, the wrong axial distance will further cause the relative relationship between the various diffraction fields during calculation to be inconsistent with the actual situation, further reducing the quality of coherent diffraction imaging reconstruction. However, the axial distance is difficult to measure and calibrate accurately, and how to obtain the accurate focal length is a major problem in coherent diffraction imaging.

[0004] The coherent diffraction imaging autofocus algorithm proposed in recent years, namely the coherent diffraction imaging autofocus algorithm based on sharpness (see Optics Letters, 2020, 45(7): 2030-2033) and the coherent diffraction imaging autofocus algorithm based on adaptive total variation (see Optics and Lasers in Engineering, 2022, 158, 107136), evaluates the clarity of the reconstructed image at multiple axial positions by calculating the 2-norm or p-norm of the image gradient in the spatial domain (p is a value that changes adaptively according to the image intensity), gradually searches for and approaches the true axial distance, and realizes axial distance calibration without the assistance of other additional equipment.

[0005] However, the image clarity evaluation method in this type of spatial domain has limited axial contrast, poor noise robustness, and few evaluation dimensions, which makes the existing diffraction imaging autofocus algorithm have defects in convergence speed, convergence accuracy, initial error robustness, and generalization. Summary of the Invention

[0006] In view of the defects of the prior art, the purpose of this application is to provide a coherent diffraction imaging automatic focusing method and system, which aims to solve the problem of axial distance error between the sample to be measured and the detector in the coherent diffraction imaging reconstruction process.

[0007] To achieve the above objectives, in a first aspect, the present application provides a coherent diffraction imaging autofocusing method, comprising:

[0008] S1. Obtain the distance to be calibrated and the reconstructed sample to be measured and the illumination probe at this axial distance;

[0009] S2. Using the near-field propagation model, propagate the reconstructed test sample at the current axial distance over several distances to obtain simulated test samples at different calibration positions;

[0010] S3. Perform wavelet transform on each simulated sample to be tested to obtain corresponding wavelet coefficients, wherein the wavelet coefficients include approximation coefficients, horizontal detail coefficients, vertical detail coefficients and diagonal detail coefficients;

[0011] S4. Calculate the variance of the wavelet coefficients of each simulated sample to be tested and sum them to obtain the corresponding clarity;

[0012] S5. Using the clarity of all simulated test samples as weights, weighted update of the current axial distance, and update of the reconstructed test sample and illumination probe at the current axial distance;

[0013] S6. Repeat S2-S5 until the current axial distance approaches the actual value of the axial distance, and use the current axial distance as the calibrated axial distance to achieve automatic focusing of coherent diffraction imaging, while obtaining a clear reconstruction of the sample to be tested and the illumination probe after calibration.

[0014] Preferably, step S2 is specifically as follows:

[0015] S21. Obtain the current axial distance and calibration step, set multiple calibration positions along the axial direction with the current axial distance as the center according to the calibration step, and obtain the propagation distance of each calibration position relative to the center point;

[0016] S22. Use the near-field propagation model to propagate the sample to be tested reconstructed at the current axial distance to different distances to simulate the sample to be tested reconstructed by the coherent diffraction imaging algorithm at different calibration positions.

[0017] Preferably, the calibration step is an integer multiple of the depth of field of the coherent diffraction system.

[0018] Preferably, step S3 is specifically as follows:

[0019]

[0020] in, 、 、 and Respectively represent The calibration positions simulate the approximate coefficient matrix, horizontal detail coefficient matrix, vertical detail coefficient matrix and diagonal detail coefficient matrix of the sample image to be tested, dwt2 represents the two-dimensional discrete wavelet transform function, Indicates the The calibration position simulates the image of the sample to be tested, , is the number of calibration positions.

[0021] Preferably, the calculation formula of the clarity is as follows:

[0022]

[0023] in, Indicates the The calibration position simulates the clarity of the image of the sample to be tested. Represents the detail coefficient weight of the direction corresponding to the matrix B, represents the square of the Euclidean norm, Represents the mean of each element of matrix B, matrix B belongs to the The horizontal detail coefficient matrix, vertical detail coefficient matrix and diagonal detail coefficient matrix of the sample image to be tested are simulated at each calibration position. 、 、 and Respectively represent The approximate coefficient matrix, horizontal detail coefficient matrix, vertical detail coefficient matrix and diagonal detail coefficient matrix of the sample image to be tested are simulated at each calibration position. , is the number of calibration positions.

[0024] Preferably, the calculation formula for weighted updating of the current axial distance is as follows:

[0025]

[0026]

[0027] in, Indicates the updated axial distance, Indicates the axial distance to be calibrated, Indicates the axial distance before updating, Indicates the current axial distance update step, Indicates the axial distance update step obtained in the last iteration, Indicates the axial distance update step damping coefficient, Indicates the The propagation distance, Indicates the The calibration position simulates the clarity of the image of the sample to be tested. , is the number of calibration positions.

[0028] Preferably, the updating of the reconstructed sample to be tested at the current axial distance is specifically as follows:

[0029] (1) Using the current axial distance, calculate the new sample single pixel size:

[0030]

[0031] in, Indicates the single pixel size of the sample, Indicates the wavelength of the light source used, Indicates the updated axial distance, Indicates the size of the detector target surface;

[0032] (2) using the single pixel size as a ratio and according to the characteristics of the coherent diffraction imaging system used, converting the actual scanning position coordinates into discrete scanning position coordinates;

[0033] (3) Substitute the discrete scanning position coordinates in the new sample matrix into the coherent diffraction imaging algorithm and iterate several times to obtain the reconstructed sample to be measured and the illumination probe at the current axial distance.

[0034] Preferably, the propagation model in the coherent diffraction imaging algorithm is the same as or different from the near-field propagation model.

[0035] Preferably, the coherent diffraction imaging system is a transmission coherent diffraction imaging system or a reflection coherent diffraction imaging system.

[0036] It should be noted that the present invention is applicable to various types of coherent diffraction imaging systems and has strong applicability. The present invention aims to address the issue of axial distance error between the sample to be measured and the detector during the coherent diffraction imaging reconstruction process. This is applicable to conventional coherent diffraction imaging systems, including stacked diffraction imaging systems, coherent modulation imaging systems, and multi-distance coherent diffraction imaging systems, which all suffer from difficulty accurately measuring the axial distance between the sample and the detector.

[0037] To achieve the above objectives, in a second aspect, the present application provides a coherent diffraction imaging autofocus system, comprising at least one processor and at least one memory;

[0038] The at least one memory is for storing computer instructions;

[0039] The at least one processor is configured to execute at least part of the computer instructions to implement the automatic focusing method described in the first aspect.

[0040] It can be understood that the beneficial effects of the second aspect mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0041] In general, the above technical solutions conceived by this application have the following beneficial effects compared with the existing technologies:

[0042] This application proposes a method for automatic focusing of coherent diffraction imaging. It simulates multiple groups of test samples at different distances through a near-field propagation model, performs wavelet transformation on the simulated test samples to obtain wavelet coefficients, calculates clarity based on the wavelet coefficients, and uses the clarity of all simulated test samples at the current axial distance to weight and update the axial distance, so as to gradually approach the actual value of the axial distance between the sample and the detector, thereby realizing automatic focusing of stacked diffraction imaging and high-quality reconstruction of the test sample and the illumination probe. This application proposes for the first time the use of operators in the frequency domain to calculate the clarity of the reconstructed image. This clarity calculation method has higher axial contrast and noise robustness, greatly improving the convergence speed, convergence accuracy and initial error robustness of the focusing algorithm. This application uses wavelet transform to extract detail components of the image in the horizontal, vertical and diagonal directions in the frequency domain, thereby constructing an evaluation method for the clarity of the reconstructed image. The weights of different directions can be flexibly adjusted according to needs, and it has better generalization for samples with different patterns. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 This is a flow chart of a coherent diffraction imaging automatic focusing method provided by this application.

[0044] Figure 2 1 is a schematic diagram of the optical path of the stacked diffraction computational imaging system provided in an embodiment of the present application, wherein (a) is a transmission stacked diffraction imaging system and (b) is a reflection stacked diffraction imaging system.

[0045] Figure 3 This is a flow chart of the automatic focusing method for stacked diffraction imaging provided in an embodiment of the present application.

[0046] Figure 4 It is a diagram of the sample to be tested and the illumination probe used in the simulation process provided in the embodiment of the present application, wherein (a) is the amplitude information of the sample to be tested, (b) is the phase information of the sample to be tested, (c) is the amplitude information of the illumination probe, and (d) is the phase information of the illumination probe.

[0047] Figure 5This is the reconstruction result without automatic focusing provided by the embodiment of the present application, wherein (a) is the amplitude reconstruction result of the sample to be tested without automatic focusing, (b) is a local enlarged view of the 1-3 groups of line pairs in (a), (c) is the reconstruction result of the amplitude of the illumination probe without automatic focusing, and (d) is the reconstruction result of the phase of the illumination probe without automatic focusing.

[0048] Figure 6 This is the reconstruction result after automatic focusing provided in an embodiment of the present application, wherein (a) is the amplitude reconstruction result of the sample to be tested after automatic focusing, (b) is a local enlarged view of the 1-3 groups of line pairs in (a), (c) is the amplitude reconstruction result of the illumination probe after automatic focusing, and (d) is the phase reconstruction result of the illumination probe after automatic focusing.

[0049] Figure 7 This is the axial distance convergence curve of the sample under different axial distance initial values ​​provided in the embodiment of the present application.

[0050] Throughout the drawings, the same reference numerals are used to denote the same elements or structures, wherein:

[0051] 1-He-Ne laser, 2-Beam expander, 3-Adjustable aperture, 4-Focusing lens / focusing mirror, 5-Sample to be measured, 6-Detector. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0053] The term "and / or" as used herein describes an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. The symbol " / " as used herein indicates that the related objects are in an "or" relationship, for example, A / B means either A or B.

[0054] The terms "first" and "second" in this specification and claims are used to distinguish different objects rather than to describe a specific order of objects. For example, "first response message" and "second response message" are used to distinguish different response messages rather than to describe a specific order of response messages.

[0055] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0056] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more, for example, multiple processing units means two or more processing units, etc.; multiple elements means two or more elements, etc.

[0057] Next, the technical solutions provided in the embodiments of this application are introduced.

[0058] like Figure 1 As shown, the present application provides a coherent diffraction imaging automatic focusing method, comprising:

[0059] S1. Obtain the axial distance to be calibrated and the reconstructed sample and illumination probe at this distance;

[0060] S2. Using the near-field propagation model, propagate the reconstructed test sample at the current axial distance over several distances to obtain simulated test samples at different calibration positions;

[0061] S3. Perform wavelet transform on each simulated sample to be tested to obtain corresponding wavelet coefficients, wherein the wavelet coefficients include approximation coefficients, horizontal detail coefficients, vertical detail coefficients and diagonal detail coefficients;

[0062] S4. Calculate the variance of the wavelet coefficients of each simulated sample to be tested and sum them to obtain the corresponding clarity;

[0063] S5. Using the clarity of all simulated test samples as weights, weighted update of the current axial distance, and update of the reconstructed test sample and illumination probe at the current axial distance;

[0064] S6. Repeat S2-S5 until the current axial distance approaches the actual value of the axial distance, and use the current axial distance as the calibrated axial distance to achieve automatic focusing of coherent diffraction imaging, while obtaining a clear reconstruction of the sample to be tested and the illumination probe after calibration.

[0065] Preferably, step S2 is specifically as follows:

[0066] S21. Obtain the current axial distance and calibration step, set multiple calibration positions along the axial direction with the current axial distance as the center according to the calibration step, and obtain the propagation distance of each calibration position relative to the center point;

[0067] S22. Use the near-field propagation model to propagate the sample to be tested reconstructed at the current axial distance to different distances to simulate the sample to be tested reconstructed by the coherent diffraction imaging algorithm at different calibration positions.

[0068] Preferably, the calibration step is an integer multiple of the depth of field of the coherent diffraction system.

[0069] Preferably, step S3 is specifically as follows:

[0070]

[0071] in, 、 、 and Respectively represent The calibration positions simulate the approximate coefficient matrix, horizontal detail coefficient matrix, vertical detail coefficient matrix and diagonal detail coefficient matrix of the sample image to be tested, dwt2 represents the two-dimensional discrete wavelet transform function, Indicates the The calibration position simulates the image of the sample to be tested, , is the number of calibration positions.

[0072] Preferably, the calculation formula of the clarity is as follows:

[0073]

[0074] in, Indicates the The calibration position simulates the clarity of the image of the sample to be tested. Represents the detail coefficient weight of the direction corresponding to the matrix B, represents the square of the Euclidean norm, Represents the mean of each element of matrix B, matrix B belongs to the The horizontal detail coefficient matrix, vertical detail coefficient matrix and diagonal detail coefficient matrix of the sample image to be tested are simulated at each calibration position. 、 、 and Respectively represent The approximate coefficient matrix, horizontal detail coefficient matrix, vertical detail coefficient matrix and diagonal detail coefficient matrix of the sample image to be tested are simulated at each calibration position. , is the number of calibration positions.

[0075] Preferably, the calculation formula for weighted updating of the current axial distance is as follows:

[0076]

[0077]

[0078] in, Indicates the updated axial distance, Indicates the axial distance to be calibrated, Indicates the axial distance before updating, Indicates the current axial distance update step, Indicates the axial distance update step obtained in the last iteration, Indicates the axial distance update step damping coefficient, Indicates the The propagation distance, Indicates the The calibration position simulates the clarity of the image of the sample to be tested. , is the number of calibration positions.

[0079] Preferably, the updating of the reconstructed sample to be tested at the current axial distance is specifically as follows:

[0080] (1) Using the current axial distance, calculate the new sample single pixel size:

[0081]

[0082] in, Indicates the single pixel size of the sample, Indicates the wavelength of the light source used, Indicates the current axial distance. Indicates the size of the detector target surface;

[0083] (2) using the single pixel size as a ratio and according to the characteristics of the coherent diffraction imaging system used, converting the actual scanning position coordinates into discrete scanning position coordinates;

[0084] (3) Substitute the discrete scanning position coordinates in the new sample matrix into the coherent diffraction imaging algorithm and iterate several times to obtain the reconstructed sample to be measured and the illumination probe at the current axial distance.

[0085] Preferably, the propagation model in the coherent diffraction imaging algorithm is the same as or different from the near-field propagation model.

[0086] Preferably, the conventional coherent diffraction imaging system, the coherent modulation imaging system, the holographic imaging system, the transmission-type stacked diffraction imaging system and the reflection-type stacked diffraction imaging system.

[0087] Example

[0088] The present application is applicable to different types of coherent diffraction imaging systems, including but not limited to: traditional coherent diffraction imaging systems, coherent modulation imaging systems, multi-distance coherent diffraction imaging systems, transmission stacked diffraction imaging systems and reflection stacked diffraction imaging systems.

[0089] In this embodiment, the coherent diffraction imaging system adopts a stacked diffraction imaging system, and the near-field propagation model adopts an angular spectrum propagation model.

[0090] This embodiment provides a stacked diffraction imaging method, which is applied to a stacked diffraction computational imaging system and includes:

[0091] Step S1: Building a stacked diffraction imaging system.

[0092] Figure 2 Figure 1 is a schematic diagram of the optical path of a stacked diffraction computational imaging system provided in an embodiment of the present application. (a) is a transmissive stacked diffraction imaging system, and (b) is a reflective stacked diffraction imaging system. The stacked diffraction system includes a HeNe laser 1, a beam expander 2, an adjustable aperture 3, a focusing lens / focusing mirror 4, a sample to be measured 5, and a detector 6, arranged sequentially along the optical path.

[0093] Step S2: Adjust the optical path system. The He-Ne laser 1 emits a beam with an operating wavelength of 632.8 nm and a beam diameter (1 / e 2 ) is expanded 10-fold by beam expander 2 and propagated to adjustable aperture 3. Adjustable aperture 3 adjusts the beam size to the appropriate level. The collimated, parallel beam passes through focusing lens / focusing reflector 4 and illuminates sample 5. Sample 5 is placed near the rear focal plane of focusing lens / focusing reflector 4. The position and angle of detector 6 are adjusted so that the zero-order diffraction light is centered on the detector target surface, perpendicular to the optical axis. The specific beam size is adjusted by adjusting the size of adjustable aperture 3 and moving sample 5 along the optical axis according to actual experimental requirements. The diameter of the illumination spot illuminating sample 5 is generally 0.2 mm to 2 mm.

[0094] Step S3: The precision motion stage drives the sample 5 to move in the plane of the sample according to the pre-generated scanning trajectory (including but not limited to grating curves, concentric circle curves, Fermat curves, etc.), while ensuring that there is more than 60% overlap between adjacent illumination spots, that is, satisfying the spatial overlap constraint. Record the scanning position coordinates ,in, is the serial number of the corresponding scanning position.

[0095] Step S4: The detector 6 at a certain distance from the sample 5 records the intensity information of a series of diffracted light fields generated by the interaction of the illumination spot at each scanning position on the motion trajectory with the sample 5. ,in, is the frequency domain coordinate. The approximate axial distance between the sample 5 to be tested and the target surface of the detector 6 is measured. .

[0096] Step S5: The intensity information of the diffracted light field measured in step S4 is converted to and the distance between the sample and the detector target Substituting into the stacked diffraction imaging algorithm, we get the uncalibrated reconstructed illumination probe complex amplitude function and the complex amplitude function of the sample to be measured ,in, is the spatial coordinate.

[0097] The detailed steps for obtaining the uncalibrated complex amplitudes of the reconstructed illumination probe and the sample to be measured using the stacked diffraction imaging algorithm in step S5 are as follows:

[0098] S5.1: Use the axial distance between the sample and the detector target surface measured in S4 , calculated according to formula (1), we get j Actual scanning position coordinates The corresponding discrete scanning position coordinates in the sample matrix :

[0099] (1)

[0100] in, λ is the wavelength of the light source used, D is the detector target surface size, and round() is the rounding function.

[0101] S5.2: Complex Amplitude Function for Illuminated Probes And the complex amplitude function of the sample to be tested Make an initial guess. The initial guess for the probe may include, but is not limited to, a Gaussian spot, a circular spot with an intensity of 1, or a circular spot with random intensity. The initial guess for the sample to be tested may include, but is not limited to, a matrix of all 1s or a random matrix.

[0102] S5.3: For j Scan position, dot product of the complex amplitude function of the illumination probe Discrete scanning position coordinates corresponding to the sample to be tested The complex amplitude function at , get the export wave :

[0103] (2)

[0104] S5.4: Using the diffraction propagation model, the exit wave Propagate to the detector plane and get the diffraction light field distribution of the guessed detector plane :

[0105] (3)

[0106] in, F [ ] is the propagation mode of light field in free space, including but not limited to Fresnel propagation, Fraunhofer propagation, angular spectrum propagation, etc.

[0107] S5.5: Keep the guessed diffracted light field distribution phase of the detector plane and use the first phase obtained in step S4 j The diffraction field intensity information corresponding to each scanning position Instead of the guessed diffraction light field distribution amplitude of the detector plane, a new diffraction light field distribution of the detector plane is obtained :

[0108] (4)

[0109] S5.6: Diffract the light field distribution in the new detector plane Back propagates to the sample plane to obtain the updated exit wave :

[0110] (5)

[0111] in, F [ ] is the reverse propagation mode of light field in free space.

[0112] S5.7: Based on the exit waves before and after the update obtained in S5.3 and S5.6, use the stacked diffraction imaging algorithm to update the complex amplitude function of the illumination probe and the sample to be measured :

[0113] (6)

[0114] (7)

[0115] in, α 、 β They are the update steps of the illumination probe and the sample to be tested, respectively, and are generally between [0,1].

[0116] S5.8: Randomly select the next scanning position and repeat S5.3-S5.7 until all scan positions are completed. J Location updates.

[0117] S5.9: Calculate the root mean square error between the simulated diffraction light field distribution and the measured diffraction light field distribution at each scanning position. When the root mean square error is less than the set threshold or reaches the preset upper limit of the number of iterations, output the complex amplitude function of the illumination probe and the sample to be tested at this time. As an uncalibrated illumination probe With the sample to be tested , otherwise, go to step S5.3.

[0118] Step S6: The intensity information of the light field measured in step S4 is and the distance between the sample and the detector target , the preliminary reconstructed illumination probe complex amplitude function obtained in step S5 and the complex amplitude function of the sample to be measured , substituted into the following stacked diffraction imaging autofocus method, and at the same time reconstructed the complex amplitude function of the illumination probe and the complex amplitude function of the sample to be tested And calibrate the axial distance .

[0119] Figure 3 This is a flow chart of the automatic focusing method for stacked diffraction imaging provided by the embodiment of the present application. Figure 3 As shown, the specific process of step S6 is as follows:

[0120] S6.1: Axial distance to be calibrated Centered on the sampling interval Set up M= 2 n+ 1 calibration position and calculate the The axial distance of the calibration position relative to the center , preferably, set , i Generally, it takes an integer between [1,5]. n Generally, it is an integer between [20,60] 。 Wherein, Dof is the depth of field of the stacked diffraction imaging system, which is calculated according to formula (8):

[0121] (8)

[0122] in, NA is the numerical aperture of the system, which is determined by the size of the detector target and the distance between the detector target and the sample.

[0123] S6.2: For Propagation distance , using the angular spectrum propagation model to measure the sample spread , the simulated axial distance is The sample to be tested at the position :

[0124] (9)

[0125] in, represents the Fourier transform, Represents the inverse Fourier transform.

[0126] S6.3: The simulated sample to be tested obtained in step S6.2 Perform two-dimensional discrete wavelet transform to obtain the wavelet coefficient matrix of the simulated sample to be tested:

[0127] (10)

[0128] in, cA m 、 cH m 、 cV m and cD m Respectively The approximate coefficient matrix, horizontal detail coefficient matrix, vertical detail coefficient matrix and diagonal detail coefficient matrix of the image of the sample to be tested are simulated at each propagation position, and dwt2 is a two-dimensional discrete wavelet transform function. Preferably, the Haar wavelet is selected as the wavelet basis.

[0129] S6.4: Apply the approximate coefficient matrix, the horizontal detail coefficient matrix, the vertical detail coefficient matrix and the diagonal detail coefficient matrix obtained in step S6.3 to calculate the The clarity of the simulated sample at each axial position :

[0130] (11)

[0131] in, γ B Representation matrix B The detail coefficient weight of the corresponding direction, is the square of the Euclidean norm, u B is a matrix B The mean of each element, matrix B Belong to The propagation position simulates a set of horizontal detail coefficient matrices, vertical detail coefficient matrices and diagonal detail coefficient matrices of the sample image to be tested.

[0132] S6.5: Select the next axial position and repeat steps S6.2-S6.4 until all M The clarity evaluation value of the axial position .

[0133] S6.6: Axial propagation distance according to S6.1 and the clarity obtained in S6.5 , calculate the axial distance update step :

[0134] (12)

[0135] in, Update the step size for the axial distance obtained in the previous iteration, η Update the step damping coefficient for the axial distance, which generally takes a value between [0,1]. Indicates the A propagation distance.

[0136] S6.7: Update the step size based on the axial distance obtained in S6.6 Update the axial distance:

[0137] (13)

[0138] in, is the updated axial distance, is the axial distance before updating.

[0139] S6.8: New axial distance obtained from S6.7 , update the single pixel size of the sample matrix :

[0140] (14)

[0141] S6.9: Calculate the new actual scanning coordinates based on the sample matrix single pixel size obtained in S6.8 The corresponding discrete scanning coordinate position in the sample matrix :

[0142] (15)

[0143] S6.10: Discrete scan coordinate positions in the sample matrix updated according to S6.9 , using the stack diffraction iterations from steps S5.3 to S5.8 k times, and obtain the complex amplitude function of the illumination probe at the updated axial distance and the complex amplitude function of the sample to be tested . Prioritize, k Set to 5.

[0144] S6.11: Calculating the Past n The axial distance in the iteration The range of change ,when When it is less than the set threshold or the number of iterations reaches the preset upper limit, the axial distance after the last update is output as the axial distance after calibration , and output the complex amplitude function of the illumination probe at this axial distance and the complex amplitude function of the sample to be tested , respectively as the calibrated illumination probe and the sample to be measured. Otherwise, the rear axial distance will be updated Set to the axial distance to be calibrated , proceed to step S6.1.

[0145] Figure 4 The diagram of the sample to be tested and the illumination probe used in the simulation process provided by the embodiment of the present application is shown in FIG. The sample to be tested used in the simulation experiment is the amplitude information of which is as follows: Figure 4 The size shown in (a) is a 512×512 pixel resolution target. It is expanded to 768×768 pixels by padding the edges with 0 to ensure that the full resolution target can be reconstructed. The phase information is as follows: Figure 4 As shown in (b), a Gaussian beam with a wavelength of 632.8 nm and a beam diameter of 128 pixels is constructed. After passing through a focusing lens with a focal length of 2.5 mm, it propagates 5 mm to the plane of the sample to be measured as an illumination probe. Its amplitude information is as follows: Figure 4 As shown in (c), the phase information is as follows Figure 4 As shown in (d), the exit wave formed by the interaction between the illumination probe and the sample propagates 50 mm before reaching the detector target, which has a size of 256 × 256 pixels. A precision motion stage moves the sample under test along a pre-set trajectory in a plane perpendicular to the optical axis. This trajectory forms a 17 × 17 grid path, with the interval between adjacent points being approximately 24 pixels. Each point in the grid is randomly offset to avoid periodic artifacts. The detector collects diffraction field data generated at all 289 different positions.

[0146] Figure 5 This is the reconstruction result without autofocusing provided by the embodiment of the present application, wherein (a) is the amplitude reconstruction result of the sample to be tested without autofocusing, (b) is a local magnified view of the line pair area of ​​1-3 groups in (a), (c) is the amplitude reconstruction result of the illumination probe without autofocusing, and (d) is the phase reconstruction result of the illumination probe without autofocusing. The axial distance between the sample to be tested and the detector target surface is set to 55 mm, a random matrix is ​​used as the initial guess of the sample to be tested, a circular spot with an intensity of 1 is used as the initial guess of the illumination probe, and the stacked diffraction imaging algorithm (mPIE) is used for 400 iterations. The simulation results are shown as follows: Figure 5 From the simulation results, it can be seen that the reconstructed amplitude of the sample to be tested is relatively fuzzy, and ghosting occurs in the 1-3 line pairs.

[0147] Figure 6 The reconstruction results after autofocusing provided in the embodiment of the present application, wherein (a) is the amplitude reconstruction result of the sample to be tested after autofocusing, (b) is a local magnified view of the line pair area of ​​1-3 groups in (a), (c) is the amplitude reconstruction result of the illumination probe after autofocusing, and (d) is the phase reconstruction result of the illumination probe after autofocusing. The initial axial distance between the sample to be tested and the detector target surface is set to 55 mm, a random matrix is ​​used as the initial guess of the sample to be tested, and a circular spot with an intensity of 1 is used as the initial guess of the illumination probe. The above-mentioned stacked diffraction imaging autofocusing algorithm is iterated 400 times, and the simulation results are as follows: Figure 6 From the simulation results, it can be seen that the reconstructed sample to be tested is very clear and there is no ghosting in the reconstruction result.

[0148] Figure 7 The axial distance convergence curve of the sample under different initial axial distance values ​​provided in the embodiment of the present application. The initial axial distance between the sample to be tested and the detector target surface is set to 45, 47.5, 49, 51, 52.5, and 55 mm respectively. A random matrix is ​​used as the initial guess of the sample to be tested, and a circular spot with an intensity of 1 is used as the initial guess of the illumination probe. The above-mentioned stacked diffraction imaging automatic focusing algorithm is iterated 400 times, and the axial distance calibration curve under different initial axial distances is recorded. It can be seen from the curve that under different initial axial distances, after 190 iterations of the focusing algorithm, the axial distance converges to 50±0.005 mm.

[0149] Simulation results show that without autofocus, the size of a single pixel on the detector target surface does not correspond correctly to the size of a single pixel in the sample matrix. This causes the sample reconstructed by the stacked diffraction imaging algorithm to be scaled and blurred, and even to produce ghosting, which reduces the system's resolution. After focusing using the autofocus algorithm, the axial distance is calibrated to near the true value, eliminating ghosting and making the reconstruction result clearer. Figure 7 It is shown that for an initial axial distance error of up to 5 mm, the coherent diffraction imaging autofocusing method proposed in this application can quickly converge to the true value, demonstrating its strong robustness to the initial axial distance error.

[0150] It is understandable that the detailed functional implementation of each of the above units / modules can be found in the introduction of the aforementioned method embodiment, and will not be repeated here.

[0151] It should be understood that the above-mentioned device is used to execute the method in the above-mentioned embodiment. The implementation principle and technical effect of the corresponding program module in the device are similar to those described in the above-mentioned method. The working process of the device can refer to the corresponding process in the above-mentioned method and will not be repeated here.

[0152] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.

[0153] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.

[0154] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0155] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC.

[0156] The above embodiments can be implemented in whole or in part through software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, the computer program instructions fully or partially produce the processes or functions described in the embodiments of this application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive (SSD)).

[0157] It will be understood that the various numerical numbers involved in the embodiments of the present application are merely distinctions for the convenience of description and are not intended to limit the scope of the embodiments of the present application.

[0158] It is easy for those skilled in the art to understand that the above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A coherent diffraction imaging autofocus method, characterized in that: include: S1. Obtain the axial distance to be calibrated and the reconstructed sample and illumination probe at this distance; S2. Using the near-field propagation model, propagate the reconstructed test sample at the current axial distance over several distances to obtain simulated test samples at different calibration positions; S3. Perform wavelet transform on each simulated sample to be tested to obtain corresponding wavelet coefficients, wherein the wavelet coefficients include approximation coefficients, horizontal detail coefficients, vertical detail coefficients and diagonal detail coefficients; S4. Calculate the variance of the wavelet coefficients of each simulated sample to be tested and sum them to obtain the corresponding clarity; S5. Using the clarity of all simulated test samples as weights, weighted update of the current axial distance, and update of the reconstructed test sample and illumination probe at the current axial distance; S6. Repeat S2-S5 until the current axial distance approaches the actual value of the axial distance, and use the current axial distance as the calibrated axial distance to achieve automatic focusing of the coherent diffraction imaging, while obtaining a clear reconstruction of the sample to be measured and the illumination probe after calibration; The calculation formula for weighted updating of the current axial distance is as follows: in, Indicates the updated axial distance, Indicates the axial distance to be calibrated, Indicates the axial distance before updating, Indicates the current axial distance update step, Indicates the axial distance update step obtained in the last iteration, Indicates the axial distance update step damping coefficient, Indicates the The propagation distance, Indicates the The calibration position simulates the clarity of the image of the sample to be tested. , is the number of calibration positions; The update of the reconstructed sample to be tested and the illumination probe at the current axial distance is specifically as follows: (1) Using the current axial distance, calculate the new sample single pixel size: in, Indicates the single pixel size of the sample, Indicates the wavelength of the light source used, Indicates the updated axial distance, Indicates the size of the detector target surface; (2) Using the single pixel size as a ratio and according to the characteristics of the coherent diffraction imaging system used, the actual scanning position coordinates are converted into discrete scanning position coordinates; (3) Substitute the discrete scanning position coordinates in the new sample matrix into the coherent diffraction imaging algorithm and iterate several times to obtain the reconstructed sample to be measured and the illumination probe at the current axial distance.

2. The automatic focusing method according to claim 1, wherein: Step S2 is specifically as follows: S21. Obtain the current axial distance and calibration step, set multiple calibration positions along the axial direction with the current axial distance as the center according to the calibration step, and obtain the propagation distance of each calibration position relative to the center point; S22. Use the near-field propagation model to propagate the sample to be tested reconstructed at the current axial distance to different distances to simulate the sample to be tested reconstructed by the coherent diffraction imaging algorithm at different calibration positions.

3. The automatic focusing method according to claim 2, wherein: The calibration step is an integer multiple of the depth of field of the coherent diffraction system.

4. The automatic focusing method according to claim 1, wherein: Step S3 is as follows: in, 、 、 and Respectively represent The calibration positions simulate the approximate coefficient matrix, horizontal detail coefficient matrix, vertical detail coefficient matrix and diagonal detail coefficient matrix of the sample image to be tested, dwt2 represents the two-dimensional discrete wavelet transform function, Indicates the The calibration position simulates the image of the sample to be tested, , is the number of calibration positions.

5. The automatic focusing method according to claim 1, wherein: The calculation formula of the clarity is as follows: in, Indicates the The calibration position simulates the clarity of the image of the sample to be tested. Represents the detail coefficient weight of the direction corresponding to the matrix B, represents the square of the Euclidean norm, Represents the mean of each element of matrix B, matrix B belongs to the The horizontal detail coefficient matrix, vertical detail coefficient matrix and diagonal detail coefficient matrix of the sample image to be tested are simulated at each calibration position. 、 、 and Respectively represent The approximate coefficient matrix, horizontal detail coefficient matrix, vertical detail coefficient matrix and diagonal detail coefficient matrix of the sample image to be tested are simulated at each calibration position. , is the number of calibration positions.

6. The automatic focusing method according to claim 1, wherein: The propagation model in the coherent diffraction imaging algorithm is the same as or different from the near-field propagation model.

7. The automatic focusing method according to any one of claims 1 to 6, wherein: The coherent diffraction imaging system is a transmission coherent diffraction imaging system or a reflection coherent diffraction imaging system.

8. A coherent diffraction imaging autofocus system, characterized in that: comprising at least one processor and at least one memory; The at least one memory is for storing computer instructions; The at least one processor is configured to execute at least part of the computer instructions to implement the automatic focusing method according to any one of claims 1 to 7.