## Abstract

In this work, we introduce a mixed complex and phase only constraint to the Gerchberg–Saxton (G–S) algorithm, leading to improvements in the generation of holograms from multiplane light field distributions. To achieve this, we determine the optimal weight factor for the complex and phase only part of a light field in every plane to achieve the best accuracy. We also demonstrate how this approach can be used to generate encrypted holograms that can only be reconstructed by illumination with a determined phase profile. In this way, we enable the possibility for secure, high-quality multiplane projection and display. We show numerical results for the generation of standard and encrypted seven-plane holograms, as well as the comparison with the conventional G–S algorithm.

© 2021 Optical Society of America

## 1. INTRODUCTION

Computer-generated holograms (CGHs) are a broad and exciting field, with an ever-growing array of applications. The methods developed in this area offer the capability to generate phase, amplitude, and complex holograms that encode a particular light field distribution, and in turn, enable applications ranging from holographic displays [1,2] and aberration correction [3,4], to atom traps [5,6] and superresolution [7].

While the first CGHs can be traced as far back as 1966 [8], ongoing research efforts mean that new CGH techniques are constantly being developed. The reason is that, with the exception of some relatively simple cases, the central challenge of how to codify an arbitrary light distribution into a hologram does not have a single, straightforward solution.

For example, some light distributions in 3D space are physically unrealizable. This means that the hologram generation problem in these cases does not have a unique, exact solution that satisfies Maxwell’s equations. From here, we are faced with the problem of generating a hologram that gives the best possible approximation to our original target.

Another significant challenge is when the generated hologram must be a phase or amplitude only function. This is the case for many practical applications, since the most used spatial light modulation devices can only modulate effectively either the phase or amplitude of the light but not both simultaneously [9]. In this case, once again an exact solution to the hologram generation problem is not readily available, and an approximation must be found.

Thus, a broad range of methods has been developed to find these approximated solutions to the hologram generation problem. These can be broadly classified as *iterative* or *noniterative* methods. As their name implies, iterative methods usually start from a rough approximation to the desired hologram and perform a repeated set of operations to gradually optimize this hologram, leading to a more accurate reproduction of the light field. The first, and probably the most used of these iterative algorithms is the Gerchberg–Saxton (G–S) algorithm [10], which allows finding the phase connecting two planes from the knowledge of the amplitude in each plane. This is useful to generate phase only holograms of 2D light distributions.

The G–S algorithm has been modified to deal with tilted planes [11], different transforms between the two planes [12], and 3D objects [13], and forms the basis of an entire family of algorithms called iterative projection algorithms. Other modern iterative methods make use of more sophisticated optimization approaches, like nonconvex optimization [14], gradient descent optimization [15] or double constraints [16], most of which offer improved quality and flexibility compared to the G–S algorithm, although often at the cost of increased computational cost.

The noniterative methods seek to obtain a good approximation to the desired hologram in a single step without any optimization procedure. As a tradeoff, they usually present lower-quality results than iterative algorithms, in exchange for much faster computation. A simple noniterative method consists in multiplying the object by a random phase and back propagating the result to the hologram plane. The phase in that plane will be the final hologram. This approach is usually called one-step phase retrieval and is interesting due its simplicity; however, it presents limited accuracy, and cannot be used effectively to reproduce multiplane intensity distributions. Other modern approaches consist in codifying the complex field in the hologram plane in two interleaved phase functions [17,18], quadratic phases [19], patterned phase masks [20], or specifically tailored illumination [21].

As a middle ground between iterative and noniterative methods, we find those who iteratively precalculate an optimized phase that can then be used for noniterative hologram generation [22–25]. These optimized phases are then used for noniterative hologram generation. In this way, the reconstruction quality can be increased, while the computation speed remains lower than in standard iterative algorithms.

For this work, we will center our attention on a particular subset of the hologram generation problem, namely, the generation phase holograms from multiplane light field distributions [26]. This allows us to encode into a single hologram several 2D intensities distributed in different planes in 3D space. This has applications in optical trapping and photostimulation, as well as in holographic heads-up displays.

