Skip to content
/ HOTlab Public
forked from MartinPersson/HOTlab

Computational holography for adaptive multi-focal displays

License

Notifications You must be signed in to change notification settings

ILLIXR/HOTlab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computational Holography

Part of ILLIXR, the Illinios Extended Reality Benchmark Suite. This component is responsible for calculating image holograms (per-pixel phase masks) using the Weighted Gerchberg–Saxton (GSW) algorithm.

Files

hologram.cpp

ILLIXR plugin interface file for integrating hologram into ILLIXR.

generateHologram.cu

generateHologram

Host side kernel launch code.

propagateToSpotPositions

CUDA kernel that propagates phases from the SLM plane to the depth plane using Fresnel summation.

propagateToSpotSum

CUDA kernel that sums up the per-thread block results from the propagateToSpotPositions() kernel.

propagateToSLM

CUDA kernel that calculates the error function at the depth planes and updates the SLM phases.

goldenHologram.cu

The original hologram implementation. This implementation did not support arbitrary SLM sizes and colored holograms.

Build

Building hologram for ILLIXR is automatically done when building the whole ILLIXR project. Here is how to build it individually

To build shared library plugin for ILLIXR:

make plugin.dbg.so

or

make plugin.opt.so

To build a standalone executable for ILLIXR:

make hologram.dbg.exe

or

make hologram.opt.exe

Jetson compilation

The makefile contains seperate targets for compilation on an Nvidia Jetson Xavier (Jetson Xavier AGX has Volta GPU which only supports --gpu-architecture=sm_72). To target Jetson Xavier, use the following make target template <target-name>.jetson.<compile-type>.<target-ext>. For example, to generate the debug executable for hologram, run:

make hologram.jetson.dbg.exe

Once compiled, run:

./hologram.jetson.dbg.exe <num-trials>

ILLIXR integration

hologram , computational holography, subscribes to atimewarp_gl output signal indicating a timewarped frame, which means hologram should start processing. Hologram takes depth buffer of the frame to calculate a Spatial Light Modulator input. For more details of hologram, please refer to our paper. Since we do not have an accurate prediction of vsync, hologram process is one frame delayed.

Currently this component is for profiling purpose only. Performance-wise, hologram is input invariant. Current ILLIXR and monado do not support depth buffer from user application. Algorithms to calculate depth spots from depth buffer is also missing.

This component uses the logger to record its runtime.

Event-streams

  • Asynchronously read hologram_in
  • Writes hologram_out

License

This code is available under the LGPL license.

About

Computational holography for adaptive multi-focal displays

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Cuda 94.5%
  • Makefile 2.8%
  • C++ 1.8%
  • C 0.9%