HologramDepthmap Library
Functions
Generation Hologram

Functions

void HologramGenerator::GenerateHologram ()
 Generate a hologram, main funtion. More...
 
void HologramGenerator::Calc_Holo_by_Depth (int frame)
 Generate a hologram. More...
 
void HologramGenerator::Calc_Holo_CPU (int frame)
 Main method for generating a hologram on the CPU. More...
 
void HologramGenerator::Calc_Holo_GPU (int frame)
 Main method for generating a hologram on the GPU. More...
 
void HologramGenerator::Propagation_AngularSpectrum_CPU (Complex *input_u, double propagation_dist)
 Angular spectrum propagation method for CPU implementation. More...
 
void HologramGenerator::Propagation_AngularSpectrum_GPU (cufftDoubleComplex *input_u, double propagation_dist)
 Angular spectrum propagation method for GPU implementation. More...
 

Detailed Description

Function Documentation

◆ Calc_Holo_by_Depth()

void HologramGenerator::Calc_Holo_by_Depth ( int  frame)
private
Parameters
frame: the frame number of the image.
See also
Calc_Holo_CPU, Calc_Holo_GPU

Definition at line 442 of file HologramGenerator.cpp.

◆ Calc_Holo_CPU()

void HologramGenerator::Calc_Holo_CPU ( int  frame)
private

For each depth level,

  1. find each depth plane of the input image.
  2. apply carrier phase delay.
  3. propagate it to the hologram plan.
  4. accumulate the result of each propagation.

The final result is accumulated in the variable 'U_complex_'.

Parameters
frame: the frame number of the image.
See also
Calc_Holo_by_Depth, Propagation_AngularSpectrum_CPU

Definition at line 117 of file HologramGenerator_CPU.cpp.

◆ Calc_Holo_GPU()

void HologramGenerator::Calc_Holo_GPU ( int  frame)
private

For each depth level,

  1. find each depth plane of the input image.
  2. apply carrier phase delay.
  3. propagate it to the hologram plan.
  4. accumulate the result of each propagation.

It uses CUDA kernels, cudaDepthHoloKernel & cudaPropagation_AngularSpKernel.
The final result is accumulated in the variable 'u_complex_gpu_'.

Parameters
frame: the frame number of the image.
See also
Calc_Holo_by_Depth, Propagation_AngularSpectrum_GPU

Definition at line 246 of file HologramGenerator_GPU.cpp.

◆ GenerateHologram()

void HologramGenerator::GenerateHologram ( )

For each frame,

  1. Read image depth data.
  2. Compute the physical distance of depth map.
  3. Transform target object to reflect the system configuration of holographic display.
  4. Generate a hologram.
  5. Encode the generated hologram.
  6. Write the hologram to a image.
See also
ReadImageDepth, GetDepthValues, TransformViewingWindow, Calc_Holo_by_Depth, Encoding_Symmetrization, Write_Result_image

Definition at line 261 of file HologramGenerator.cpp.

◆ Propagation_AngularSpectrum_CPU()

void HologramGenerator::Propagation_AngularSpectrum_CPU ( Complex input_u,
double  propagation_dist 
)
private

The propagation results of all depth levels are accumulated in the variable 'U_complex_'.

Parameters
input_u: each depth plane data.
propagation_dist: the distance from the object to the hologram plane.
See also
Calc_Holo_by_Depth, Calc_Holo_CPU, fftwShift

Definition at line 186 of file HologramGenerator_CPU.cpp.

◆ Propagation_AngularSpectrum_GPU()

void HologramGenerator::Propagation_AngularSpectrum_GPU ( cufftDoubleComplex *  input_u,
double  propagation_dist 
)
private

The propagation results of all depth levels are accumulated in the variable 'u_complex_gpu_'.

Parameters
input_u: each depth plane data.
propagation_dist: the distance from the object to the hologram plane.
See also
Calc_Holo_by_Depth, Calc_Holo_GPU, cudaFFT

Definition at line 311 of file HologramGenerator_GPU.cpp.