For the generation of multiplane holograms, we have several methods, such as the random superposition method. In this method, the target amplitude in each plane is multiplied by a random phase and then backpropagated to the hologram plane [27]. The phase resulting from the superposition of the fields from all planes will be the final phase hologram. This is a noniterative approach, which offers extremely limited accuracy. Another approach is the use of the sequential G–S algorithm, which is an iterative projection algorithm that sequentially advances through all the planes in the intensity distribution [28]. The sequential G–S algorithm offers good balance between computational cost and quality. Finally, the nonconvex optimization shows improved results over the sequential G–S, at the cost of a more complex implementation [14].

Seeking alternatives to these methods, we reported an approach to produce noniterative multiplane holograms (NIMHs), based in a one-step sequential G–S algorithm combined with a mixed phase and complex constraint [29,30]. This approach produced more accurate holograms that the sequential G–S without need for several iterations.

Despite these useful results, we sought further improvements in the generation of multiplane holograms, and as such, attempted to apply the same mixed constraint iteratively. As we show in this paper, this leads to greater accuracy compared to the sequential G–S algorithm. Furthermore, we show how the mixed constraint can be used to generate encrypted multiplane holograms.

These encrypted holograms require a specific phase illumination to reproduce the encoded light field distribution, and without this “encryption key,” yield only a white noise pattern. This replicates the operation of the double random phase encoding (DRPE) [31], an optical encryption approach that has seen significant research in the last 25 years. In particular, the encrypted hologram we obtained with the sequential G–S with mixed constraint allows encryption of significantly more information with better accuracy than most basic DRPE approaches and replaces the multiplexing procedures commonly used in optical encryption.

We show the generation of seven-plane holograms using mixed constraint, comparison to the conventional G–S algorithm, and analysis of the effect of the different parameters involved in the generation process. Then, we discuss the modification applied to generate encrypted holograms with our proposal, backed up with numerical results and analysis.

## 2. ITERATIVE GENERATION OF MULTIPLANE HOLOGRAMS

The generation of multiplane holograms requires obtaining a function that when illuminated reproduces a given multiplane intensity distribution, as shown in Fig. 1

To obtain a hologram with these features, we can use the sequential G–S algorithm, in which the light field produced by an initial random phase is propagated through every plane in the intensity distribution, and the resulting amplitude in that plane is replaced by the desired amplitude target. After reaching the last plane in the intensity distribution, the process is carried out in reverse, back propagating again through every plane and replacing the amplitude of the light field with the target amplitude. Finally, when the hologram plane is reached, the amplitude of the light field is discarded, and the process is repeated. After every loop, the resulting amplitude in each plane will become closer to the desired target. Once an acceptable quality is reached, the algorithm can be stopped, and the phase in the hologram plane will become our multiplane hologram. A schematic overview of this process can be found in Fig. 2.

Despite its relatively simple implementation, the sequential G–S algorithm presents important limitations on the number of discrete planes that can be codified and the accuracy of the final reconstruction, even when a large number of iterations are used.

To overcome these limitations, we proposed in a recent work the use of a mixed constraint scheme to generate noniterative holograms of multiplane intensity distributions [29]. This mixed constraint consists in setting the resulting complex field in each plane of the target intensity distribution as a linear combination of the light propagated from the previous planes and the product between the phase only part of that light with the amplitude target. Thus, the field for the plane $i$ can be expressed as

A flowchart of the application of the mixed constraint to a given plane can be found in Fig. 3. The result of this procedure is a new complex valued field that conserves part of the amplitude information of the previous planes, instead of discarding it completely as is done in the conventional G–S algorithm.

In previous works [29,30], we found that a value of 0.5 for the C factor produced the best results for noniterative hologram generation; however, tests for the iterative application of these constraints failed to produce optimal results. After further research, we found that this was caused by the replacement of the 0 valued pixels of the target amplitudes for slightly greater values. This procedure increases the reconstruction quality in noniterative hologram generation. The reason is that it reduces the “shadow” effect between the planes of the reconstructed intensity distribution; however, when applied iteratively with the mixed constraint it led to increased noise.

By omitting this procedure, we ensured that the iterative application of the G–S algorithm with our mixed constraint led to increased quality. A block diagram of the mixed constraint iterative hologram generation can be found in Fig. 4.

The mixed constraint block represents the procedure illustrated in Fig. 3 and Eq. (1).

