Skip to content

ARMANDOMTZ05/Computer-Generated-Holography

Repository files navigation

Computed Generated Holography

Description

Code for generation of binary amplitude hologram based on the K. Mithcell, et al. (2016) using the Gerchberg–Saxton algorithm for phase retrieval

Gerchberg–Saxton pseudocode algorithm

A = ifft(Target)
for x in Iterations
    B = Amplitude(Source) x exp(j x Phase(A))
    C = fft(B)
    D = Amplitude(Target) x exp(j x Phase(C))
    A = ifft(D)

Retrieved_Phase = Phase(A)

Binarization

$T(x, y) = \frac{1}{2} + \frac{1}{2} \text{sgn} \left[\cos(p(x, y)) + \cos(q(x, y))\right]$

Dependencies

For the creation of the Hologram it is used PyTorch supported by a GPU to reduce the processing time.

For Volumetric Additive Manufacturing (VAM) the VAMToolbox library by Joseph Toombs is used for generating the projections.

Disclaimer

The code for the VAM projections was generated based on the VAMToolbox with the modification of the position of the sinogram. Instead of centering the projection it displaces it to a corner. This reduces the resolution four times

References

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

[2] K. Mitchell, S. Turtaev, M. Padgett, T. Cizmár, and D. Phillips, “High-speed spatial control of the intensity, phase and polarisation of vector beams using a digital micro-mirror device”, Opt. Express 24, 29269-29282 (2016).

[3] Forbes A. 2014, Laser Beam Propagation: Generation and Propagation of Customized Light (London: Taylor and Francis).

About

CGH created using the Gerchberg–Saxton algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages