A single-frame autofocusing method for a lensless microscopic imaging system
By utilizing a single-wavelength light source and the angular spectrum propagation formula in a lensless microscopy system, light field distributions with different defocus distances are generated. By combining subtraction and multiple differentiation, the problem of fast and accurate single-frame focusing in lensless microscopy is solved, improving focusing accuracy and speed.
Patent Information
- Application Number
- CN202411441012.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-10-16
AI Technical Summary
Existing lensless microscopy techniques struggle to quickly and accurately determine the focal plane in a single-frame image. Traditional methods rely on edge detection factors or data consistency and are easily affected by noise and illumination changes, resulting in low focusing accuracy.
The sample is illuminated by a single wavelength light source. The light field distribution with different defocus distances is generated within the estimated defocus range using the angular spectrum propagation formula. The complex amplitude modulus of the light field is calculated by subtraction, squaring, and multiple differentiations to determine the final defocus distance.
This invention enables fast and accurate focusing in a single frame in a lensless microscopy system, reduces system complexity, avoids the problem of edge detection factor selection and dependence on multi-frame data, and improves focusing accuracy and speed.
Smart Images

Figure CN119291908B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a self-focusing method in lens-free microscopic imaging, and in particular to a self-focusing method based on single-frame images. BACKGROUND
[0002] With the development of modern science and technology, optical microscopic imaging technology plays an increasingly important role in the fields of biomedical science, material science, microelectronics, etc. Traditional microscopes rely on optical lenses for magnification and focusing, and through complex optical design, high-resolution and high-magnification microscopic images are obtained. However, traditional optical microscopic systems have limitations such as large size, high cost, and complex structure, especially in terms of portability and miniaturization applications.
[0003] In order to solve these problems, lens-free imaging technology has emerged. Lens-free imaging systems do not rely on lens components, but directly record the light field information of the object through principles such as diffraction / scattering of light, and use computational algorithms to restore the microscopic image of the object. Lens-free imaging not only simplifies the optical system and reduces costs, but also enables high-resolution imaging of a larger field of view. In particular, in fields such as medical testing, food safety, and environmental monitoring that require portable devices, lens-free imaging has broad application prospects. However, in the practical application of lens-free imaging technology, how to accurately achieve automatic focusing of the sample is an important problem. Traditional microscopic imaging systems rely on manual or automatic adjustment of the distance between the objective lens and the sample to achieve precise focusing, but this approach is not suitable for lens-free imaging systems. Since lens-free systems do not contain traditional imaging lenses, the light field information of the sample is recorded in the form of a diffraction image on the imaging sensor, resulting in significant differences in images at different defocus planes. Therefore, finding an efficient and accurate focusing method suitable for lens-free imaging has become one of the research hotspots.
[0004] Currently, the autofocusing methods in lens-free microscopic imaging can be roughly divided into two categories according to the number of images collected: multi-frame image-based focusing methods and single-frame image-based focusing methods. The multi-frame image-based focusing method needs to collect multiple images under different parameters, for example, multiple images under different wavelengths of illumination, and gradually adjust the focusing plane through the wavelength-dependent reconstruction algorithm, so that the imaging results of all wavelengths are optimally focused on a certain plane. However, the multi-frame focusing method has some significant shortcomings. First, the multiple image collection process under different channels increases the complexity and time cost of the method, especially in the context of real-time imaging, which cannot meet the demand for efficient and fast. Second, calculating the consistency of the reconstruction data under different channels increases the data processing time. The single-frame image-based focusing method generally uses a sharpness discriminant factor to estimate the focusing plane, which relies on image contrast, gradient and other information, and is easily affected by noise, light changes and other factors, resulting in low focusing accuracy. In addition, due to the existence of conjugate images in the lens-free imaging system, these conjugate images often interfere with the calculation of the sharpness discriminant factor, further reducing the focusing effect.
[0005] Therefore, how to quickly and accurately determine the focusing plane with as little data as possible (i.e. in the case of a single frame) without relying on traditional edge detection factors or data consistency is an important challenge faced by lens-free microscopic imaging technology. SUMMARY
[0006] The present application aims to provide a single-frame autofocusing method for a lens-free microscopic imaging system, which can accurately obtain the reconstruction distance in lens-free single-frame microscopic imaging.
[0007] The technical scheme of the present application is as follows: A single-frame autofocusing method for a lens-free microscopic imaging system, comprising:
[0008] Step 1: Use a single-wavelength light source to illuminate the sample and collect a single-frame diffraction light intensity distribution I of the sample;
[0009] Step 2: Estimate the out-of-focus range of the imaging system, and use the angular spectrum propagation formula to back-propagate the collected light intensity distribution I in the range to generate light field distributions at different out-of-focus distances;
[0010] Step 3: The modulus of the complex amplitude of the light field on the different out-of-focus planes generated by back-propagation is subtracted from the square root of the collected light intensity distribution I and then squared;
[0011] Step 4: Sum the elements of each matrix obtained by squaring in step 3 and then take the derivative twice to obtain the maximum value in the curve distribution, and the corresponding out-of-focus distance is the final out-of-focus distance.
[0012] Further, the step 2 comprises the following specific steps:
[0013] The defocus distance range is z1~z m The defocus distance range is z1~z m The defocus distance range is z1~z 1 The defocus distance range is z1~z n , n=floor[(z m -z1) / step]+1, floor represents down-taking, and the step length step is in the range of 0.1 μm~5 μm.
[0014] Further, the step 3 includes the following specific steps:
[0015] Step 3.1: The modulus values |U 1 |~|U n | of the light field distribution U 1 |~U n | obtained in step 2 are taken respectively.
[0016] Step 3.2: The values after taking the modulus values are subtracted from the square roots of the collected light intensity distribution, and are sequentially recorded as
[0017] Step 3.3: The values obtained in 3.2 are squared, and the obtained values are sequentially recorded as D 1 ~D n .
[0018] Further, the step 4 includes the following specific steps:
[0019] Step 4.1: The sum of each element in the D 1 ~D n matrix obtained in step 3 is calculated, and the obtained values are sequentially recorded as ∑∑D 1 ~∑∑D n .
[0020] Step 4.2: The first derivative of ∑∑D 1 ~∑∑D n is calculated respectively, and the derivative results are sequentially recorded as ∑∑D' 1 ~∑∑D' n-1 .
[0021] Step 4.3: The second derivative of ∑∑D' 1 ~∑∑D' n-1 is calculated respectively, and the derivative results are sequentially recorded as ∑∑D” 1 ~∑∑D” n-2 .
[0022] Step 4.4: The ∑∑D” 1 ~∑∑D”n-2 Taking modulus, sequentially recorded as |∑∑D 1 |~|∑∑D n-2 |;
[0023] Step 4.5: |∑∑D 1 |~|∑∑D n-2 |The sequence number corresponding to the maximum value in z1+(k+1)×step is k, and then the final defocus distance is z1+(k+1)×step.
[0024] Beneficial effects: the present application firstly uses a single wavelength light source to irradiate a sample, collects the light intensity distribution under the wavelength, then uses the angular spectrum propagation formula to back-propagate the collected light intensity graph (the square root of the light intensity graph value, that is, the complex amplitude), generates the light field distribution of different defocus surfaces within the estimated defocus distance range, then subtracts the square root of the collected light intensity distribution from the light field complex amplitude modulus value of different defocus surfaces, then squares, then sums all pixel values in each matrix obtained by squaring, finally each defocus surface corresponds to a summation value, and the corresponding values on all defocus surfaces form a one-dimensional matrix (that is, a discrete one-dimensional function) together. The one-dimensional matrix is subjected to second-order derivation, the curve distribution after derivation is subjected to modulus value, and the defocus distance corresponding to the maximum value in the finally obtained curve distribution is the final result.
[0025] Compared with the prior art, the present application has the following significant advantages: 1. The method can avoid the selection problem of maximum / minimum value required when using edge detection factor to determine the focusing surface of different types of samples. 2. The method can avoid multiple frame data required by the data consistency method, thereby reducing the complexity of the system. 3. The method has more advantages in terms of application range and calculation efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1 It is a schematic diagram of the basic structure of the system suitable for the present application;
[0027] Figure 2 It is a flowchart of the method of the present application;
[0028] Figure 3 It is the distribution of intensity / phase object focusing / defocusing distance, wherein (a) is the light intensity distribution of an intensity object, (b) is the image distribution collected at Z2=800μm when the wavelength is λ=516μm, (c) is the phase distribution of a phase object, and (d) is the image distribution collected at Z2=800μm when the wavelength is λ=516μm;
[0029] Figure 4 It is ∑∑D n The curve relationship between the sequence number n and the normalization, wherein (a) is Figure 3 The ∑∑D corresponding to the intensity object shown in (a) ofn The normalized curve relationship between the index n and the index n is shown in (b). Figure 3 The phase object shown in (c) corresponds to ∑∑D n The normalized curve relationship between the index n and the index n;
[0030] Figure 5 For ∑∑D' n-1 The normalized curve relationship between the index n and the index n, where (a) is Figure 3 The intensity of the object shown in (a) corresponds to ∑∑D' n-1 The normalized curve relationship between the index n and the index n is shown in (b). Figure 3 The phase object shown in (c) corresponds to ∑∑D' n-1 The normalized curve relationship between the index n and the index n;
[0031] Figure 6 For |∑∑D” n-2 The curve relationship between | and the sequence number n, where (a) is Figure 3 The intensity of the object shown in (a) corresponds to |∑∑D”. n-2 The normalized curve relationship between | and the sequence number n, (b) is Figure 3 The phase of the object shown in (c) corresponds to |∑∑D”. n-2 | The normalized curve relationship between the sequence number n and the index n. Detailed Implementation
[0032] The invention will now be further explained with reference to the accompanying drawings.
[0033] A single-frame autofocusing method for a lensless microscopy imaging system is disclosed. This method is applicable to lensless microscopy imaging systems, whose basic structure consists of three parts: a partially coherent or coherent light source (monochromatic), a sample, and an image sensor. Based on this invention, the monochromatic light source serves as the illumination source for the lensless microscope, and it is directly positioned above the sample. Furthermore, the light emission center of the light source is located on the optical axis of the entire imaging system.
[0034] like Figure 1 As shown, the distance Z1 between the monochromatic light source and the upper surface of the sample in a lensless microscopy system is generally between 5 and 20 cm, and the distance Z2 between the image sensor of the camera and the sample is generally between 1 μm and 2 mm. If the spatial coherence of the monochromatic light source is relatively poor, i.e., the luminous area of the light source is relatively large, the value of Z1 / Z2 can be increased to improve the spatial coherence of the light source. Based on this, determining the defocus distance during the entire imaging reconstruction process is the problem that this invention aims to solve.
[0035] The method of this invention can quickly and accurately determine the focal plane of an object using only a single frame of data without utilizing edge detection factors, such as... Figure 2As shown, a single-frame self-focusing method of a non-similarity-based lens-free microscopic imaging system of the present application includes the following steps:
[0036] Step 1: A single-wavelength light source is used to irradiate the sample to obtain a single-frame diffraction light intensity distribution of the sample at the wavelength.
[0037] Specifically, first, a spectrometer is used to measure the wavelength of the light source to obtain a wavelength of λ.
[0038] Second, a single-frame diffraction light intensity distribution of the sample under irradiation at the wavelength is obtained. For non-contact lens-free imaging, the entire imaging process can be regarded as the interference of the scattered light of the sample to be measured and the light not modulated by the sample, and the light field carrying the object information is captured by the sensor after a certain distance of propagation. When the wavelength of the light source is λ, the diffraction light intensity distribution I of the sample can be obtained, I = I(x h ,y h ), (x h ,y h ) are the coordinates of the discretized image collected by the image sensor, and are positive integers. As shown, Figure 3 when the sample to be measured is an intensity object, the intensity distribution of the object on the focusing plane is shown in (a) of Figure 3 , and under irradiation of a light source with a wavelength of λ, the collected light intensity distribution I at the defocus distance Z2 is shown in (b) of Figure 3 . When the sample to be measured is a phase object, the phase distribution is shown in (c) of Figure 3 , and under irradiation of a light source with a wavelength of λ, the collected light intensity distribution I at the defocus distance Z2 is shown in (d) of Figure 3 . Here, the wavelength λ is 516 μm, and the defocus distance Z2 is 800 μm.
[0039] Step 2: The angular spectrum propagation formula is used to back-propagate the light intensity to generate the light field distribution on different defocus planes.
[0040] Considering that the data collected by the image sensor is discretized, the present application uses the angular spectrum propagation as the basic model for back-propagation to obtain the light field information on different defocus distance planes, and this model can maintain the image size unchanged during digital processing. The specific process is as follows: first, in the air medium, the free propagation frequency domain effect transfer function of the light with a wavelength of λ in the lens-free imaging system is:
[0041]
[0042] where (f x ,f y ) are the frequency domain coordinates corresponding to the spatial coordinates (x h ,y h ).
[0043] Secondly, such as Figure 3 As shown, the acquired image distribution I, carrying object information, is captured by the image sensor as light intensity information after propagating a distance of Z2. Therefore, the entire reconstruction process can be denoted as:
[0044]
[0045] in, This represents the Fourier transform.
[0046] Next, the defocus distance range of the imaging system is estimated to be Z2 = z1 ~ z m The defocus distance within this range is iterated using step as the step size. This is mainly because, in practice, due to the presence of surface glass or other materials on the image sensor surface, the actual distance between the object and the sensor is difficult to measure directly. Therefore, in this invention, Z2 needs to be estimated to a rough range based on the actual system setup and empirical values, which is generally 1μm to 2mm; step can be selected according to actual needs, and is generally selected to be within the range of 0.1μm to 5μm.
[0047] In this embodiment, z1 = 500 μm, z m =1000μm, step=1μm. Corresponding to the light intensity distribution I, the light field distribution U at n defocus positions can be obtained. 1 ~U n n = floor[(z m -z1) / step]+1, floor represents rounding down:
[0048]
[0049] Step 3: Subtract the square root of the complex amplitude modulus of the light field on different defocus surfaces generated from the square root of the collected light intensity distribution.
[0050] Considering that the light field U has already been calculated in step two 1 ~U n Then, by taking the modulo value of each of them, we can obtain |U 1 |~|U n |;Then |U 1 |~|U n |The square root of the collected light intensity distribution Subtract them in order: Finally, the calculated value is squared, and the results are denoted as D. 1 ~D n ,in,
[0051] Step four: summing up each element of the matrix obtained in step three, and then taking the second derivative, the defocus distance corresponding to the maximum value in the curve distribution is the final result.
[0052] Specifically, summing up each element of the matrix D 1 ~D n obtained in step three, denoted as ∑∑D 1 ~∑∑D n :
[0053]
[0054] wherein M and N are the horizontal and vertical pixel numbers of the discretized image collected by the image sensor, and are positive integers.
[0055] ∑∑D 1 ~∑∑D n is a set of discrete data related to n, Figure 4 (a) and Figure 4 (b) of D Figure 3 (a) and a phase distribution as shown in Figure 3 (c) correspond to ∑∑D 1 ~∑∑D n . Taking the first derivative of this set of data, a corresponding set of derivatives can be obtained, denoted as ∑∑D' 1 ~∑∑D' n-1 , as shown in Figure 5 . Figure 5 (a) is an intensity distribution as shown in Figure 3 (a) of D n-1 corresponds to the normalized ∑∑D' n-1 and the sequence number n; Figure 5 (b) is a phase distribution as shown in Figure 3 (c) of D 1 corresponds to the normalized ∑∑D' n-1 and the sequence number n.
[0056] Then, taking the derivative of the set of data ∑∑D' 1 ~∑∑D" n-2 , a set of data ∑∑D" 1 ~∑∑D" n-2 can be obtained. Taking the modulus of this set of data, denoted as |∑∑D" 1 |~|∑∑D" n-2 |, the corresponding curve of this set of data is shown in Figure 6 . Figure 6 (a) is an intensity distribution as shown in Figure 3(a) corresponds to the normalized |∑∑D” n-2 |The curve relationship between the sequence number n; Figure 6 (b) is a phase distribution such as Figure 3 (c) corresponds to the normalized |∑∑D” n-2 |The curve relationship between the sequence number n.
[0057] Finally, select |∑∑D” 1 |~|∑∑D” n-2 The maximum value in | corresponds to the index, such as when index n = k, |∑∑D” k If | is the maximum value, then z1 + (k + 1) × step is the final defocus distance. This corresponds to an intensity distribution such as... Figure 3 (a), combined Figure 6 (a), corresponding to the sequence number n=299, i.e. k=299, |∑∑D” k If | is the maximum value, then the final defocus distance is z1 + (k + 1) × step = 500 + 300 × 1 = 800 μm. This corresponds to a phase distribution such as Figure 3 (c), combined Figure 6 (b), corresponding to the sequence number n=299, i.e. k=299, |∑∑D” k If | is the maximum value, then the final defocus distance is z1+(k+1)×step=500+300×1=800μm.
[0058] This invention can reduce the dependence on sharpness discrimination factors in traditional lensless microscopy single-frame refocusing, avoid the influence of conjugate images on the accuracy of defocus distance search, and make full use of the dissimilarity between diffraction patterns and focus patterns, thereby effectively improving the accuracy and speed of refocusing.
[0059] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A single-frame autofocusing method for a lensless microscopic imaging system, characterized in that, The application relates to a method for measuring the off-focus distance of a sample, comprising the following steps: Step 1: irradiating the sample with a single-wavelength light source, and collecting a single frame of diffraction light intensity distribution I of the sample; Step 2: estimating the off-focus range of the imaging system, and inversely propagating the collected light intensity distribution I in the range by using an angular spectrum propagation formula to generate light field distribution at different off-focus distances; Step 3: back-propagating the modulus of the complex amplitude of the generated light field on different defocusing planes to the square root of the collected light intensity distribution Subtracting first and squaring second Step 4: performing element summation on each matrix obtained in step 3, and then performing derivation twice to obtain the off-focus distance corresponding to the maximum value in the curve distribution, which is the final off-focus distance; The step 2 comprises the following specific steps: The estimated defocus distance range is z1~z m The defocus distance in z1~z m is traversed by step, and the collected light intensity distribution I is back propagated by using an angular spectrum propagation formula to generate light field distribution U at different distances 1 ~U n , n=floor[(z m -z1) / step]+1, floor represents down taking, and the value range of the step length step is 0.1 μm~5 μm; The step 3 comprises the following specific steps: Step 3.1: Taking the modulus of the light field distribution U 1 ~U n |U 1 |~|U n |; Step 3.2: Subtract the demolded value from the square root of the collected light intensity distribution, sequentially recorded as Step 3.3: Square each value obtained from step 3.2, and let the results be denoted as D 1 ~ D n ; The step 4 comprises the following specific steps: Step 4.1: Summation of D 1 ~ D n Each element in the matrix is summed, and the result is denoted sequentially as ∑∑D 1 ~ ∑∑D n ; Step 4.2: ∑∑D 1 ∑∑D n First, take the derivative, and the result is denoted as ∑∑D' 1 ∑∑D' n-1 ; Step 4.3: Take the derivative of ∑∑D' with respect to x, respectively, and denote the result as ∑∑D" 1 ~ ∑∑D" n-1 Take the derivative again, and denote the result as ∑∑D""" 1 ~ ∑∑D""" n-2 ; Step 4.4: ~∑∑D 1 ~∑∑D n-2 Taking the modulus, sequentially denoted as |∑∑D 1 |~|∑∑D n-2 |; Step 4.5: |∑∑D” 1 |∑∑D” n-2 |The sequence number corresponding to the maximum value in the middle is recorded as k, and z1+(k+1) x step is the final defocus distance.
Citation Information
Patent Citations
Lens-free microscope based on LED light source and image reconstruction method of microscope
CN105182514A
Automatic focusing method for digital holographic imaging, electronic equipment and medium
CN116719147A
Lensless self-focusing method based on dual wavelengths
CN117784386A