|
void | get_rand_phase_value (Complex &rand_phase_val) |
| Assign random phase value if RANDOM_PHASE == 1. More...
|
|
void | get_shift_phase_value (Complex &shift_phase_val, int idx, ivec2 sig_location) |
| Calculate the shift phase value. More...
|
|
void | fftwShift (Complex *src, Complex *dst, fftw_complex *in, fftw_complex *out, int nx, int ny, int type, bool bNomalized=false) |
| Convert data from the spatial domain to the frequency domain using 2D FFT on CPU. More...
|
|
void | exponent_complex (Complex *val) |
| Calculate the exponential of the complex number. More...
|
|
void | fftShift (int nx, int ny, Complex *input, Complex *output) |
| Swap the top-left quadrant of data with the bottom-right , and the top-right quadrant with the bottom-left. More...
|
|
|
void | init_CPU () |
| Initialize variables for the CPU implementation. More...
|
|
void | init_GPU () |
| Initialize variables for the GPU implementation. More...
|
|
|
bool | ReadImageDepth (int ftr) |
| Read image and depth map. More...
|
|
bool | prepare_inputdata_CPU (uchar *img, uchar *dimg) |
| Preprocess input image & depth map data for the CPU implementation. More...
|
|
bool | prepare_inputdata_GPU (uchar *img, uchar *dimg) |
| Copy input image & depth map data into a GPU. More...
|
|
|
void | GetDepthValues () |
| Calculate the physical distances of depth map layers. More...
|
|
void | change_depth_quan_CPU () |
| Quantize depth map on the CPU, when the number of depth quantization is not the default value (i.e. FLAG_CHANGE_DEPTH_QUANTIZATION == 1 ). More...
|
|
void | change_depth_quan_GPU () |
| Quantize depth map on the GPU, when the number of depth quantization is not the default value (i.e. FLAG_CHANGE_DEPTH_QUANTIZATION == 1 ). More...
|
|
|
void | TransformViewingWindow () |
| Transform target object to reflect the system configuration of holographic display. More...
|
|
|
void | Calc_Holo_by_Depth (int frame) |
| Generate a hologram. More...
|
|
void | Calc_Holo_CPU (int frame) |
| Main method for generating a hologram on the CPU. More...
|
|
void | Calc_Holo_GPU (int frame) |
| Main method for generating a hologram on the GPU. More...
|
|
void | Propagation_AngularSpectrum_CPU (Complex *input_u, double propagation_dist) |
| Angular spectrum propagation method for CPU implementation. More...
|
|
void | Propagation_AngularSpectrum_GPU (cufftDoubleComplex *input_u, double propagation_dist) |
| Angular spectrum propagation method for GPU implementation. More...
|
|
|
void | Encoding_Symmetrization (ivec2 sig_location) |
| Encode the CGH according to a signal location parameter. More...
|
|
void | encoding_CPU (int cropx1, int cropx2, int cropy1, int cropy2, ivec2 sig_location) |
| Encode the CGH according to a signal location parameter on the CPU. More...
|
|
void | encoding_GPU (int cropx1, int cropx2, int cropy1, int cropy2, ivec2 sig_location) |
| Encode the CGH according to a signal location parameter on GPU. More...
|
|
|
void | Write_Result_image (int ftr) |
| Write the result image. More...
|
|
|
void | Reconstruction (fftw_complex *in, fftw_complex *out) |
| It is a testing function used for the reconstruction. More...
|
|
void | Test_Propagation_to_Eye_Pupil (fftw_complex *in, fftw_complex *out) |
| It is a testing function used for the reconstruction. More...
|
|
void | Write_Simulation_image (int num, double val) |
| It is a testing function used for the reconstruction. More...
|
|
void | circshift (Complex *in, Complex *out, int shift_x, int shift_y, int nx, int ny) |
| It is a testing function used for the reconstruction. More...
|
|
|
bool | isCPU_ |
| if true, it is implemented on the CPU, otherwise on the GPU. More...
|
|
unsigned char * | img_src_gpu_ |
| GPU variable - image source data, values are from 0 to 255. More...
|
|
unsigned char * | dimg_src_gpu_ |
| GPU variable - depth map data, values are from 0 to 255. More...
|
|
double * | depth_index_gpu_ |
| GPU variable - quantized depth map data. More...
|
|
double * | img_src_ |
| CPU variable - image source data, values are from 0 to 1. More...
|
|
double * | dmap_src_ |
| CPU variable - depth map data, values are from 0 to 1. More...
|
|
double * | depth_index_ |
| CPU variable - quantized depth map data. More...
|
|
int * | alpha_map_ |
| CPU variable - calculated alpha map data, values are 0 or 1. More...
|
|
double * | dmap_ |
| CPU variable - physical distances of depth map. More...
|
|
double | dstep_ |
| the physical increment of each depth map layer. More...
|
|
std::vector< double > | dlevel_ |
| the physical value of all depth map layer. More...
|
|
std::vector< double > | dlevel_transform_ |
| transfomed dlevel_ variable More...
|
|
Complex * | U_complex_ |
| CPU variable - the generated hologram before encoding. More...
|
|
double * | u255_fringe_ |
| the final hologram, used for writing the result image. More...
|
|
HologramParams | params_ |
| structure variable for hologram parameters More...
|
|
std::string | SOURCE_FOLDER |
| input source folder - config file. More...
|
|
std::string | IMAGE_PREFIX |
| the prefix of the input image file - config file. More...
|
|
std::string | DEPTH_PREFIX |
| the prefix of the deptmap file - config file More...
|
|
std::string | RESULT_FOLDER |
| the name of the result folder - config file More...
|
|
std::string | RESULT_PREFIX |
| the prefix of the result file - config file More...
|
|
bool | FLAG_STATIC_IMAGE |
| if true, the input image is static. More...
|
|
uint | START_OF_FRAME_NUMBERING |
| the start frame number. More...
|
|
uint | NUMBER_OF_FRAME |
| the total number of the frame. More...
|
|
uint | NUMBER_OF_DIGIT_OF_FRAME_NUMBERING |
| the number of digit of frame number. More...
|
|
int | Transform_Method_ |
| transform method More...
|
|
int | Propagation_Method_ |
| propagation method - currently AngularSpectrum More...
|
|
int | Encoding_Method_ |
| encoding method - currently Symmetrization More...
|
|
double | WAVELENGTH |
| wave length More...
|
|
bool | FLAG_CHANGE_DEPTH_QUANTIZATION |
| if true, change the depth quantization from the default value. More...
|
|
uint | DEFAULT_DEPTH_QUANTIZATION |
| default value of the depth quantization - 256 More...
|
|
uint | NUMBER_OF_DEPTH_QUANTIZATION |
| depth level of input depthmap. More...
|
|
bool | RANDOM_PHASE |
| If true, random phase is imposed on each depth layer. More...
|
|
std::string | Simulation_Result_File_Prefix_ |
| reconstruction variable for testing More...
|
|
int | test_pixel_number_scale_ |
| reconstruction variable for testing More...
|
|
vec2 | Pixel_pitch_xy_ |
| reconstruction variable for testing More...
|
|
ivec2 | SLM_pixel_number_xy_ |
| reconstruction variable for testing More...
|
|
double | f_field_ |
| reconstruction variable for testing More...
|
|
double | eye_length_ |
| reconstruction variable for testing More...
|
|
double | eye_pupil_diameter_ |
| reconstruction variable for testing More...
|
|
vec2 | eye_center_xy_ |
| reconstruction variable for testing More...
|
|
double | focus_distance_ |
| reconstruction variable for testing More...
|
|
int | sim_type_ |
| reconstruction variable for testing More...
|
|
double | sim_from_ |
| reconstruction variable for testing More...
|
|
double | sim_to_ |
| reconstruction variable for testing More...
|
|
int | sim_step_num_ |
| reconstruction variable for testing More...
|
|
double * | sim_final_ |
| reconstruction variable for testing More...
|
|
Complex * | hh_complex_ |
| reconstruction variable for testing More...
|
|
This is a main class for generating a digital hologram using depth map data. It is implemented on the CPU and GPU.
- Read Config file. - to set all parameters needed for generating a hologram.
- Initialize all variables. - memory allocation on the CPU and GPU.
- Generate a digital hologram using depth map data.
- For the testing purpose, reconstruct a image from the generated hologram.
Definition at line 130 of file HologramGenerator.h.