A multi-mode calibration method for encoding element modulation functions
By combining multi-distance and dual-wavelength phase recovery calibration modes with filtering priors and regular constraints, the triple contradiction of accuracy, efficiency and adaptability in the calibration method of modulation function of coding element is solved. This achieves high-precision calibration of amplitude and phase coding boards, adapts to different scenario requirements, is compatible with conventional optical devices, and is easy to implement in engineering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HARBIN INST OF TECH
- Filing Date
- 2026-01-28
- Publication Date
- 2026-06-12
Smart Images

Figure CN122192703A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lensless computational microscopy imaging technology, and in particular to a multi-mode calibration method for the modulation function of an encoding element. Background Technology
[0002] In the field of lensless computational microscopy, encoding elements (such as amplitude encoding plates and phase encoding plates) are the core devices for realizing single-frame coherent diffraction imaging. They provide known constraints for subsequent phase retrieval algorithms by randomly modulating the sample's diffraction field, effectively solving the local optimum problem caused by phase singularities in traditional lensless imaging. The calibration accuracy of the encoding element's modulation function (i.e., amplitude transmission law or phase delay law) directly determines the accuracy of the sample's complex amplitude reconstruction. Therefore, how to efficiently and accurately calibrate the encoding element's modulation function has become a crucial prerequisite for the practical application of lensless computational microscopy systems.
[0003] Currently, mainstream coding element modulation function calibration methods are mainly divided into three categories, but all of them have significant technical defects and cannot meet the requirements of "high precision", "high efficiency" and "multi-scenario adaptability". The first category is the calibration method based on multi-distance phase recovery. It uses a one-dimensional electric displacement stage to drive the image sensor to move along the optical axis, and acquires multiple frames of axial diffraction intensity images at fixed intervals. The coding function is then inverted by combining total variation constraints and guided filtering. While this method has significant advantages—it can be adapted to both amplitude encoding boards (2.5μm-40μm light-transmitting pixels) and phase encoding boards (10μm light-transmitting pixels) and has high reconstruction accuracy (2.5μm pixel encoding board amplitude reconstruction SSIM≥0.95, phase binarization error≤0.05π)—it is cumbersome and inefficient. On the one hand, it relies on a mechanical scanning structure, and the multi-frame image acquisition process is time-consuming, increasing the time consumption by more than 90% for many exposure-based methods. On the other hand, the existing technology does not clearly define the minimum number of axial samplings to guarantee calibration accuracy. In practical applications, if the number of samplings is too high (e.g., N>11), it will cause stage loss and data redundancy. If the number of samplings is too low (e.g., N<7), it will lead to distortion of the encoding function reconstruction and even make it impossible to distinguish the "0 / 1" binary distribution structure of the amplitude encoding board.
[0004] The second category is calibration methods based on dual-wavelength or single-exposure (such as the SA algorithm, PA algorithm, and MWPR-TV algorithm). Their core advantage lies in eliminating the need for mechanical scanning—the coding element is simultaneously illuminated by dual-wavelength light sources (such as 635nm and 405nm fiber lasers), and diffraction images are acquired using a color image sensor with single exposure, and wavelength channels are split. Alternatively, sparse constraint inversion can be performed directly based on a single frame intensity image, significantly improving calibration efficiency. However, these methods have serious limitations in terms of applicability and accuracy: First, they are only suitable for amplitude coding boards and cannot be used for phase coding board calibration (because phase coding boards require etching for specific wavelengths, multi-wavelength illumination will disrupt their phase delay characteristics, leading to digital focusing and reconstruction failure); second, the algorithms have poor convergence performance. Existing methods often rely on simple alternating projection or a single total variation constraint, which easily leads to convergence hysteresis—for example, the noise intensity of the reconstructed image from the SA and PA algorithms is ≥0.05. Even with regularization introduced in the MWPR-TV algorithm, residual noise remains, making it difficult to accurately extract the binary transmission characteristics of the amplitude coding board, resulting in a large deviation between the coding function and the actual value.
[0005] The third type is the calibration method based on single-frame sparse constraints (such as the SrPR algorithm). It utilizes the sparse property of the amplitude encoder plate, which is "neither transparent nor blocked," to achieve single-frame reconstruction through L1 regularization and image filtering. However, this method has poor adaptability: it not only supports amplitude encoder plates, but is also extremely sensitive to the pixel size of the encoder plate. When the light-transmitting pixels of the amplitude encoder plate are ≤5μm, the sparse constraints are prone to overfitting, resulting in the inability to eliminate background noise in the "0" value region, or even resolution loss, which cannot meet the requirements of high-precision calibration.
[0006] In summary, existing modulation function calibration techniques for coding elements are caught in a triple dilemma of "accuracy, efficiency, and adaptability": multi-distance methods offer high accuracy but are inefficient and cumbersome to operate; dual-wavelength and single-frame methods are efficient but lack accuracy and have a narrow range of applications. Neither can meet the calibration needs of different scenarios—it struggles to meet the "high-precision priority" requirements of laboratory precision measurements, nor the "high-efficiency priority" requirements of industrial field testing, and it cannot cover the calibration scenarios of phase-encoding plates and small-pixel amplitude-encoding plates. This technological limitation directly makes modulation function calibration for coding elements a bottleneck for improving the performance of lensless computational microscopy imaging systems, severely restricting the practical application of this technology in fields such as biological slice observation and micro / nano structure detection. Summary of the Invention
[0007] This invention proposes a multi-mode calibration method for the modulation function of a coding element. By selecting a multi-distance phase recovery calibration mode or a dual-wavelength phase recovery calibration mode according to the type of coding element to be calibrated and the calibration requirements, and combining filtering prior and regular constraint inversion of the complex amplitude modulation function, this method solves the problem in the prior art that coding element calibration is difficult to achieve in a balance of "high precision, high efficiency and multi-scenario adaptability".
[0008] A multi-mode calibration method for the modulation function of a coding element includes the following steps: S1. Select the calibration mode according to the type of the encoding element to be calibrated and the calibration requirements. The calibration mode includes multi-distance phase recovery calibration mode and dual-wavelength phase recovery calibration mode. S2. If the multi-distance phase recovery calibration mode is selected, the image sensor is controlled to move along the optical axis under the unloaded state of the sample to acquire multiple frames of diffraction intensity images of the coding element to be calibrated at different axial distances. If the dual-wavelength phase recovery calibration mode is selected, the coding element to be calibrated is simultaneously illuminated by two coherent light sources of different wavelengths under the unloaded state of the sample. A single frame of color diffraction intensity image is acquired by the image sensor and split to obtain diffraction intensity images corresponding to the two wavelengths. S3. Input the diffraction intensity image acquired in S2 into the corresponding phase recovery algorithm, and perform iterative calculations by combining filtering priors and regularization constraints to invert and obtain the complex amplitude modulation function of the coding element to be calibrated. S4. Output the complex amplitude modulation function to complete the calibration of the modulation function of the encoding element.
[0009] Furthermore, in S2, if the multi-distance phase retrieval calibration mode is selected, the acquisition of multiple frames of diffraction intensity images of the encoding element to be calibrated at different axial distances includes: A fiber laser with a wavelength of 532nm is used as a coherent light source. The output beam of the fiber laser is formed into a parallel beam after passing through a pinhole and a cemented doublet lens with a focal length of 200mm, which illuminates the coding element to be calibrated. The CMOS image sensor module with its outer casing removed is mounted on a one-dimensional stepper motor displacement stage. The CMOS image sensor module is moved along the optical axis with an axial sampling interval of 0.5 mm to acquire N diffraction intensity images of the encoding element to be calibrated, which are recorded as the diffraction intensity image at the nth acquisition distance (n=1,2,…,N). The corresponding phase retrieval algorithm is the multi-distance phase retrieval algorithm MDPR-PnP based on plug-and-play priors, and its optimization model is as follows:
[0010] in, Indicates the first j The estimated value of the encoding function under the next iteration. n Represents the location index in multi-distance acquisition. N The total number of multi-distance intensity images acquired. The first time when the sample is unloaded n Each collection distance ( The diffraction intensity image of the coding element under ) Denotes the total variation priors, is the corresponding regularization coefficient.
[0011] Furthermore, in S2, the total number of the multi-frame diffraction intensity images N≥7; when N<7, the iterative calculation is stopped and the multi-frame diffraction intensity images are reacquired until N≥7.
[0012] Furthermore, in S2, if the dual-wavelength phase retrieval calibration mode is selected, the step of simultaneously illuminating the coding element to be calibrated with two coherent light sources of different wavelengths, acquiring a single-frame color diffraction intensity image through an image sensor, and splitting it to obtain diffraction intensity images corresponding to the two wavelengths includes: Two fiber lasers with wavelengths of 635nm and 405nm are used as coherent light sources, and the spherical waves emitted by the two fiber lasers directly illuminate the coding element to be calibrated. The CMOS image sensor module with its outer casing removed is placed close to the rear end of the encoding element to be calibrated, and a single frame of color diffraction intensity image is acquired. Extract the two color channels of the color diffraction intensity image, and use them as the diffraction intensity images corresponding to wavelengths of 635nm and 405nm, respectively. The corresponding phase retrieval algorithm is the Dual Wavelength Phase Retrieval (DWPR) algorithm. The following two formulas correspond to the optimization models for single-wavelength data of the two color channels, respectively, and each single-wavelength image data is optimized independently:
[0013]
[0014] Then, information fusion is performed using the following formula to form a new wavefront estimate:
[0015] in, and These are the wavelengths corresponding to two coherent light sources. and They represent wavelengths of and The forward diffraction transmission operator at that time, the above equation passes the data from the two channels through the contrast matrix ( c ), structure matrix ( s ) and brightness matrix ( l The integration is carried out in a manner that allows for fusion.
[0016] Furthermore, in S3, the iterative calculation combining the filtering prior and regularization constraints includes: The iterative formula for the MDPR-PnP algorithm is:
[0017] In the above formula, The gradient operator is expressed as follows: , x and y It is an image spatial index. N x and N y yes x and y Total number of pixels in the direction.
[0018] Furthermore, the forward and reverse diffraction transport operators used in dual-wavelength phase retrieval can be expressed in the following form:
[0019] The optimization model for single-wavelength data in two color channels can be solved distributedly as follows:
[0020] Furthermore, according to the SPD model, the contrast matrix during dual-wavelength data fusion ( c ), structure matrix ( s ) and brightness matrix ( l It can be defined as follows:
[0021]
[0022] In the above formula, max and min represent selecting the maximum and minimum values, respectively, and the operator... and These represent the mean and L2 norm of the matrix, respectively, and their specific calculation processes are shown below:
[0023]
[0024] Combining the above formulas, the final iterative expression of the new wavefront estimation formula can be written in the following form: .
[0025] Furthermore, in S3, after information fusion is completed, a TNRD filter based on a nonlinear diffusion model is used to estimate the fused wavefront value. The TNRD filter is set to a variance of 0.00003 for noise reduction processing. The encoding element to be calibrated is an amplitude encoding board, and the minimum light-transmitting pixel size of the amplitude encoding board is 10μm; After denoising, the complex amplitude modulation function of the amplitude encoder board to be calibrated is output.
[0026] A storage medium storing a computer program, which, when executed by a processor, implements the multi-mode calibration method for the modulation function of the coded element described above.
[0027] A computer device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the multi-mode calibration method for the modulation function of the coded element described above.
[0028] The beneficial effects of this invention: The multi-mode calibration method for the modulation function of the coding element proposed in this invention has the core advantage of completely solving the triple contradiction of "accuracy-efficiency-adaptability" in existing calibration technologies through the synergistic design of "multi-distance phase retrieval calibration" and "dual-wavelength phase retrieval calibration". On the one hand, the multi-distance calibration mode relies on the multi-distance phase retrieval algorithm (MDPR-PnP) based on plug-and-play priors and the optimized setting of axial sampling number N≥7, which can adapt to both amplitude coding boards with light transmission pixels of 2.5μm-40μm and phase coding boards with light transmission pixels of 10μm. The core coding element enables high-precision calibration. The 2.5μm pixel amplitude coding board achieves a structural similarity (SSIM) of ≥0.95 for amplitude reconstruction, while the phase coding board has a phase binarization error ≤0.05π. This meets the high-precision calibration requirements of laboratory precision measurements and high-resolution imaging, while avoiding distortion in the coding function reconstruction due to insufficient sampling or mechanical wear and data redundancy caused by excessive sampling. Furthermore, the dual-wavelength calibration mode utilizes simultaneous illumination from two fiber lasers with wavelengths of 635nm and 405nm, combined with the CMO (Central Motion Machine) with its casing removed. The S-type image sensor (1.85μm pixel size) acquires color diffraction images with single exposure and splits wavelength channels, completing data acquisition without mechanical scanning. This acquisition efficiency is higher than multi-distance calibration relying on mechanical movement. Furthermore, by fusing four modules of the Dual Wavelength Phase Retrieval (DWPR) algorithm—alternating projection, total variational constraint, structure block decomposition (SPD), and TNRD filtering—it effectively eliminates the convergence hysteresis and residual noise problems of traditional dual-wavelength algorithms (such as SA and PA algorithms). The TNRD filter, with a variance of 0.00003, can accurately extract the binary amplitude encoder. Its light transmission characteristics make it suitable for amplitude encoder calibration scenarios with high calibration efficiency requirements. In addition, the flexible selection of the two modes does not require adjustment of the core algorithm framework. Switching can be achieved simply by adapting the hardware parameters and data processing flow, which greatly improves the versatility of the method. At the same time, the devices used in the calibration process are all conventional optical devices—a 532nm fiber laser is used for multi-distance calibration, and 635nm and 405nm fiber lasers are used for dual-wavelength calibration. These are paired with a 1.85μm pixel CMOS image sensor and a one-dimensional stepper motorized displacement stage, without relying on special customized devices, making it easy to implement in engineering. Attached Figure Description
[0029] Figure 1 Here is a flowchart of the encoder calibration process based on multi-distance acquisition; Figure 2 The image shows the reconstruction result using the Multi-Distance Phase Retrieval Program (MDPR-PnP) algorithm with amplitude encoders of different pixel sizes. Figure 2(a1-e1) are the diffraction intensity images of amplitude encoding plates with pixel sizes of 2.5μm, 5μm, 10μm, 20μm and 40μm on the first axial observation plane; Figure 2 (a2-e2) is a magnified image of the blue area with a size of 200×200; Figure 2 (a3-e3) is the reconstructed amplitude diagram; Figure 2 (a4-e4) is Figure 2 A magnified view of (a3-e3); Figure 2 (a5-e5) is the reconstructed phase map; Figure 2 (a6-e6) is Figure 2 Enlarged view of (a5-e5); Figure 3 The image shows the reconstruction result of the multi-distance phase retrieval algorithm (MDPR-PnP) for the phase encoder board. Figure 3 (a1) is the diffraction pattern at the first axial position; Figure 3 (a2) is a diagram showing local details; Figure 3 (b) is the reconstructed amplitude diagram; Figure 3 (c) is the reconstructed phase map; Figure 4 The graph shows the convergence performance analysis of the multi-distance phase retrieval algorithm. Figure 4 (a) is a graph showing the relationship between SSIM values and the number of axial images; Figure 4 (b) Figure 4 (c) Figure 4 (d) and Figure 4 (e) respectively correspond to N =8、 N =7、 N =5、 N Reconstructed encoder plate amplitude image at =3; Figure 5 A flowchart for the calibration of an encoder board based on dual-wavelength multiplexed illumination; Figure 6 The figures show the ablation analysis results of each module of the dual-wavelength phase retrieval algorithm. Figure 6 (a) is the reconstructed amplitude image using AP; Figure 6 (b) is the reconstructed amplitude image using AP+TV; Figure 6 (c) is the reconstructed amplitude image using AP+TV+SPD; Figure 6 (d) is the reconstructed amplitude image using AP+TV+SPD+denoising; Figure 7 The image shows a comparison of reconstruction results from various dual-wavelength phase retrieval algorithms. Figure 7 (ac) represent the reconstruction results of the SA algorithm, PA algorithm, and PAWF algorithm without any prior constraints, respectively. Figure 7 (df) represent the reconstruction results of the MWPR-TV algorithm, PRIF algorithm, and DWPR algorithm, respectively. Detailed Implementation
[0030] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0031] A multi-mode calibration method for the modulation function of a coding element includes the following steps: S1. Select the calibration mode according to the type of the encoding element to be calibrated (amplitude encoding board or phase encoding board) and the calibration requirements (high precision or high efficiency). The calibration modes include multi-distance phase recovery calibration mode and dual-wavelength phase recovery calibration mode. S2. If the multi-distance phase recovery calibration mode is selected, the image sensor is controlled to move along the optical axis under the unloaded state of the sample to acquire multiple frames of diffraction intensity images of the coding element to be calibrated at different axial distances. If the dual-wavelength phase recovery calibration mode is selected, the coding element to be calibrated is simultaneously illuminated by two coherent light sources of different wavelengths under the unloaded state of the sample. A single frame of color diffraction intensity image is acquired by the image sensor and split to obtain diffraction intensity images corresponding to the two wavelengths. S3. Input the diffraction intensity image acquired in S2 into the corresponding phase recovery algorithm, and perform iterative calculations by combining filtering priors and regularization constraints to invert and obtain the complex amplitude modulation function of the coding element to be calibrated. S4. Output the complex amplitude modulation function to complete the calibration of the modulation function of the encoding element.
[0032] Specifically, the multi-mode calibration method for the modulation function of the coding element provided by this invention effectively solves the core problems of existing coding element calibration technologies, namely narrow applicability and difficulty in balancing accuracy and efficiency, by constructing a dual-mode selection mechanism of "multi-distance phase recovery calibration" and "dual-wavelength phase recovery calibration". This method can flexibly select the matching calibration mode according to the actual type of the coding element to be calibrated—whether it is an amplitude coding board with a light-transmitting pixel range of 2.5μm-40μm or a phase coding board with a light-transmitting pixel of 10μm—and the specific calibration requirements—whether it is the high precision required for laboratory precision measurement or the high efficiency required for industrial field testing. This avoids the limitation of existing single calibration methods that can only adapt to a certain type of coding element or a certain scenario. In the data acquisition stage, if the multi-distance phase retrieval calibration mode is selected, multiple frames of axial diffraction intensity images can be acquired by controlling the image sensor to move along the optical axis. Relying on the corresponding phase retrieval algorithm, high-precision calibration of the two types of coding elements, amplitude and phase, can be achieved, ensuring the accuracy of the coding function reconstruction. For example, the structural similarity (SSIM) of amplitude reconstruction for a 2.5μm pixel amplitude coding board can reach above 0.95, and the phase binarization error for the phase coding board can be controlled within 0.05π. If the dual-wavelength phase retrieval calibration mode is selected, mechanical scanning is not required. Data acquisition of the amplitude coding board can be completed by simultaneously illuminating and acquiring a single frame of color diffraction image using two coherent light sources of different wavelengths, which greatly improves the calibration efficiency and can effectively eliminate the convergence hysteresis problem of the traditional dual-wavelength algorithm through the corresponding phase retrieval algorithm. Based on this, by inputting the acquired diffraction intensity image into the corresponding phase recovery algorithm and performing iterative calculations in combination with filtering priors and regularization constraints, the complex amplitude modulation function of the element to be calibrated can be stably inverted. This provides a reliable coding constraint for the accurate reconstruction of the complex amplitude of the sample in the subsequent lensless computational microscopy imaging system, avoids imaging distortion caused by inaccurate coding function calibration, and ultimately strongly supports the practical application of lensless computational microscopy imaging technology in fields such as biological slice observation and micro / nano structure detection.
[0033] Furthermore, in S2, if the multi-distance phase retrieval calibration mode is selected, the acquisition of multiple frames of diffraction intensity images of the encoding element to be calibrated at different axial distances includes: A fiber laser with a wavelength of 532nm is used as a coherent light source. The output beam of the fiber laser is formed into a parallel beam after passing through a pinhole and a cemented doublet lens with a focal length of 200mm, which illuminates the coding element to be calibrated. The CMOS image sensor module with its outer casing removed is mounted on a one-dimensional stepper motor displacement stage. The CMOS image sensor module is moved along the optical axis with an axial sampling interval of 0.5 mm to acquire N diffraction intensity images of the encoding element to be calibrated, which are recorded as the diffraction intensity image at the nth acquisition distance (n=1,2,…,N). The corresponding phase retrieval algorithm is the multi-distance phase retrieval algorithm MDPR-PnP based on plug-and-play priors, and its optimization model is as follows:
[0034] in, Indicates the first j The estimated value of the encoding function under the next iteration. n Represents the location index in multi-distance acquisition. N The total number of multi-distance intensity images acquired. The first time when the sample is unloaded n Each collection distance ( The diffraction intensity image of the coding element under ) Denotes the total variation priors, is the corresponding regularization coefficient.
[0035] Specifically, in the multi-distance phase retrieval calibration mode, this invention provides reliable support for high-precision calibration of the modulation function of the coding element through a well-defined hardware configuration and algorithm model. Specifically, a 532nm fiber laser is used as the coherent light source, paired with a pinhole and a 200mm focal length doublet lens, which converts the output beam into a uniform parallel beam. This effectively avoids the problem of uneven illumination in different areas of the coding element caused by non-parallel light illumination, reducing calibration errors introduced by illumination differences. A CMOS image sensor module with its outer casing removed is mounted on a one-dimensional stepper motorized displacement stage. Multiple frames of diffraction intensity images are acquired at 0.5mm axial sampling intervals. This not only comprehensively captures the diffraction characteristics of the coding element at different axial positions through multi-distance data, but also ensures the consistency of the sampling interval through the stable movement of the displacement stage, avoiding errors caused by uneven intervals. The wavefront inversion bias is addressed by the Multi-Distance Phase Retrieval (MDPR-PnP) algorithm and its optimized model, which, by introducing a total variational prior term and corresponding regularization coefficients, can effectively constrain the estimation direction of the coding function during the iteration process, suppress noise interference, and ensure accurate inversion of the complex amplitude modulation function even when facing an amplitude coding board with a light-transmitting pixel size as small as 2.5 μm. It is also compatible with a phase coding board with a light-transmitting pixel size of 10 μm, avoiding the reconstruction distortion problem of existing multi-distance calibration methods on small pixel coding boards or phase coding boards. This provides high-precision coding constraints for subsequent lensless computational microscopy imaging systems and ensures the accuracy of sample complex amplitude reconstruction.
[0036] Furthermore, in S2, the total number of the multi-frame diffraction intensity images N≥7; when N<7, the iterative calculation is stopped and the multi-frame diffraction intensity images are reacquired until N≥7.
[0037] Specifically, in the multi-distance phase recovery calibration mode, this invention explicitly limits the total number of acquired multi-frame diffraction intensity images, N≥7, and stops iterative calculation and re-acquires when N<7. This effectively solves the core problem in existing multi-distance calibration techniques caused by the lack of a clearly defined minimum number of effective samples. In existing technologies, if the number of axial samples is too small (e.g., N=5 or N=3), the complete information of the encoding element cannot be effectively reconstructed, resulting in distortion of the encoding function—for example, the "0 / 1" binary light-transmitting structure of the amplitude encoding plate is difficult to distinguish, and the phase binarization error of the phase encoding plate exceeds the accuracy range of 0.05π. If the number of samples is too large (e.g., N>11), it will increase the mechanical wear of the one-dimensional stepper motor displacement stage, generate a large amount of redundant data, prolong the processing time of subsequent algorithms, and cause resource waste. By setting N≥7, this invention ensures that multi-distance data fully captures the diffraction characteristics of the encoding elements at different axial positions, providing sufficient data support for the plug-and-play prior-based multi-distance phase retrieval algorithm (MDPR-PnP). This enables accurate inversion of the complex amplitude modulation functions of the amplitude encoding board with 2.5μm-40μm light-transmitting pixels and the phase encoding board with 10μm light-transmitting pixels. At the same time, it avoids the additional cost and efficiency loss caused by oversampling, achieving a balance between calibration accuracy and resource economy. This provides key data assurance for obtaining accurate encoding constraints in subsequent lensless computational microscopy imaging systems.
[0038] Furthermore, in S2, if the dual-wavelength phase retrieval calibration mode is selected, the step of simultaneously illuminating the coding element to be calibrated with two coherent light sources of different wavelengths, acquiring a single-frame color diffraction intensity image through an image sensor, and splitting it to obtain diffraction intensity images corresponding to the two wavelengths includes: Two fiber lasers with wavelengths of 635nm and 405nm are used as coherent light sources, and the spherical waves emitted by the two fiber lasers directly illuminate the coding element to be calibrated. The CMOS image sensor module with its outer casing removed is placed close to the rear end of the encoding element to be calibrated, and a single frame of color diffraction intensity image is acquired. Extract the two color channels of the color diffraction intensity image, and use them as the diffraction intensity images corresponding to wavelengths of 635nm and 405nm, respectively. This invention deviates from existing multi-wavelength phase retrieval algorithms, striving to reduce the number of coherent light sources by designing a novel dual-wavelength phase retrieval (DWPR) algorithm for encoding function calibration. This algorithm uses dual-wavelength images as its core and employs total variation and filtering priors to construct an optimization model. The following two formulas correspond to the optimization models for single-wavelength data in the two color channels, with each single-wavelength image data being optimized independently:
[0039]
[0040] Then, information fusion is performed using the following formula to form a new wavefront estimate:
[0041] in, and These are the wavelengths corresponding to two coherent light sources. and They represent wavelengths of and The forward diffraction transmission operator at that time, the above equation passes the data from the two channels through the contrast matrix ( c ), structure matrix ( s ) and brightness matrix ( l The integration is carried out in a manner that allows for fusion.
[0042] Furthermore, in S3, the iterative calculation combining the filtering prior and regularization constraints includes: The iterative formula for the MDPR-PnP algorithm is:
[0043] In the above formula, The gradient operator is expressed as follows: , x and y It is an image spatial index. N x and N y yes x and y Total number of pixels in the direction, The calibration process of the multi-distance coding function is as follows: Figure 1 As shown. The parameter settings of the MDPR-PnP algorithm are as follows: (1) The gradient descent coefficient τ is 0.005, =0.25; (2) The filter uses a guided filter with a filter coefficient of 0.005 and a filter kernel function size of 3×3; (3) The number of iterations is 50.
[0044] Furthermore, the forward and reverse diffraction transport operators used in dual-wavelength phase retrieval can be expressed in the following form:
[0045] Similar to the solution approach of the MDPR-PnP algorithm, the optimization model for single-wavelength data of the two color channels can be solved distributedly as follows:
[0046] Furthermore, according to the SPD model, the contrast matrix during dual-wavelength data fusion ( c ), structure matrix ( s ) and brightness matrix ( l It can be defined as follows:
[0047]
[0048] In the above formula, max and min represent selecting the maximum and minimum values, respectively, and the operator... and These represent the mean and L2 norm of the matrix, respectively, and their specific calculation processes are shown below:
[0049]
[0050] Combining the above formulas, the final iterative expression of the new wavefront estimation formula can be written in the following form:
[0051] In summary, the calculation process for reconstructing the modulation function of the encoder board using the DWPR algorithm can be summarized as follows: Figure 5 As shown.
[0052] Furthermore, in S3, after information fusion is completed, a TNRD filter based on a nonlinear diffusion model is used to estimate the fused wavefront value. The TNRD filter is set to a variance of 0.00003 for noise reduction processing. The encoding element to be calibrated is an amplitude encoding board, and the minimum light-transmitting pixel size of the amplitude encoding board is 10μm; After denoising, the complex amplitude modulation function of the amplitude encoder board to be calibrated is output.
[0053] A storage medium storing a computer program, which, when executed by a processor, implements the multi-mode calibration method for the modulation function of the coded element described above.
[0054] Specifically, the storage medium provided by this invention stores the corresponding computer program, which can fix and reuse the multi-mode calibration method of the modulation function of the coding element in an executable form. This means that the calibration method does not need to repeatedly develop algorithm logic for different computing devices. It can fully implement the calibration process of the method described in this invention by calling the program stored in the storage medium on a device with data processing capabilities. This effectively ensures the consistency and stability of the calibration method execution and avoids algorithm deviations caused by manual operation or decentralized development. With the help of this storage medium, the core advantages of multi-mode calibration can be easily implemented: When high-precision calibration is required, the program can drive the equipment to run according to the multi-distance phase recovery calibration process, control the one-dimensional stepper motor displacement stage to acquire N≥7 diffraction images at 0.5mm intervals, and accurately invert the complex amplitude modulation function of the amplitude encoding board with 2.5μm-40μm light-transmitting pixels and the phase encoding board with 10μm light-transmitting pixels (e.g., amplitude reconstruction SSIM≥0.95 for the 2.5μm pixel amplitude encoding board, and phase binarization error ≤0.05π for the phase encoding board); When efficient calibration is required, the program can control the simultaneous illumination of 635nm and 405nm dual light sources, drive the CMOS sensor to acquire color images with single exposure and split the wavelength channels, and complete the amplitude encoding board calibration through the DWPR algorithm without relying on mechanical scanning. Meanwhile, the portability of this storage medium allows it to be flexibly adapted to computing devices in different scenarios such as laboratory precision measurement and industrial field testing. It can work in conjunction with existing conventional optical devices (such as 532nm fiber lasers and 1.85μm pixel CMOS sensors), enabling lensless computational microscopy imaging systems to quickly acquire accurate coding element calibration capabilities. This provides reliable coding constraints for subsequent complex amplitude reconstruction of samples, strongly supporting the application of this technology in fields such as biological slice observation and micro / nano structure detection.
[0055] A computer device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the multi-mode calibration method for the modulation function of the coded element described above.
[0056] Specifically, the computer device provided by this invention, through a hardware-software collaborative architecture of storing corresponding computer programs in memory and executing programs by a processor, can stably and automatically implement the multi-mode calibration method of the modulation function of the coded element. This effectively avoids calibration errors caused by parameter setting deviations or process omissions during manual operation, ensuring that each calibration strictly follows the complete technical process described in this invention. In actual calibration scenarios, the device can flexibly call the corresponding calibration logic according to the type and requirements of the coded element to be calibrated: when calibrating amplitude coding boards (2.5μm-40μm light-transmitting pixels) or phase coding boards (10μm light-transmitting pixels) with high calibration accuracy requirements, the processor can drive a one-dimensional stepper motorized displacement stage to move a CMOS image sensor (pixel size 1.85μm) along the optical axis, acquiring N≥7 frames of diffraction intensity images at an axial sampling interval of 0.5mm. Then, iterative calculations are completed using a plug-and-play prior multi-distance phase retrieval algorithm (MDPR-PnP), ultimately obtaining a complex amplitude modulation function with acceptable accuracy. —For example, the amplitude reconstruction structure similarity (SSIM) of a 2.5μm pixel amplitude encoding board is ≥0.95, and the phase binarization error of a phase encoding board is ≤0.05π. When efficient calibration of the amplitude encoding board is required, the processor can control two fiber lasers with wavelengths of 635nm and 405nm to illuminate simultaneously, driving a CMOS image sensor to acquire a single frame of color diffraction image close to the back of the encoding element. The dual-wavelength phase retrieval algorithm (DWPR) completes processes such as independent optimization of single wavelength, SPD information fusion, and TNRD filtering (filter variance 0.00003), quickly outputting accurate encoding functions without relying on mechanical scanning. At the same time, the hardware architecture of this device can be flexibly adapted to existing conventional optical devices without relying on special customized components. It can operate stably in different scenarios such as precision measurement in the laboratory and batch calibration in industrial fields, continuously providing reliable encoding element modulation functions for lensless computational microscopy imaging systems, and strongly supporting the precise application of this technology in fields such as biological slice observation and micro-nano structure detection.
[0057] This invention has conducted relevant experimental verification on the multi-distance calibration strategy. The experimental parameters are set as follows: (1) A fiber laser with a wavelength of 532nm is used as a coherent light source. Its emitted beam passes through a pinhole and a double cemented lens with a focal length of 200mm to form a parallel beam to illuminate the coding board; (2) Two types of coding boards are selected: binary amplitude and binary phase. The minimum light-transmitting pixels of the amplitude board are 2.5μm, 5μm, 10μm, 20μm and 40μm, respectively. The minimum light-transmitting pixel of the phase board is 10μm. The amplitude coding board is made by coating a reflective film, while the phase coding board is made by etching depth; (3) The CMOS image sensor module (IMX226, pixel size 1.85μm, Sony) with the shell removed is mounted on a one-dimensional stepper motor displacement stage (GCD-203200M, Daheng Optoelectronics) for axial multi-distance image acquisition; (4) With an axial sampling interval of 0.5mm, 11 axial intensity images are acquired for image reconstruction.
[0058] This invention uses the MDPR-PnP algorithm to experimentally verify the above six coding boards. The reconstruction results of the amplitude coding boards with different pixel sizes are as follows: Figure 2 As shown. Figure 2 (a1-e1) are the diffraction intensity images of amplitude encoders with pixel sizes of 2.5μm, 5μm, 10μm, 20μm, and 40μm on the first axial observation plane. Figure 2 (a2-e2) is a magnified image of the blue area with a size of 200×200. The pixel size of the amplitude encoder represents the minimum size of the light-transmitting unit of the encoder. Figure 2 From (a1-e1), it can be seen that as the pixel size of the amplitude encoder gradually increases, the random coding effect of the amplitude encoder gradually decreases. For example, when the pixel size increases to 40μm, Figure 2 (e1) and Figure 2 (e2) The random modulation effect similar to speckle diffraction is gone; instead, diffraction fringes of geometric size are present. After inputting the intensity diffraction images at 11 axial positions into the MDPR-PnP algorithm, the amplitude and phase images of the amplitude encoding plate are reconstructed as follows: Figure 2 (a3-e3) and Figure 2 As shown in (a5-e5), its corresponding magnified local image is Figure 2 (a4-e4) and Figure 2 (a6-e6). As can be seen from the reconstructed image, the multi-distance phase retrieval algorithm can achieve function calibration of amplitude encoders of various sizes. In particular, for encoders with a pixel size of 2.5μm, although this pixel size is close to the physical limit of the image sensor (sensor pixel size is 1.85μm), the MDPR-PnP algorithm can still complete its complex amplitude wavefront reconstruction.
[0059] The reconstruction results of the phase encoder are as follows Figure 3 As shown. Figure 3 (a1) is the diffraction image at its first axial position, and its local detail information is shown as follows: Figure 3 As shown in (a2). Similar to the amplitude plate reconstruction task, after 50 iterations of the MDPR-PnP algorithm on 11 multi-distance intensity images, the amplitude and phase information of the random phase plate are reconstructed as shown in (a2). Figure 3 (b) and Figure 3 As shown in (c), the reconstruction results reveal that the reconstructed amplitude image of the phase-encoded plate still contains structural information at the etched edges, while its phase information is in a standard binarized form. Comparing the modulation functions of the amplitude and binary phase-encoded plates, it can be seen that both the amplitude and phase information of the amplitude-encoded plate satisfy the binarized distribution law, but the phase singularity value at the amplitude of 0 still exists, so its phase information may have phase wrapping at the 0 and 1 edges. Unlike the amplitude-encoded plate, the amplitude function of the random phase plate is similar to a stripe pattern, and light can also pass through its edges, while the corresponding phase image strictly satisfies the binary distribution law.
[0060] In addition to image reconstruction testing, this invention also analyzed the impact of variations in the number of axial images on convergence performance, in order to find the minimum number of axial measurements required for the multi-distance phase retrieval algorithm to calibrate the encoding function. The corresponding analysis results are as follows: Figure 4 As shown. This article uses Figure 3 (b) Using the true image, and taking different numbers of intensity images ( N =10 to N =2) Input the IrCPR algorithm for encoding function reconstruction, and finally calculate the structural similarity (SSIM) between the reconstructed amplitude image and the ground truth image to complete the reconstructed image quality assessment. The relationship between the SSIM value and the number of axial images is as follows: Figure 4 As shown in (a). The figure shows that when the number of axial measurements is reduced to 7 (i.e.... N =7), the encoding function reconstructed by the multi-distance phase retrieval algorithm begins to show image degradation. Figure 4 (b) Figure 4 (c) Figure 4 (d) and Figure 4 (e) corresponds to N =8、 N =7、 N =5、 N The reconstructed encoder amplitude image when the value is 3. Comparing the above four images, it is clear that reducing the number of axial images does indeed lead to a decrease in the reconstruction accuracy of the encoding function. N =5 or N When the value is 3, the complete information of the encoding board can no longer be effectively reconstructed.
[0061] This invention conducts relevant experimental verification on the dual-wavelength multiplexing calibration strategy. The experimental parameters are listed below: (1) Two fiber lasers with wavelengths of 635nm and 405nm are used as coherent light sources, and their emitted spherical waves are directly used to illuminate the sample; (2) An amplitude encoder with a pixel size of 10μm is used as the sample; (3) A CMOS image sensor module (IMX226, pixel size 1.85μm, Sony) with its shell removed is placed close to the back end of the encoder for image capture. The parameters of the DWPR algorithm are listed below: The TNRD algorithm is for image filtering, and its corresponding filtering variance is 0.00003. =0.01, =0.25. The DWPR algorithm consists of four parts: alternating projection (AP), total variation (TV), image filtering, and structured block decomposition (SPD). This invention separates each module and successively superimposes them for ablation analysis to analyze the effect of each module on dual-wavelength reconstruction. The reconstructed amplitude image is shown below. Figure 6 As shown in the figure, the results indicate that simple alternating projection (amplitude substitution and reciprocating diffraction calculation) cannot completely reconstruct the wavefront information of the coding board; the reconstructed amplitude image is filled with noise. Introducing total variation constraints can suppress noise to some extent, but... Figure 6 The amplitude image shown in (b) still contains noise information. Figure 6 As shown in (c), the introduction of the SPD module effectively extracts the target information, allowing the binary stripes of the encoder board to stand out from the cluttered background. However, Figure 6 (c) still shows some jagged noise at the edges of the binary stripes. Adding a denoising module effectively smooths the edge information of the reconstructed image, resulting in a high-quality encoding function that can reconstruct images like... Figure 6 As shown in (d). Figure 6 Ablation analysis shows that introducing appropriate prior information can effectively solve the convergence hysteresis problem of dual-wavelength phase recovery, which provides a single-frame reconstruction method for coding function calibration.
[0062] In addition, this invention also compares the dual-wavelength reconstruction performance of the DWPR algorithm with existing multi-wavelength phase retrieval algorithms, using the aforementioned encoding board as the target. In the comparative test, multi-wavelength phase retrieval algorithms, including SA, PA, PAWF, MWPR-TV, and PRIF algorithms, were all used for encoding function restoration of dual-wavelength intensity data. The corresponding reconstruction results are as follows: Figure 7 As shown. The above algorithms were all designed based on three-wavelength data measurements. When the number of wavelengths is drastically reduced to two-wavelength illumination, the convergence performance of the algorithms cannot be effectively guaranteed. For example... Figure 7As shown in (ac), the SA, PA, and PAWF algorithms, without any prior constraints, cannot eliminate the noise effects caused by hysteresis convergence. The MWPR-TV and PRIF algorithms construct optimization functions in different forms and add total variation constraints, improving the quality of the reconstructed image, but residual noise information still affects image contrast. In contrast, the DWPR algorithm proposed in this invention improves the fusion strategy of dual-wavelength channel data, effectively extracting the binary information of the encoding board. Figure 7 The results shown verify the effectiveness of the DWPR algorithm in single-frame coding board reconstruction.
[0063] The multi-mode calibration method for modulation functions of coding elements proposed in this invention has a core advantage in that it completely solves the triple contradiction of "accuracy-efficiency-adaptability" in existing calibration technologies through the synergistic design of "multi-distance phase retrieval calibration" and "dual-wavelength phase retrieval calibration". On the one hand, the multi-distance calibration mode relies on the multi-distance phase retrieval algorithm (MDPR-PnP) based on plug-and-play priors and the optimized setting of axial sampling number N≥7, which can adapt to both amplitude coding boards with light transmission pixels of 2.5μm-40μm and phase coding boards with light transmission pixels of 10μm. It can achieve high-precision calibration, with the 2.5μm pixel amplitude encoding board achieving an amplitude reconstruction structure similarity (SSIM) ≥0.95 and the phase encoding board achieving a phase binarization error ≤0.05π. This meets the high-precision calibration requirements of scenarios such as laboratory precision measurement and high-resolution imaging, while avoiding distortion in the encoding function reconstruction due to insufficient sampling or mechanical loss and data redundancy caused by excessive sampling. On the other hand, the dual-wavelength calibration mode uses two fiber lasers with wavelengths of 635nm and 405nm for simultaneous illumination, combined with the CMOS image transmission with the casing removed. The sensor (1.85μm pixel size) acquires color diffraction images and splits wavelength channels using a single exposure, completing data acquisition without mechanical scanning. This acquisition efficiency is higher than multi-distance calibration that relies on mechanical movement. Furthermore, by fusing four modules of the dual-wavelength phase retrieval algorithm (DWPR)—alternating projection, total variational constraint, structure block decomposition (SPD), and TNRD filtering—it effectively eliminates the convergence hysteresis and noise residue problems of traditional dual-wavelength algorithms (such as SA and PA algorithms). The TNRD filter, with a filtering variance set to 0.00003, can accurately extract the binary transmission of the amplitude encoder plate. Features include adaptability to amplitude encoder calibration scenarios with high calibration efficiency requirements; furthermore, the flexible selection of the two modes does not require adjustment of the core algorithm framework, and switching can be achieved only through the adaptation of hardware parameters and data processing flow, which greatly improves the versatility of the method. At the same time, the devices used in the calibration process are all conventional optical devices—a 532nm fiber laser is used for multi-distance calibration, and 635nm and 405nm fiber lasers are used for dual-wavelength calibration, paired with a 1.85μm pixel CMOS image sensor and a one-dimensional stepper motorized displacement stage, without relying on special customized devices, making it easy to implement in engineering.
[0064] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A multi-mode calibration method for the modulation function of a coding element, characterized in that, Includes the following steps: S1. Select the calibration mode according to the type of the encoding element to be calibrated and the calibration requirements. The calibration mode includes multi-distance phase recovery calibration mode and dual-wavelength phase recovery calibration mode. S2. If the multi-distance phase recovery calibration mode is selected, the image sensor is controlled to move along the optical axis under the unloaded state of the sample to acquire multiple frames of diffraction intensity images of the coding element to be calibrated at different axial distances. If the dual-wavelength phase recovery calibration mode is selected, the coding element to be calibrated is simultaneously illuminated by two coherent light sources of different wavelengths under the unloaded state of the sample. A single frame of color diffraction intensity image is acquired by the image sensor and split to obtain diffraction intensity images corresponding to the two wavelengths. S3. Input the diffraction intensity image acquired in S2 into the corresponding phase recovery algorithm, and perform iterative calculations by combining filtering priors and regularization constraints to invert and obtain the complex amplitude modulation function of the coding element to be calibrated. S4. Output the complex amplitude modulation function to complete the calibration of the modulation function of the encoding element.
2. The multi-mode calibration method for the modulation function of the coding element according to claim 1, characterized in that, In S2, if the multi-distance phase recovery calibration mode is selected, the acquisition of multiple frames of diffraction intensity images of the encoding element to be calibrated at different axial distances includes: A fiber laser with a wavelength of 532nm is used as a coherent light source. The output beam of the fiber laser is formed into a parallel beam after passing through a pinhole and a cemented doublet lens with a focal length of 200mm, which illuminates the coding element to be calibrated. The CMOS image sensor module with its outer casing removed is mounted on a one-dimensional stepper motor displacement stage. The CMOS image sensor module is moved along the optical axis with an axial sampling interval of 0.5 mm to acquire N diffraction intensity images of the encoding element to be calibrated, which are recorded as the diffraction intensity image at the nth acquisition distance (n=1,2,…,N). The corresponding phase retrieval algorithm is the multi-distance phase retrieval algorithm MDPR-PnP based on plug-and-play priors, and its optimization model is as follows: , in, Indicates the first j The estimated value of the encoding function under the next iteration. n Represents the location index in multi-distance acquisition. N The total number of multi-distance intensity images acquired. The first time when the sample is unloaded n Each collection distance ( The diffraction intensity image of the coding element under ) Denotes the total variation priors, is the corresponding regularization coefficient.
3. The multi-mode calibration method for the modulation function of the coding element according to claim 2, characterized in that, In S2, the total number of the multi-frame diffraction intensity images N≥7; when N<7, the iterative calculation is stopped and the multi-frame diffraction intensity images are reacquired until N≥7.
4. The multi-mode calibration method for the modulation function of the coding element according to claim 3, characterized in that, In S2, if the dual-wavelength phase recovery calibration mode is selected, the step of simultaneously illuminating the coding element to be calibrated with two coherent light sources of different wavelengths, acquiring a single-frame color diffraction intensity image through an image sensor, and splitting it to obtain diffraction intensity images corresponding to the two wavelengths includes: Two fiber lasers with wavelengths of 635nm and 405nm are used as coherent light sources, and the spherical waves emitted by the two fiber lasers directly illuminate the coding element to be calibrated. The CMOS image sensor module with its outer casing removed is placed close to the rear end of the encoding element to be calibrated, and a single frame of color diffraction intensity image is acquired. Extract the two color channels of the color diffraction intensity image, and use them as the diffraction intensity images corresponding to wavelengths of 635nm and 405nm, respectively. The corresponding phase retrieval algorithm is the Dual Wavelength Phase Retrieval (DWPR) algorithm. The following two formulas correspond to the optimization models for single-wavelength data of the two color channels, respectively, and each single-wavelength image data is optimized independently: , , Then, information fusion is performed using the following formula to form a new wavefront estimate: , in, and These are the wavelengths corresponding to two coherent light sources. and They represent wavelengths of and The forward diffraction transmission operator at that time, the above equation passes the data from the two channels through the contrast matrix ( c ), structure matrix ( s ) and brightness matrix ( l The integration is carried out in a manner that allows for fusion.
5. The multi-mode calibration method for the modulation function of the coding element according to claim 4, characterized in that, In S3, the iterative calculation combining filtering priors and regularization constraints includes: The iterative formula for the MDPR-PnP algorithm is: , In the above formula, The gradient operator is expressed as follows: , x and y It is an image spatial index. N x and N y yes x and y Total number of pixels in the direction.
6. The multi-mode calibration method for the modulation function of the coding element according to claim 5, characterized in that, The forward and reverse diffraction transport operators used in dual-wavelength phase retrieval can be represented in the following form: , The optimization model for single-wavelength data in two color channels can be solved distributedly as follows: 。 7. The multi-mode calibration method for the modulation function of the coding element according to claim 6, characterized in that, According to the SPD model, the contrast matrix during dual-wavelength data fusion ( c ), structure matrix ( s ) and brightness matrix ( l It can be defined as follows: , , , In the above formula, max and min represent selecting the maximum and minimum values, respectively, and the operator... and These represent the mean and L2 norm of the matrix, respectively, and their specific calculation processes are shown below: , , Combining the above formulas, the final iterative expression of the new wavefront estimation formula can be written in the following form: 。 8. The multi-mode calibration method for the modulation function of the coding element according to claim 7, characterized in that, In S3, after information fusion is completed, a TNRD filter based on a nonlinear diffusion model is used to estimate the fused wavefront value. The TNRD filter is set to a variance of 0.00003 for noise reduction processing. The encoding element to be calibrated is an amplitude encoding board, and the minimum light-transmitting pixel size of the amplitude encoding board is 10μm; After denoising, the complex amplitude modulation function of the amplitude encoder board to be calibrated is output.
9. A storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the multi-mode calibration method for the modulation function of the coding element as described in any one of claims 1-8.
10. A computer device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the multi-mode calibration method for the modulation function of the coding element according to any one of claims 1-8.