53 #ifndef __ophDepthMap_GPU_h 54 #define __ophDepthMap_GPU_h 58 #define __DEBUG_LOG_GPU_SPEC_ 61 #include <cuda_runtime.h> 63 static void HandleError(cudaError_t err,
66 if (err != cudaSuccess) {
67 printf(
"%s in %s at line %d\n", cudaGetErrorString(err),
72 #define HANDLE_ERROR( err ) (HandleError( err, __FILE__, __LINE__ )) 75 #define HANDLE_NULL( a ) {if (a == NULL) { \ 76 printf( "Host memory failed in %s at line %d\n", \ 77 __FILE__, __LINE__ ); \ 78 exit( EXIT_FAILURE );}} 99 void cudaFFT(CUstream_st* stream,
int nx,
int ny, cufftDoubleComplex* in_filed, cufftDoubleComplex* output_field,
int direction);
123 void cudaDepthHoloKernel(CUstream_st* stream,
int pnx,
int pny, cufftDoubleComplex*
u_o_gpu_,
unsigned char* img_src_gpu,
unsigned char* dimg_src_gpu,
Real* depth_index_gpu,
124 int dtr,
Real rand_phase_val_a,
Real rand_phase_val_b,
Real carrier_phase_delay_a,
Real carrier_phase_delay_b,
int flag_change_depth_quan,
unsigned int default_depth_quan);
166 int dtr,
Real d1,
Real d2,
Real params_num_of_depth,
Real params_far_depthmap,
Real params_near_depthmap);
void cudaDepthHoloKernel(CUstream_st *stream, int pnx, int pny, cufftDoubleComplex *u_o_gpu_, unsigned char *img_src_gpu, unsigned char *dimg_src_gpu, Real *depth_index_gpu, int dtr, Real rand_phase_val_a, Real rand_phase_val_b, Real carrier_phase_delay_a, Real carrier_phase_delay_b, int flag_change_depth_quan, unsigned int default_depth_quan)
Find each depth plane of the input image and apply carrier phase delay to it on GPU.
cufftDoubleComplex * u_complex_gpu_
void cudaChangeDepthQuanKernel(CUstream_st *stream_, int pnx, int pny, Real *depth_index_gpu, unsigned char *dimg_src_gpu, int dtr, Real d1, Real d2, Real params_num_of_depth, Real params_far_depthmap, Real params_near_depthmap)
Quantize depth map on the GPU, only when the number of depth quantization is not the default value (i...
void cudaPropagation_AngularSpKernel(CUstream_st *stream_, int pnx, int pny, cufftDoubleComplex *input_d, cufftDoubleComplex *u_complex, Real ppx, Real ppy, Real ssx, Real ssy, Real lambda, Real params_k, Real propagation_dist)
Angular spectrum propagation method for GPU implementation.
cufftDoubleComplex * k_temp_d_
void cudaFFT(CUstream_st *stream, int nx, int ny, cufftDoubleComplex *in_filed, cufftDoubleComplex *output_field, int direction)
Convert data from the spatial domain to the frequency domain using 2D FFT on GPU. ...
cufftDoubleComplex * u_o_gpu_