We now show the effect of using different C factors for iterative hologram generation with a mixed constraint. For this test, we applied 20 iterations of the G–S algorithm with a mixed constraint to the generation of a ${{1920}} \times {{1920}}$ hologram of an intensity distribution with seven different planes and different values of C. The pixel pitch and the illumination wavelength were 8 µm and 532 nm, respectively. The distance between planes was set at 4 cm, and the distance between the hologram plane and the first plane of the intensity distribution was set at 20 cm. The propagation between planes was performed with a Fresnel transform based on the transfer function approach [32]. We then reconstructed each plane of the intensity distribution from the resulting hologram and calculated the correlation coefficient (CC) between the reconstruction and the original amplitude target, given by

As can be seen from Fig. 5, there for all planes except the first, there is a marked increase of the correlation coefficient as the C factor increases from 0 (corresponding to the conventional G–S without mixed constraint) to 0.55. From there, there is a rapid decrease. The reason is that values higher than 0.55 lead to increasing crosstalk artifacts between each plane of the intensity distribution. This effect can be seen in Fig. 6 where we show the reconstructions achieved for ${\rm{C}} = {{0}}$, ${\rm{C}} = {0.55}$, and ${\rm{C}} = {0.6}$.

From the results of Figs. 5 and 6, we select a C value of 0.55 for the remaining results shown in this paper.

We now proceed to test the effect of the number of iterations on the reconstruction quality and then compare this result to the conventional sequential G–S algorithm.

As can be seen from the results of Fig. 7, with the exception of the first plane, the scheme with the mixed constraint shows greater CC even when a single iteration is used (this finding is the basis of our previous proposal for NIMH generation). Furthermore, the increase in quality when more iterations are used is faster with the mixed constraint, highlighting a more rapid convergence to an optimal hologram.

Take for example plane 7. After 10 iterations, the mixed constraint achieves a CC of 0.573, against 0.353 of the conventional G–S, and after 100 iterations the mixed constraint achieves a CC of 0.577 against 0.391 of the conventional G–S.

As an additional test of the effectiveness of the mixed constraint approach, we also calculated the diffraction efficiency of the generated hologram in each plane. The diffraction efficiency was taken as the total power in the reconstructed object area in each plane divided by the total power illuminating the hologram. A higher diffraction efficiency means that there is less loss of power in the reconstruction due to the noise surrounding the target or other diffraction orders.

As can be seen from the results of Fig. 8, the diffraction efficiency is substantially improved with the introduction of the mixed constraint. In particular, after 100 iterations, the diffraction efficiency for plane 4 is nearly 78% in the mixed constraint results against 66% achieved with the conventional G–S. Overall, all planes see a nearly 10% increase in diffraction efficiency after the introduction of the mixed constraint.

## 3. MIXED CONSTRAINT GENERATION OF ENCRYPTED PHASE ONLY HOLOGRAMS

Thus far, we have demonstrated how the mixed constraint can be used to generate high-quality multiplane holograms iteratively. In these tests, we always worked under the assumption that the illumination beam used for reconstruction is a plane wave with constant amplitude and uniform phase. However, like the original G–S algorithm, this plane wave can be changed with any arbitrary illumination pattern. Of all these possibilities, we find the use of random phase illumination of particular interest from an optical security standpoint.

In particular, if we are able to generate a multiplane hologram that can only be reconstructed under a particular random phase illumination, we have the groundwork for a means to secure and validate holographic content. Thus, in this scheme, the random phase of the illumination beam used during hologram generation will work as an encryption key, as shown in Fig. 9.

To test the capability of both the sequential G–S and our mixed constraint proposal for the generation of encrypted multiplane holograms, we use the same basic algorithms described in Figs. 2 and 4, with the difference that we multiply the amplitude target in the hologram plane by the complex conjugate of the same random phase in every iteration. This random phase will be the encryption key. Then, for reconstruction, we multiply the hologram by the constant amplitude and the encryption key and measure the CC between each reconstructed plane and the original target image.

As can be seen from the results of Fig. 10, the quality of the reconstructions from the encrypted holograms is generally lower than those achieved with the plane wave, and the effect of increasing the number of iterations is much more limited. In particular, two iterations are enough to reach the maximum possible quality, with no further noticeable increases. Despite this, the mixed constraint once again shows much better performance than the conventional G–S algorithm, with better quality in all planes except the first and a greater improvement between the first and second iterations. This can be visually confirmed in results shown in Figs. 11 and 12.

