High-speed library for off-axis digital holography and Hermite-Gaussian decomposition.
SAIL-Labs fork of joelacarpenter/digHolo.
If this library is useful to you, please cite the User Guide (arXiv:2204.02348).
Full function documentation, benchmarks, and background are in doc/UserGuide.pdf.
- Linux — x86-64 with AVX2 + FMA3
- Windows — x86-64 with AVX2 + FMA3
macOS is not supported: digHolo's SIMD paths hard-require AVX2/FMA3 (no Apple Silicon), and Intel MKL isn't redistributed for recent macOS.
- FFTW 3 — single-precision (
fftw3f), used for all FFTs and the real-to-real DCTs inAutoAlign. - Intel MKL from Intel oneAPI — BLAS/LAPACK (
cgesvd,sgels,cgemv,cgemm). OpenBLAS works too but requires editingsrc/digHolo.cpp(comment out#define MKL_ENABLE). - SVML (optional) — picked up automatically on MSVC ≥ VS2019 / Intel Compiler for fast trig. Otherwise digHolo falls back to hand-vectorised implementations.
See build.md for prerequisites and the full configure/build/test recipe. TL;DR:
# Linux
source /opt/intel/oneapi/setvars.sh
cmake --preset linux-release
cmake --build --preset linux-release
ctest --preset linux-release# Windows (from Intel oneAPI Command Prompt for VS 2022, with VCPKG_ROOT set)
cmake --preset windows-release
cmake --build --preset windows-release --config Release
ctest --preset windows-releaseProduces libdigholo.so / digholo.dll (shared library) and digHolo (CLI executable).
digHolo digHoloSettings.txt
The settings file is tab-delimited: each <PropertyName>\t<value(s)> line maps to the corresponding digHoloConfigSet<PropertyName>(...) call. See Examples/C++/digHoloDemo/digHoloSettings.txt for the full set of options and main / digHoloRunBatchFromConfigFile in src/digHolo.cpp for the dispatch table. Camera frame data is supplied as a binary file referenced from the settings file; outputs (coefficients, fields, axes, viewport bitmap) are written to user-specified paths.
See Examples/:
Examples/C++/digHoloDemo/digHoloDemo.cpp— minimal C++ driverExamples/Python/digHoloExamplePython.py— ctypes-based wrapperExamples/Matlab/digHoloExampleMatlab.m— MATLABloadlibraryusage
The example scripts currently expect the shared library at the old bin/Win64/digHolo.dll path; adjust the LoadLibrary / loadlibrary calls to point at whatever install prefix you configured (e.g. build/linux-release/libdigholo.so.1). A proper Python package is on the roadmap.