Coder Social home page Coder Social logo

dlantzberg / sigmatransform-cpp Goto Github PK

View Code? Open in Web Editor NEW
4.0 0.0 0.0 3.3 MB

Implements the Sigma Transform in C++

License: GNU General Public License v3.0

C 19.50% C++ 79.12% Makefile 1.38%
sigmatransform wavelets shearlets shearlet-transform stft short-time-fourier-transform constant-q curvelets spectral-diffeomorphism signal-processing

sigmatransform-cpp's Introduction

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.

sigmatransform-cpp's People

Contributors

dlantzberg avatar

Stargazers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.