Introduction
This library implements the hologram generation method using depth map data.
It is implemented on the CPU and the GPU to improve the performance of the hologram generation method. Thus, user can compare the performance between the CPU and GPU implementation.
Algorithm Reference
The original algorithm is modified in the way that can be easily implemented in parallel.
Back propagate each depth plane to the hologram plane and accumulate the results of each propagation.
Depth Map Hologram Generation Algorithm
Software Components
The library consists a main hologram generation module(Hologram folder) and its sample program(HologramDepthmap folder).
The following shows the list of files with the directory structure.
Main Procedure
The main function of the library is a GenerateHologram() of
HologramGenerator
class. The following is the procedure of it and functions called form it..
GenerateHologram Function Procedure
Environment
- Microsoft Visual Studio 2015 C++
- Qt 5.6.2
- CUDA 8.0
- FFTW 3.3.5
How to Build Source Codes
Before building an execution file, you need to install MS Visual Studio 2015 C++ and Qt, also CUDA for the GPU execution.
- Download the source code from here.
- Go to the directory 'HologramDepthmap'.
- Open the Visual Studio soulution file, 'HologramDepthmap.sln'.
- Check the configuation of the Qt & CUDA to work with the Visual Studio.
- For Qt, you may need to set QTDIR environment variable -> System Properties->Advanced->Environment Variable.
- To use FFTW, copy 'libfftw3-3.dll' into the 'bin' directory and copy 'libfftw3-3.lib' into the 'lib' directory.
- Visual Studio Build Menu -> Configuration Menu, set "Release" for the Active solution configuration, "x64" for the Active solution platform.
- Set 'HologramDepthmap' as a StartUp Project.
- Build a Solution.
- After building, you can find the execution file, 'HologramDepthmap.exe' under the 'bin' directory.
- Execute 'HologramDepthmap.exe', then you can see the following GUI of the sample program.
the Sample Program & its Execution