/SigmaTransform-Cpp

Implements the Sigma Transform in C++

Primary LanguageC++GNU General Public License v3.0GPL-3.0

SigmaTransform-Cpp

Implements the Sigma Transform in C++

Contents

General information

This repository shows an exemplary implementation of the "SigmaTransform", as defined in the thesis "Quantum Frames and Uncertainty Principles arising from Symplectomorphisms", written in C/C++.

Note that this library is not intended to show maximal performance, but show the usability of the universal interface of the "Sigma Transform" to perform well-known signal processing transforms / algorithms like the Short-Time Fourier Transform, Wavelet Transform, Curvelet Transform, etc., differing only by single paramater - the "spectral diffeomorphism".

Installation

The code was compiled and tested with g++ (GCC) 4.8.1, on Windows 7 and g++ (Debian 4.7.2-5) 4.7.2 on Debian Linux, each on a 64 Bit machine, and uses the C++11 standard, as well as the FFTW library (http://fftw.org/), which should be installed prior to compilation. For Windows, a current 64 Bit shared-library version of FFTW3 (libfftw3-3.dll) is provided in the subdirectory ./FFTW. On a Linux machine, the library should be installed via a package manager, e.g. using

$ sudo apt-get install fftw3-dev
$ sudo pacman -S fftw3-dev
$ sudo yum install fftw3-devel
$ sudo rpm -i fftw3-devel

depending on your distribution, or compiled from scratch using the --enable-threads flag.

Usage and Documentation

Usage

Perform a STFT on a signal "f"

#include <SigmaTransform/SigmaTransform1D.h>
namespace st = SigmaTransform;
...
//construct 1D STFT transform
st::STFT1D ST(
    win,  // window handle
    Fs,   // spatial/temporal sampling rate
    len,  // signal length
    chans // channels in warped Fourier domain
);
// transform signal "f"
ST.analyze( f );
// get coefficients
auto coeff = ST.getCoeff();

Perform a 1D Wavelet Transform on a signal "f"

#include <SigmaTransform/SigmaTransform1D.h>
namespace st = SigmaTransform;
...
//construct 1D Wavelet transform
st::Wavelet1D WT(
    win,  // window handle
    Fs,   // spatial/temporal sampling rate
    len,  // signal length
    chans // channels in warped Fourier domain
);
// transform signal "f"
WT.analyze( f );
// get coefficients
auto coeff = WT.getCoeff();

Perform a SIM(2)-Transform on a 2D signal "f"

#include <SigmaTransform/SigmaTransform2D.h>
namespace st = SigmaTransform;
...
//construct SIM2D transform
st::SIM2D T(
    win,  // window handle
    Fs,   // spatial/temporal sampling rate
    len,  // signal length
    chans // channels in warped Fourier domain
);
// transform signal "f" and get coefficients
auto coeff = T( f ).getCoeff();

Documentation

A HTML Documentation, generated by Doxygen (http://www.doxygen.nl), may be found int ./SigmaTransform/doc and the examples

Example1D_ConstantQ.cpp     # The 1D Constant-Q Transform
Example1D_STFT.cpp          # The 1D Short-Time Fourier Transform
Example1D_Wavelet.cpp       # The 1D Wavelet Transform
Example1D_async.cpp         # Using the implementation asynchronously
Example1D_inline.cpp        # Using the implementation inline
Example1D_threads.cpp       # Using multiple threads/parallel processing
Example2D_Curvelet.cpp      # The 2D Curvelet Transform
Example2D_NPShearlet.cpp    # The Non-Parabolic Shearlet Transform
Example2D_SIM2.cpp          # The SIM(2)-Transform
Example2D_STFT.cpp          # The 2D Short-Time Fourier Transform
Example2D_Wavelet.cpp,      # The 2D Wavelet Transform

located in the ./Examples subdirectory show how to use the implementation, along with some special cases. The provided makefile should compile and link all examples - on Windows as well as Linux with the appropriate tools and libraries installed -, as well as the Code for the SigmaTransform itself. The binaries will be put into the subdirectory ./bin.