Image Component Library (ICL)
Namespaces | Functions | Variables
FFTUtils.h File Reference
#include <ICLUtils/CompatMacros.h>
#include <ICLUtils/BasicTypes.h>
#include <ICLMath/DynMatrix.h>
#include <ICLMath/FFTException.h>
#include <string.h>
#include <complex>

Go to the source code of this file.

Namespaces

 icl
 undocument this line if you encounter any issues!
 
 icl::math
 
 icl::math::fft
 

Functions

template<typename T1 , typename T2 >
ICLMath_IMP std::complex< T2 > * icl::math::fft::fft (unsigned int n, const T1 *data)
 1dfft computation (fallback) More...
 
template<typename T1 , typename T2 >
ICLMath_IMP DynMatrix< std::complex< T2 > > & icl::math::fft::fft2D_cpp (const DynMatrix< T1 > &src, DynMatrix< std::complex< T2 > > &dst, DynMatrix< std::complex< T2 > > &buf)
 2dfft computation (fallback) More...
 
template<typename T1 , typename T2 >
ICLMath_IMP DynMatrix< std::complex< T2 > > & icl::math::fft::fft2D (const DynMatrix< T1 > &src, DynMatrix< std::complex< T2 > > &dst, DynMatrix< std::complex< T2 > > &buf)
 2dfft computation More...
 
template<typename T1 , typename T2 >
ICLMath_IMP std::complex< T2 > * icl::math::fft::dft (unsigned int n, T1 *matrix)
 1d dft computation More...
 
template<typename T1 , typename T2 >
ICLMath_IMP DynMatrix< std::complex< T2 > > & icl::math::fft::dft2D (DynMatrix< T1 > &src, DynMatrix< std::complex< T2 > > &dst, DynMatrix< std::complex< T2 > > &buf)
 2d dft computation More...
 
template<typename T1 , typename T2 >
ICLMath_IMP std::complex< T2 > * icl::math::fft::ifft_cpp (unsigned int n, const T1 *matrix)
 1d ifft computation More...
 
template<typename T1 , typename T2 >
ICLMath_IMP DynMatrix< std::complex< T2 > > & icl::math::fft::ifft2D_cpp (const DynMatrix< T1 > &src, DynMatrix< std::complex< T2 > > &dst, DynMatrix< std::complex< T2 > > &buf)
 2d ifft computation (fallback) More...
 
template<typename T1 , typename T2 >
ICLMath_IMP DynMatrix< std::complex< T2 > > & icl::math::fft::ifft2D (const DynMatrix< T1 > &src, DynMatrix< std::complex< T2 > > &dst, DynMatrix< std::complex< T2 > > &buf)
 2d ifft computation More...
 
template<typename T1 , typename T2 >
ICLMath_IMP std::complex< T2 > * icl::math::fft::idft (unsigned int n, T1 *matrix)
 1d idft computation More...
 
template<typename T1 , typename T2 >
ICLMath_IMP DynMatrix< std::complex< T2 > > & icl::math::fft::idft2D (DynMatrix< T1 > &src, DynMatrix< std::complex< T2 > > &dst, DynMatrix< std::complex< T2 > > &buf)
 2d idft computation More...
 
template<typename T >
ICLMath_IMP DynMatrix< T > & icl::math::fft::fftshift (DynMatrix< T > &src, DynMatrix< T > &dst)
 shifts upper left corner to center. More...
 
template<typename T >
ICLMath_IMP DynMatrix< T > & icl::math::fft::ifftshift (DynMatrix< T > &src, DynMatrix< T > &dst)
 invers function to fftshift. More...
 
template<typename T >
ICLMath_IMP DynMatrix< T > & icl::math::fft::powerspectrum (const DynMatrix< std::complex< T > > &src, DynMatrix< T > &dst)
 computes the powerspectrum More...
 
template<typename T >
ICLMath_IMP DynMatrix< T > & icl::math::fft::logpowerspectrum (const DynMatrix< std::complex< T > > &src, DynMatrix< T > &dst)
 computes the logpowerspectrum More...
 
template<typename T >
ICLMath_IMP DynMatrix< T > & icl::math::fft::makeborder (const DynMatrix< T > &src, DynMatrix< T > &dst, T borderFill)
 creates border with given value More...
 
template<typename T >
ICLMath_IMP DynMatrix< T > & icl::math::fft::mirrorOnCenter (const DynMatrix< T > &src, DynMatrix< T > &dst)
 mirrors the sourcematrix More...
 
template<typename T >
ICLMath_IMP DynMatrix< T > & icl::math::fft::continueMatrixToPowerOf2 (const DynMatrix< T > &src, DynMatrix< T > &dst)
 appends copies of sourcematrix beside and under it More...
 
ICLMath_API int icl::math::fft::nextPowerOf2 (int n)
 Returns the next value greater then n to power of 2. More...
 
ICLMath_API int icl::math::fft::priorPowerOf2 (int n)
 Returns the prior value lower then n to power of 2. More...
 
template<typename T >
ICLMath_IMP void icl::math::fft::split_complex (const DynMatrix< std::complex< T > > &src, DynMatrix< T > &real, DynMatrix< T > &img)
 split complexmatrix into realmatrix and imaginarymatrix More...
 
template<typename T1 , typename T2 >
ICLMath_IMP DynMatrix< T2 > & icl::math::fft::imagpart (const DynMatrix< std::complex< T1 > > &src, DynMatrix< T2 > &dst)
 returns imaginary part complex matrix More...
 
template<typename T1 , typename T2 >
ICLMath_IMP DynMatrix< T2 > & icl::math::fft::realpart (const DynMatrix< std::complex< T1 > > &src, DynMatrix< T2 > &dst)
 returns real part of complex matrix More...
 
template<typename T1 , typename T2 >
ICLMath_IMP DynMatrix< T2 > & icl::math::fft::magnitude (const DynMatrix< std::complex< T1 > > &src, DynMatrix< T2 > &dst)
 returns the magnitude of complex matrix More...
 
template<typename T1 , typename T2 >
ICLMath_IMP DynMatrix< T2 > & icl::math::fft::phase (const DynMatrix< std::complex< T1 > > &src, DynMatrix< T2 > &dst)
 return phase of complexmatrix More...
 
template<typename T >
ICLMath_IMP void icl::math::fft::split_magnitude_phase (const DynMatrix< std::complex< T > > &src, DynMatrix< T > &mag, DynMatrix< T > &phase)
 splits complexmatrix into magnitude and phase More...
 
template<typename T1 , typename T2 >
ICLMath_IMP DynMatrix< std::complex< T2 > > & icl::math::fft::joinComplex (const DynMatrix< T1 > &real, const DynMatrix< T1 > &im, DynMatrix< std::complex< T2 > > &dst)
 joins to matrices to one complex More...
 

Variables

static const double icl::math::fft::FFT_2_PI = 2.0*3.1415926535897932384626433832795288419716939937510
 2*PI More...
 
static const double icl::math::fft::FFT_PI = 3.1415926535897932384626433832795288419716939937510
 PI. More...
 
static const double icl::math::fft::FFT_PI_HALF = 1.5707963267948966192313216916397644209858469968755
 PI/2. More...