Issue 
J. Eur. Opt. SocietyRapid Publ.
Volume 20, Number 1, 2024



Article Number  17  
Number of page(s)  9  
DOI  https://doi.org/10.1051/jeos/2024014  
Published online  03 May 2024 
Research Article
An improved algorithm for diffractive optical element with high imaging quality
Key Laboratory of Optical Information Detecting and Display Technology of Zhejiang Province, 688 Yingbin Road, Jinhua 321004, China
^{*} Corresponding author: syl@zjnu.cn
Received:
1
March
2024
Accepted:
21
March
2024
An improved algorithm for diffractive optical element (DOE) with high imaging quality is proposed in this paper. The algorithm is designed based on amplitude division between signal and noise regions, further subdivides the noise region into two distinct parts. The image quality in the signal region will be effectively improved by employing a partitionconstraint strategy, which imposes amplitude freedom on the first noise region while enforcing strict amplitude constraints on the second noise region. The principle of the algorithm, simulation analysis, and experimental results are presented. The simulation and experimental results demonstrate that the algorithm is feasible.
Key words: Diffractive optical elements / Algorithm / High imaging quality
© The Author(s), published by EDP Sciences, 2024
This is an Open Access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
1 Introduction
Diffractive optical element (DOE) is widely used in beam shaping, optical encryption, optical communication, optical imaging, and other fields for its advantages of small size and flexible design [1–5]. Research on design methods of DOE has academic and application value. Scholars have conducted extensive studies and achieved some research findings, such as GerchbergSaxton (GS) algorithm, inputoutput algorithm, simulated annealing algorithm, YangGu algorithm, genetic algorithm, and other design methods [6–11]. The GS algorithm plays a significant role in DOE design because of its features of fast optimization speed and high diffraction efficiency. However, it is wellknown that the GS algorithm is limited by the selection of initial phase and tends to fall into local optimal solutions. At the same time, it is quite difficult to optimize the speckle noise by GS algorithm. To address these issues, scholars have done a lot of improvement and optimization researches, which can be mainly summarized into two categories: initial phase optimization and changing amplitude constraint methods.
In terms of initial phase optimization, Aagedal et al. proposed the use of pseudorandom or spherical phases as initial phase to reduce speckles [12]. Pang et al. tried to control the quadratic phase with different parameters, eventually successfully shaping the Gaussian beam into a highquality flattop beam [13]. Fischer and Sinzinger calculated the iterative initial phase by combining quadratic phase and error diffusion algorithm, and obtained a reconstructed image with good quality but slightly lower diffraction efficiency [14]. Doskolovich et al. solved the initial phase distribution of specific patterns based on geometric methods, and obtained a piecewise smooth phase distribution through GS algorithm [15]. For patterns with a uniformly distributed intensity, optimizing with an appropriate quadratic phase has obvious advantages over using a random phase. However, for patterns with more complex intensity distributions, it is invalid to use a quadratic phase as the initial value for obtain diffractive image with no artifacts. Instead, more complex methods, such as ray tracing and error diffusion, need to be employed to calculate a suitable initial phase.
Changing amplitude constraint method divides the target image into signal and noise regions. The zoning constraints strategy is considered to be a more universal GS optimization algorithm, and scholars have done a lot of research [16–19]. The research results show that imposing different amplitude constraints on these two different regions can effectively reduce speckle noise in the signal window, thereby it will improve the quality of the reconstructed image. However, these optimization algorithms do not impose constraints on the noise region, using a random phase as the initial phase would result in a significant amount of speckle noise distributed in the noise region. In addition, the optical energy utilization will decrease with the enlargement of noise region. Therefore, these algorithms usually need to use quadratic phase as the initial phase [18]. However, the use of quadratic phase will introduce ringing and artifacts while suppressing speckle noise [20].
An improved algorithm based on GS is proposed in this paper, which can reduce speckle noise with no ringing and artifact. The algorithm can be illustrated as follow: Firstly, the target image plane is divided into three regions: signal region, first noise region, and second noise region. Secondly, imposes amplitude freedom on the first noise region while enforcing strict amplitude constraints on the second noise region. Thirdly, the amplitude in signal window is obtained by linearly superimposing the amplitude of the diffracted image plane and the amplitude of the target image. Finally, the optimal phase distribution is obtained while image quality matches three evaluation functions during the iteration process. During the iteration process, speckle noise is concentrated in the unconstrained first noise area, thereby improving the image quality within the signal area. Meanwhile, amplitude constraints in the second noise area reduce the intensity distribution of speckle noise within that area, effectively addressing the issue of reduced diffraction efficiency that arises as the zeropadding area increases. The relationship between image quality and design parameters are investigated by numerical simulation, which can give significant design recommendations for DOE with high quality. Furthermore, the DOE calculated by the proposed algorithm is fabricated by using our selfmade MicroNano photolithography system. The highquality diffractive image with no ringing and artifacts is obtained by optical reconstruction.
2 Method
As shown in Figure 1, the target image is divided into three regions. The central region is the signal region (S), the checkered region outside the signal region is the first noise region (N_{1}), and the remaining allblack region is the second noise region (N_{2}).
Fig. 1 Regional division of the target image. 
According to the Nyquist sampling theorem [21], calculate the minimum required number of sampling points. The target image is zeropadded to M × N, serving as the actual target light intensity distribution I_{t} during optimization. Based on this, the target amplitude distribution A_{t} is calculated from I_{t}. The formula for calculating the number of sampling points is given below:(1)where λ is the operating wavelength of DOE, d is the distance between the imaging plane and the DOE, pix_{h} is the sampling interval on the DOE plane, pix_{o} is the sampling interval on the diffraction image plane.
Before starting iteration, a random phase φ_{0} is multiplied to A_{t} and propagated to the DOE plane by an inverse Fourier transform. The phase on the DOE plane is taken as the initial phase for iterative optimization. The flowchart of the algorithm is shown in Figure 2.
Fig. 2 Flowchart of the algorithm. 
The specific steps are as follows:
The complex amplitude distribution on the back surface of the DOE after the incident plane wave passes through the DOE phase modulation is given by:(2)
The symbol “k” in the formula represents the iteration number. In the first iteration, the initial phase is set to .Then, the light field emitted from the DOE will propagate to the image plane by Fourier transform, the complex amplitude distribution on the image plane is as follows:(3)
The intensity distribution on the image plane can be calculated by:(4)where is the conjugate of the diffracted light field distribution. The evaluation of the diffraction light field distribution is conducted using three assessment functions: diffraction efficiency (η), structural similarity index measure (SSIM), and peak signaltonoise ratio (PSNR). The expressions for these functions are as expressed by:(5) (6) (7)
The parameters I_{o} and I_{t} respectively represent the intensity distribution on the diffraction image plane and the target intensity distribution. When the sampling points are reduced to the size of the signal window, the calculated results represent the SSIM and PSNR within the signal window.
In order to obtain a highquality reconstructed image, amplitude constraints are applied to the partitioned blocks on the image plane. The amplitude in the signal region is constrained by linearly superimposing the amplitude of the diffracted image plane and the amplitude of the target image. The amplitude in the first noise region remains unchanged, and the amplitude in the second noise region is constrained to 0:(8)where is the corrected amplitude distribution on the diffracted plane, α is the parameter used to adjust the weight. The complex amplitude of the corrected diffracted image plane is:(9)
After the amplitude constraint, the complex amplitude of the light field on the DOE plane is obtained by using inverse Fourier transform on the complex amplitude of the corrected diffracted image plane:(10)
Then, the phase information on the DOE plane is retained and multiplied by the input plane wave light field to obtain the corrected complex amplitude of the light field on the DOE plane:(11)
Finally, return to the previous propagation process and perform the next iteration until the set number of iterations is reached or the evaluation function meets the requirements, to eventually obtain the required phase distribution on the DOE plane.
3 Simulation analysis
The diffraction theory indicates that larger diffraction angle corresponds to higher spatial frequency. When the first noise area is enlarged, the diffraction angle of the speckle noise distributed in this area also increases, inevitably leading to an increase in highfrequency information on the DOE, which will increase the difficulty of fabricate DOE If the first noise area is too small, it offers limited amplitude freedom, and the improvement in the quality of the diffraction image is not significant. Therefore, it is necessary to find an appropriate size for the first noise area that can both enhance the quality of the reconstructed image and not overly increase the complexity of DOE fabrication. Additionally, the weight value α, as a crucial parameter controlling the constraints within the signal window, also significantly affects the image quality within the signal window. The relationship between reconstructed image and parameter values have been explored in this section.
Firstly, to find an appropriate weight value α, we use the images “Baboon”, “Barbara”, “Cameraman”, “Goldhill” and “Peppers” as target images in the simulation. The signal window is set to 512 × 512 pixels, and the image is zeropadded to a size of 2000 × 2000. During the iterations, the amplitudes outside the signal region are constrained to 0, while keeping the initial phase constant. The weight value α starts from 0.5 and changes in increments of 0.1, up to 2.5. We compared the PSNR of the diffraction image in the signal window for different weight values and diffraction efficiency η. For each target, 10 different initial phases are used, and the average PSNR and η are calculated. The simulation analysis results are shown in Figure 3. Figure 3a presents five target images for simulation analysis, the relationship between PSNR, η and weight value α are respectively given by Figures 3b and 3c.
Fig. 3 The relationship between image quality and weight parameter. 
From Figure 3b, the PSNR will improve with α increases from 0.5 to 2, which can reach a peak near 2. In addition, the PSNR starts to decrease rapidly as α continues to increase to greater than 2. In Figure 3c, as α gradually increases from 0.5 to 2.1, the diffraction efficiency slowly decreases but still remains above 93%. However, when α exceeds 2.1, the diffraction efficiency experiences a significant decline. Through simulation analysis, we determined that α equal to 2 can close to the best performance.
Secondly, for a reasonable division of the noise region, we designed another simulation using “Baboon” as the object image. The signal window is set to 500 × 500 pixels, zerofilled to 2000 × 2000 pixels. While keeping the zerofilling region size constant, the width of the first noise region started from 500 pixels and increased by 50 pixels each time until the entire region is filled. By comparing the diffraction image quality under different window sizes, we aimed to find the appropriate region division. In the simulation, 20 different initial phases are used to calculate the PSNR and SSIM within the signal window under the conditions of the same initial phase but different sizes of the first noise region. The average values are then calculated. The simulation analysis results are shown in Figure 4.
Fig. 4 The variety rule of image quality with the changing of window sizes. 
By observing Figure 4, it can be seen that PSNR rapidly increases with the enlargement of the first noise area, reaching its peak when expanded to 2.6 times the length of the signal window area. After that, there is a decrease of 2–13 dB as the first noise area continues to expand. The trend of SSIM is similar to PSNR, with the difference that SSIM converges after Ln/l reaches 2.5. Considering both PSNR and SSIM, when Ln/l = 2.5, which means the length of the first noise region is 2.5 times that of the signal region, it results in the best performance.
Based on the analysis from the two simulations, we have determined that the optimal parameters for the algorithm are a weight value α is equal to 2, and the first noise region should be set to 2.5 times the width of the signal window. To verify the feasibility of the above findings, the Baboon image is used for testing. The simulation platform uses Windows 11 operating system, Core I712700 (2.10 GHz), NVIDIA GeForce RTX 3070 Ti. The parameter settings are shown in Table 1.
Simulation analysis parameters.
After zeropadding, the image has dimensions of 2000 × 2000, with the signal region window size set at 512 × 512. The size of the first noise region is defined as 2.5 times that of the signal window, resulting in dimensions of 1280 × 1280, while the remaining area is designated as the second noise region. A comparison is conducted between the performance of the proposed algorithm and GS algorithm. After 100 iterations, the phase distribution is obtained while the PSNR in the signal region reaches the optimal state. Figures 5a and 5b respectively represent the images reconstructed by the proposed algorithm and GS algorithm within the signal window. Comparing Figures 5a and 5b, due to the large amount of speckle noise, the image quality reconstructed by GS algorithm decreased a lot. In contrast, the proposed algorithm can reconstruct the required light field distribution better, with significant improvements in contrast and clarity.
Fig. 5 Simulation analysis. (a) The reconstructed image within the signal window using the proposed algorithm (b) The reconstructed image within the signal window using GS algorithm. 
Fig. 6 (a) PSNR in the signal window of the diffraction image relative to the number of iterations, (b) SSIM in the signal window of the diffraction image relative to the number of iterations. 
A comparison of PSNR and SSIM is illustrated in Figures 6a and 6b. The proposed algorithm converges more rapidly than GS algorithm as observed from Figures 6a and 6b. The proposed algorithm can achieve satisfactory results after approximately 13 iterations and reach convergence after around 20 iterations. However, GS algorithm converges in approximately 30 iterations. The convergence speed of the proposed algorithm is 1.5 times faster than GS algorithm. The evaluation parameters for the reconstructed images are presented in Table 2.
Evaluation metrics for optimization results of different algorithms.
The parameters PSNR, SSIM and η in Table 2 are represent the peak signaltonoise ratio, structural similarity and diffraction efficiency of the entire diffraction plane respectively. The PSNR_{S} and SSIM_{S} represent the peak signaltonoise ratio and structural similarity of the reproduced images in the signal region. The parameters PSNRs and SSIMs are increased by 23.094 dB and 0.362, which represents an improvement of over 127% and 57% compared to the GS algorithm, indicating a substantial improvement in image quality. There is a 3% difference of PSNR between the two algorithms. In terms of optical energy utilization, the proposed algorithm exhibits 21.5% decrease compared to GS algorithm. These can be attributed to the presence of some speckle noise in the first noise region. The results show that the proposed algorithm greatly improves the reconstructed image quality in the signal region by sacrificing some intensity in the signal region.
4 Experiment and results
To further verify the feasibility of the proposed algorithm, we use a selfmade highresolution MicroNano photolithography system based on DMD parallel exposure to fabricate the calculated DOE and conduct optical reconstruction. An 8th order quantized DOE can already achieve 94.9% diffraction efficiency. Excessive quantization orders do not contribute to a significantly improvement in diffraction efficiency, but instead increases the difficulty of DOE fabrication. Therefore, in the experiments conducted in this paper, the phase is quantized to an 8th order. Key parameters of the MicroNano photolithography system and the photolithography plate used for fabricating DOE are shown in Table 3.
Parameters of the MicroNano photolithography system and photolithography plate.
The fabrication process of the DOE is illustrated in Figure 7a. The 8thorder quantized phase distribution of the target image is calculated using the proposed algorithm. The obtained phase distribution is then exposed onto a photoresist plate by using our selfmade MicroNano photolithography system, which is designed based on DMD parallel exposure. The DOE is obtained after the process of exposure and development. Finally, the DOE is directly illuminated by laser beam as Figure 7b.
Fig. 7 (a) Fabrication process of the DOE, (b) Reconstruction of DOE. 
In the experiment, the characters “DOE” is considered as the image target. The calculation parameters are shown in Table 4. Figures 8a, 8b, and 8c are respectively presented the target image, micrograph of the DOE taken by laser microscope (Keyence VKX250), and the reconstructed image. In the microscopic image of the DOE in Figure 8b, different colors represent different depths, gradually increasing from red to blue.
Fig. 8 (a) Target image, (b) The micrograph of the DOE, (c) Optical reconstructed results. 
Calculation parameters.
As predicted in the previous simulations, the algorithm proposed in this paper produces quite highquality optical reproductions without ringing and artifacts. Meanwhile, through the amplitude constraint in different regions, the diffraction image in the signal area has high quality and uniformity. With an 8level phase quantization, the PSNR within the signal area is 17.08 dB, and the SSIM is 0.8031. In the first noise area, where the amplitude lacks constraints, there is some speckle noise, while in the second noise area, almost no speckle noise can be observed.
5 Conclusion
This paper introduces an improved algorithm for diffractive optical element based on amplitude subdivision and weighted correction method, which can significantly improve the imaging quality with no ringing and artifacts. These advantages are expected to address the challenges of low imaging quality in DOE, as well as the difficulty in balancing zeropadding size and diffraction efficiency during the phase optimization process. Leveraging the benefits of the proposed algorithm, including the absence of conjugate images and the presence of zeroorder light, with its quite high diffraction efficiency, we anticipate that the proposed algorithm can facilitate the practical application of DOE, such as in beam shaping and optical imaging, among others.
Acknowledgments
Y.C.Y. would like to extend his heartfelt thanks to his friends from “Key Laboratory of Optical Information Detecting and Display Technology of Zhejiang Province” for their support and encouragement.
Funding
National Natural Science Foundation of China (NNSF) under grant 61505177.
Conflicts of Interest
The authors declare no conflicts of interest related to the research presented in this paper.
Data availability statement
The data that support the results within this paper are available from the corresponding authors upon reasonable request.
Author contribution statement
All authors made significant contributions to this work.
References
 Tan X., Gu B.Y., Yang G.Z., Dong B.Z. (1995) Diffractive phase elements for beam shaping: a new design method, Appl. Opt. 34, 1314–1320. [Google Scholar]
 Li Y., Kreske K., Rosen J. (2000) Security and encryption optical systems based on a correlator with significant output images, Appl. Opt. 39, 5295–5301. [Google Scholar]
 Sacconi L., Froner E., Antolini R., Taghizadeh M.R., Choudhury A., Pavone F.S. (2003) Multiphoton multifocal microscopy exploiting a diffractive optical element, Opt. Lett. 28, 1918–1920. [Google Scholar]
 Wu J., Wang J., Nie Y., Hu L. (2019) Multipleimage optical encryption based on phase retrieval algorithm and fractional Talbot effect, Opt. Express 27, 35096–35107. [Google Scholar]
 Dai S., Zheng X., Zhao S. (2023) Designing diffractive optical elements for shaping partially coherent beams by proximity correction, Opt. Express 31, 14464–14472. [Google Scholar]
 Gerchberg R.W., Saxton W. (1971) A practical algorithm for the determination of phase from image and diffraction plane pictures, Optik 35, 237–250. [Google Scholar]
 Fienup J.R. (1982) Phase retrieval algorithms: a comparison, Appl. Opt. 21, 2758–2769. [Google Scholar]
 Dames M.P., Dowling R.J., McKee P., Wood D. (1991) Efficient optical elements to generate intensity weighted spot arrays: design and fabrication, Appl. Opt. 30, 2685–2691. [Google Scholar]
 Yang G., Dong B., Gu B., Zhuang J., Ersoy O.K. (1994) Gerchberg–Saxton and Yang–Gu algorithms for phase retrieval in a nonunitary transform system: a comparison, Appl. Opt. 33, 209–218. [Google Scholar]
 Zhou G., Chen Y., Wang Z., Song H. (1999) Genetic local search algorithm for optimization design of diffractive optical elements, Appl. Opt. 38, 4281–4290. [Google Scholar]
 Laborde V., Loicq J., Hastanin J., Habraken S. (2023) Thickness optimization algorithm to improve multilayer diffractive optical elements performance, Appl. Opt. 62, 836–843. [Google Scholar]
 Aagedal H., Schmid M., Beth T., Teiwes S., Wyrowski F. (1996) Theory of speckles in diffractive optics and its application to beam shaping, J. Mod. Opt. 43, 1409–1421. [Google Scholar]
 Pang H., Liu W., Cao A., Deng Q. (2019) Specklereduced holographic beam shaping with modified GerchbergSaxton algorithm, Opt. Comm. 433, 44–51. [Google Scholar]
 Fischer D., Sinzinger S. (2020) Evaluation of quadratic phase hologram calculation algorithms in the Fourier regime, Appl. Opt. 59, 1501–1506. [Google Scholar]
 Doskolovich L.L., Mingazov A.A., Byzov E., Skidanov R., Ganchevskaya S., Bykov D.A., Bezus E.A., Podlipnov V.V., Porfirev A.P., Kazanskiy N.L. (2021) Hybrid design of diffractive optical elements for optical beam shaping, Opt. Express 29, 31875–31890. [Google Scholar]
 Wu S.T., Huang S.H., Chen H., Huang Y.P. (2018) Computer generated hologram accelerated by using hybrid iterative fourier transform algorithm (HIFTA) on phase modulator LCOS, SID Symp. Dig. Tech. Pap. 49, 60–63. [Google Scholar]
 Chen L., Zhang H., He Z., Wang X., Cao L., Jin G. (2020) Weighted constraint iterative algorithm for phase hologram generation, Appl. Sci. Basel 10, 3652. [Google Scholar]
 Pi D., Liu J. (2022) Optimized iterative method for phaseonly hologram generation with speckle suppression based on quadratic phase, in: D. Chu, J. Park, C. Cheng, P. Ferraro (eds), Digital Holography and 3D Imaging 2022, Technical Digest Series, Optica Publishing Group, paper Th3A.5. [Google Scholar]
 Zuo J., Leng J., Fu Y. (2022) Optimized phaseonly hologram generation for highquality holographic display, Appl. Opt. 61, 10519–10527. [Google Scholar]
 Chen L., Zhang H., Cao L., Jin G. (2021) Highquality phaseonly holographic projection based on bandwidth constraint optimization, in: H. Hua, B. Javidi, M. MartinezCorral, O. Matoba, A. Stern, S. Thibault, T. Alieva, J. Ke, F. Willomitzer, F. Okten, P. Silveira, P. Banerjee, E. Stoykova, D. Chu, J. Park, F. Imai, C. Joo, M. Digman, D. Gardner, S. Gladysz, D. LeMaster, S. Basu, O. Korotkova (eds), OSA Imaging and Applied Optics Congress 2021 (3D, COSI, DH, ISA, pcAOP), OSA Technical Digest, Optica Publishing Group, paper DTu7B.2. [Google Scholar]
 Nyquist H. (1924) Certain factors affecting telegraph speed, Trans. AIEE XLIII, 412–422. [Google Scholar]
All Tables
All Figures
Fig. 1 Regional division of the target image. 

In the text 
Fig. 2 Flowchart of the algorithm. 

In the text 
Fig. 3 The relationship between image quality and weight parameter. 

In the text 
Fig. 4 The variety rule of image quality with the changing of window sizes. 

In the text 
Fig. 5 Simulation analysis. (a) The reconstructed image within the signal window using the proposed algorithm (b) The reconstructed image within the signal window using GS algorithm. 

In the text 
Fig. 6 (a) PSNR in the signal window of the diffraction image relative to the number of iterations, (b) SSIM in the signal window of the diffraction image relative to the number of iterations. 

In the text 
Fig. 7 (a) Fabrication process of the DOE, (b) Reconstruction of DOE. 

In the text 
Fig. 8 (a) Target image, (b) The micrograph of the DOE, (c) Optical reconstructed results. 

In the text 
Current usage metrics show cumulative count of Article Views (fulltext article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 4896 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.