As can be seen from these results, attempting to use an incorrect key yields white noise patterns in all reconstruction planes, without the presence of any clues about the amplitude target used for that plane. In practical terms, the generation of these holograms is an iterative DRPE, where the key is one of the random phases, and the initial random phase of the G–S algorithm is the other. The iterative procedure then allows the hologram to be optimized for the specific parameters used during generation.

This approach is an interesting alternative to multiplexing encryption schemes, since it allows several relatively detailed images to be codified into a single encrypted hologram with a quality greater than basic DRPE schemes.

## 4. CONCLUSIONS

In this work we built upon the concept of a mixed phase and complex constraint for the generation of phase only holograms. We analyzed the effect of the weight factor C on the quality of the reconstructed amplitude for every plane in a seven-plane intensity distribution. We also demonstrated how the quality of a NIMH can be optimized iteratively if the adequate C factor is chosen. Additionally, we demonstrated that the improved G–S algorithm with mixed constraint outperforms the conventional approach, leading to better quality and faster convergence.

On the other hand, we also explored the generation of holograms in the case when the reconstruction illumination presents a random phase profile. We show that in this case, the mixed constraint can be used to generate high-quality encrypted holograms of multiplane light distributions. With this approach, the illumination beam can be used as the encryption key of a secure holographic display, which may have uses for the creation of secure holographic content pipelines.

The relative simplicity of the mixed constraint means that many variations of the standard G–S applied to multiplane intensity distributions could benefit from it. Furthermore, the quality of the generated holograms may be further improved by using double constraints in addition to the mixed constraints.

From the point of view of the generation of encrypted holograms, further research is necessary to determine the potential vulnerabilities of our proposal and to achieve an experimental implementation that supports the numerical results presented in this work.

## Funding

Agencia Nacional de Promoción Científica y Tecnológica (2018-04558); Universidad Nacional de La Plata (11/I215); Consejo Nacional de Investigaciones Científicas y Técnicas (0849/16).

## Acknowledgment

The author of this work would like to acknowledge the support from the Centro de Investigaciones Opticas de La Plata and from Prof. Dr. Roberto Torroba, who provided invaluable insights and valuable discussions regarding diverse optical methods explored during the preparation of this paper.

## Disclosures

The author declares no conflicts of interest.

## REFERENCES

**1. **F. Yaras, H. Kang, and L. Onural, “State of the art in holographic displays: a survey,” J. Disp. Technol. **6**, 443–454 (2010). [CrossRef]

**2. **Z. Han, B. Yan, Y. Qi, and Y. Y. Wang, “Color holographic display using single chip LCOS,” Appl. Opt. **58**, 69 (2019). [CrossRef]

**3. **V. F. Pamplona, M. M. Oliveira, D. G. Aliaga, and R. Raskar, “Tailored displays to compensate for visual aberrations,” ACM Trans. Graph. **31**, 1–12 (2012). [CrossRef]

**4. **J. Starobrat, P. Wilczynska, and M. Makowski, “Aberration-corrected holographic projection on a two-dimensionally highly tilted spatial light modulator,” Opt. Express **27**, 19270 (2019). [CrossRef]

**5. **T. Harte, G. D. Bruce, J. Keeling, and D. Cassettari, “Conjugate gradient minimisation approach to generating holographic traps for ultracold atoms,” Opt. Express **22**, 26548 (2014). [CrossRef]

**6. **H. Kim, M. Kim, W. Lee, and J. Ahn, “Gerchberg-Saxton algorithm for fast and efficient atom rearrangement in optical tweezer traps,” Opt. Express **27**, 2184–2196 (2019). [CrossRef]

**7. **A. Hussain, T. Amin, C. Kuang, L. Cao, and X. Liu, “Simple fringe illumination technique for optical superresolution,” J. Opt. Soc. Am. B **34**, B78–B84 (2017). [CrossRef]

**8. **B. R. Brown and A. W. Lohmann, “Complex spatial filtering with binary masks,” Appl. Opt. **5**, 967–969 (1966). [CrossRef]

**9. **Z. Zhang, Z. You, and D. Chu, “Fundamentals of phase-only liquid crystal on silicon (LCOS) devices,” Light Sci. Appl. **3**, e213 (2014). [CrossRef]

**10. **R. W. Gerchberg and W. O. Saxton, “A practical algorithm for the determination of phase from image and diffraction plane pictures,” Optik **35**, 237–246 (1972).

**11. **T. Kozacki, “Holographic display with tilted spatial light modulator,” Appl. Opt. **50**, 3579–3588 (2011). [CrossRef]

