Skip to content

Collection of hologram optmization algorithms, inclusing alternating projection, quasi-Newton method, stochastic gradient descent

Notifications You must be signed in to change notification settings

THUHoloLab/Optimization_algorithms_for_CGH

Repository files navigation

CGH Optimization

Non-convex optimization algorithms to synthesize computer-generated holograms

Computer-generated holography (CGH) involves computationally generating a hologram and optically reconstructing an object's wavefront, which provides an approach to digitally modulate a volumetric wavefront.

Computer-generated holograms can be encoded on various types of holographic media, including diffractive optical elements, metasurfaces, and spatial light modulators. Even so, the algorithms for hologram synthesis can be universally applied. Existing optimization frameworks applied to CGH can be concluded with the following categories: alternative projections, first-order gradient descent, and second-order gradient descent.

Codes to achieve hologram synthesis with these optimization frameworks is provided here. The algorithms to realize functional hologram synthesis using different frameworks are written in MATLAB. If you use any of these codes, please cite it as follows:

Sui X, He Z, Chu D, & Cao L. Non-convex Optimization for Inverse Problem Solving in Computer-generated Holography. Light: Science & Applications, 13(158), 1-23 (2024) [link] [bibtex]

Alternating projections

Alternative projections can be achieved by a pair of elementary projections repeatedly occurring in the optimization, which construct an iterative computation loop. Specially for CGH, alternating projections are applied to two enclosed sets associated with potential object solutions and potential hologram solutions.

  1. Gerchberg-Saxton (GS) algorithm: [2D optimization (phase-only hologram)]
  2. Iterative Fourier-transform algorithm (IFTA):
  3. Iterative algorithm with angular spectrum theory:

First-order gradient descent

The inverse problem of hologram synthesis in CGH can also be cast as the optimization of a parameterized objective function requiring minimization with respect to its parameters. Since the choice of the objective function is often stochastic and differentiable with respect to its parameters, stochastic gradient descent (SGD) is considered as an efficient and effective first-order gradient descent framework for optimization.

  1. Stochastic gradient descent (SGD) with single Fourier-transform propagation:
  2. Stochastic gradient descent (SGD) with angular spectrum theory:

Second-order gradient descent

The second-order gradient descent is implemented by the quasi-Newton method here, which minimizes the loss function by constructing and storing a series of matrices that approximate the Hessian or inverse Hessian matrix of the loss function.

  1. The quasi-Newton method with single Fourier-transform propagation:
  2. Stochastic gradient descent (SGD) with angular spectrum theory:

In our demonstration, the 512×512 holograms are equally computed on a PC with an Intel Core i9-9900K 3.6 GHz CPU and 32.0 GB of RAM, and an NVIDIA GeForce RTX 2080Ti GPU. Two diffractive propagation methods including the FFT and ASM are compared, where the propagation distance of ASM is 50 mm.

Optimization for 3D holograms

The flexibility of the optimization frameworks also brings with it a diversity of pipelines for the hologram synthesis of 3D objects. Many diffractive propagation models are applicable for volumetric optimization. Here, for a better illustration of different optimization pipelines, we unify them into the band-limited ASM.

  1. The superposition method:
  2. The global method:
  3. The sequential method:

Questions and feedback

If you have questions, bug reports, or feature requests, please use the Issues section to report them.

About

Collection of hologram optmization algorithms, inclusing alternating projection, quasi-Newton method, stochastic gradient descent

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published