**12. **R. G. Dorsch, A. W. Lohmann, and S. Sinzinger, “Fresnel ping-pong algorithm for two-plane computer-generated hologram display,” Appl. Opt. **33**, 869–875 (1994). [CrossRef]

**13. **J.-S. Chen and D. P. Chu, “Improved layer-based method for rapid hologram generation and real-time interactive holographic display applications,” Opt. Express **23**, 18143–18155 (2015). [CrossRef]

**14. **J. Zhang, N. Pégard, J. Zhong, H. Adesnik, and L. Waller, “3D computer-generated holography by non-convex optimization,” Optica **4**, 1306–1313 (2017). [CrossRef]

**15. **H. Wang, W. Yue, Q. Song, J. Liu, and G. Situ, “A hybrid Gerchberg–Saxton-like algorithm for DOE and CGH calculation,” Opt. Lasers Eng. **89**, 109–115 (2016). [CrossRef]

**16. **H. Pang, J. Wang, A. Cao, and Q. Deng, “High-accuracy method for holographic image projection with suppressed speckle noise,” Opt. Express **24**, 22766–22776 (2016). [CrossRef]

**17. **V. Arrizón, “Improved double-phase computer-generated holograms implemented with phase-modulation devices,” Opt. Lett. **27**, 595–597 (2007). [CrossRef]

**18. **Y. K. Kim, J. S. Lee, and Y. H. Won, “Low-noise high-efficiency double-phase hologram by multiplying a weight factor,” Opt. Lett. **44**, 3649–3652 (2019). [CrossRef]

**19. **H. Pang, J. Wang, M. Zhang, A. Cao, L. Shi, and Q. Deng, “Non-iterative phase-only Fourier hologram generation with high image quality,” Opt. Express **25**, 14323–14333 (2017). [CrossRef]

**20. **P. W. M. Tsang, Y. T. Chow, and T.-C. Poon, “Generation of patterned-phase-only holograms (PPOHs),” Opt. Express **25**, 9088–9093 (2017). [CrossRef]

**21. **A. Velez-Zea and R. Torroba, “Synthetic amplitude for improved reconstruction of noniterative phase holograms,” Appl. Opt. **58**, 6144–6151 (2019). [CrossRef]

**22. **A. Velez-Zea and R. Torroba, “Optimized random phase tiles for non-iterative hologram generation,” Appl. Opt. **58**, 9013–9019 (2019). [CrossRef]

**23. **A. Velez-Zea, J. F. B. Ramirez, and R. Torroba, “Optimized random phase only holograms,” Opt. Lett. **43**, 731–734 (2018). [CrossRef]

**24. **A. Velez-Zea, J. F. B. Ramirez, and R. Torroba, “Secure real-time generation and display of color holographic movies,” Opt. Lasers Eng. **122**, 239–244 (2019). [CrossRef]

**25. **L. Chen, H. Zhang, L. Cao, and G. Jin, “Non-iterative phase hologram generation with optimized phase modulation,” Opt. Express **28**, 11380–11392 (2020). [CrossRef]

**26. **M. Makowski, “Three-plane phase-only computer hologram generated with iterative Fresnel algorithm,” Opt. Eng. **44**, 125805 (2006). [CrossRef]

**27. **R. Di Leonardo, F. Ianni, and G. Ruocco, “Computer generation of optimal holograms for optical trap arrays,” Opt. Express **15**, 1913–1922 (2007). [CrossRef]

**28. **M. Makowski, M. Sypek, A. Kolodziejczyk, G. Mikula, and J. Suszek, “Iterative design of multiplane holograms: experiments and applications,” Opt. Eng. **46**, 045802 (2007). [CrossRef]

**29. **A. Velez-Zea and R. Torroba, “Noniterative multiplane holographic projection,” Appl. Opt. **59**, 4377–4384 (2020). [CrossRef]

**30. **A. Velez-Zea and R. Torroba, “Multiplane noniterative color holographic projection,” Opt. Lasers Eng. **137**, 106327 (2021). [CrossRef]

**31. **P. Refregier and B. Javidi, “Optical image encryption based on input plane and Fourier plane random encoding,” Opt. Lett. **20**, 767–769 (1995). [CrossRef]

**32. **D. G. Voelz, *Computational Fourier Optics: A MATLAB® Tutorial* (2011).