Image Component Library (ICL)
|
Functions | |
template<typename T1 , typename T2 > | |
ICLMath_IMP std::complex< T2 > * | fft (unsigned int n, const T1 *data) |
1dfft computation (fallback) More... | |
template<typename T1 , typename T2 > | |
ICLMath_IMP DynMatrix< std::complex< T2 > > & | 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 > > & | 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 > * | dft (unsigned int n, T1 *matrix) |
1d dft computation More... | |
template<typename T1 , typename T2 > | |
ICLMath_IMP DynMatrix< std::complex< T2 > > & | 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 > * | ifft_cpp (unsigned int n, const T1 *matrix) |
1d ifft computation More... | |
template<typename T1 , typename T2 > | |
ICLMath_IMP DynMatrix< std::complex< T2 > > & | 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 > > & | 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 > * | idft (unsigned int n, T1 *matrix) |
1d idft computation More... | |
template<typename T1 , typename T2 > | |
ICLMath_IMP DynMatrix< std::complex< T2 > > & | 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 > & | fftshift (DynMatrix< T > &src, DynMatrix< T > &dst) |
shifts upper left corner to center. More... | |
template<typename T > | |
ICLMath_IMP DynMatrix< T > & | ifftshift (DynMatrix< T > &src, DynMatrix< T > &dst) |
invers function to fftshift. More... | |
template<typename T > | |
ICLMath_IMP DynMatrix< T > & | powerspectrum (const DynMatrix< std::complex< T > > &src, DynMatrix< T > &dst) |
computes the powerspectrum More... | |
template<typename T > | |
ICLMath_IMP DynMatrix< T > & | logpowerspectrum (const DynMatrix< std::complex< T > > &src, DynMatrix< T > &dst) |
computes the logpowerspectrum More... | |
template<typename T > | |
ICLMath_IMP DynMatrix< T > & | makeborder (const DynMatrix< T > &src, DynMatrix< T > &dst, T borderFill) |
creates border with given value More... | |
template<typename T > | |
ICLMath_IMP DynMatrix< T > & | mirrorOnCenter (const DynMatrix< T > &src, DynMatrix< T > &dst) |
mirrors the sourcematrix More... | |
template<typename T > | |
ICLMath_IMP DynMatrix< T > & | continueMatrixToPowerOf2 (const DynMatrix< T > &src, DynMatrix< T > &dst) |
appends copies of sourcematrix beside and under it More... | |
ICLMath_API int | nextPowerOf2 (int n) |
Returns the next value greater then n to power of 2. More... | |
ICLMath_API int | priorPowerOf2 (int n) |
Returns the prior value lower then n to power of 2. More... | |
template<typename T > | |
ICLMath_IMP void | 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 > & | 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 > & | 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 > & | 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 > & | phase (const DynMatrix< std::complex< T1 > > &src, DynMatrix< T2 > &dst) |
return phase of complexmatrix More... | |
template<typename T > | |
ICLMath_IMP void | 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 > > & | 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 | FFT_2_PI = 2.0*3.1415926535897932384626433832795288419716939937510 |
2*PI More... | |
static const double | FFT_PI = 3.1415926535897932384626433832795288419716939937510 |
PI. More... | |
static const double | FFT_PI_HALF = 1.5707963267948966192313216916397644209858469968755 |
PI/2. More... | |
ICLMath_IMP DynMatrix<T>& icl::math::fft::continueMatrixToPowerOf2 | ( | const DynMatrix< T > & | src, |
DynMatrix< T > & | dst | ||
) |
appends copies of sourcematrix beside and under it
Resizes the sourcematrix to the next power of 2 and copies the sourcematrix as far as possible into the destinationmatrix, starting at 0,0.
src | the sourcematrix |
dst | the destinationmatrix |
ICLMath_IMP std::complex<T2>* icl::math::fft::dft | ( | unsigned int | n, |
T1 * | matrix | ||
) |
1d dft computation
Computes the 1D Diskrete-Fourier-Transformation for given data. Possible inputdatatypes are: icl8u, icl16u, icl32u, icl16s, icl32s, icl32f, icl64f, std::complex<icl32f>, std::complex<icl64f>. Possible outputdatatype are std::complex<icl32f> and std::complex<icl64f>
n | size of the dataarray |
matrix | the dataarray |
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
Computes the 2D Diskrete-Fourier-Transformation for given data. Possible inputdatatypes are: icl8u, icl16u, icl32u, icl16s, icl32s, icl32f, icl64f, std::complex<icl32f>, std::complex<icl64f>. Possible outputdatatype are std::complex<icl32f> and std::complex<icl64f>
src | datamatrix of size MxN |
dst | destinationmatrix of size MxN |
buf | buffermarix of size NxM |
ICLMath_IMP std::complex<T2>* icl::math::fft::fft | ( | unsigned int | n, |
const T1 * | data | ||
) |
1dfft computation (fallback)
Computes the 1D Fast-Fourier-Transformation for given data. If the size of the dataarray is a power of 2, the fft is performed, else the dft is performed on the datapart, on which fft does not work. Possible inputdatatypes are: icl8u, icl16u, icl32u, icl16s, icl32s, icl32f, icl64f, std::complex<icl32f>, std::complex<icl64f>. Possible outputdatatype are std::complex<icl32f> and std::complex<icl64f>
n | size of the dataarray |
data | the dataarray |
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
Computes the 2D Fast-Fourier-Transformation for given data. Uses MKL or IPP if available, else fft2D_cpp (fallback). Possible inputdatatypes are: icl8u, icl16u, icl32u, icl16s, icl32s, icl32f, icl64f, std::complex<icl32f>, std::complex<icl64f>. Possible outputdatatype are std::complex<icl32f> and std::complex<icl64f>
src | datamatrix of size MxN |
dst | destinationmatrix of size MxN |
buf | buffermatrix of size NxM !!! |
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)
Computes the 2D Fast-Fourier-Transformation for given data. Works even if datasize is not a power of 2. Possible inputdatatypes are: icl8u, icl16u, icl32u, icl16s, icl32s, icl32f, icl64f, std::complex<icl32f>, std::complex<icl64f>. Possible outputdatatype are std::complex<icl32f> and std::complex<icl64f>
src | datamatrix of size MxN |
dst | destinationmatrix of size MxN |
buf | buffermatrix of size NxM !!! |
ICLMath_IMP DynMatrix<T>& icl::math::fft::fftshift | ( | DynMatrix< T > & | src, |
DynMatrix< T > & | dst | ||
) |
shifts upper left corner to center.
Shifts the upper left corner of the matrix into the center of it.
src | datamatrix to be shifted |
dst | destinationmatrix |
ICLMath_IMP std::complex<T2>* icl::math::fft::idft | ( | unsigned int | n, |
T1 * | matrix | ||
) |
1d idft computation
Computes the 1D Inverse-Diskrete-Fourier-Transformation for given data.
n | size of the dataarray |
matrix | the dataarray |
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
Computes the 2D Inverse-Diskrete-Fourier-Transformation for given data.
src | datamatrix of size MxN |
dst | destinationmatrix of size MxN |
buf | buffermarix of size NxM |
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
Computes the 2D Inverse-Fast-Fourier-Transformation. Uses MKL or IPP if available, else ifft2D_cpp. Possible inputdatatypes are: icl8u, icl16u, icl32u, icl16s, icl32s, icl32f, icl64f, std::complex<icl32f>, std::complex<icl64f>.
src | datamatrix of size MxN |
dst | destinationmatrix of size MxN |
buf | buffermarix of size NxM |
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)
Computes the 2D Inverse-Fast-Fourier-Transformation. Possible inputdatatypes are: icl8u, icl16u, icl32u, icl16s, icl32s, icl32f, icl64f, std::complex<icl32f>, std::complex<icl64f>.
src | datamatrix of size MxN |
dst | destinationmatrix of size MxN |
buf | buffermarix of size NxM |
ICLMath_IMP std::complex<T2>* icl::math::fft::ifft_cpp | ( | unsigned int | n, |
const T1 * | matrix | ||
) |
1d ifft computation
Computes the 1D Inverse-Fast-Fourier-Transformation. Possible inputdatatypes are: icl8u, icl16u, icl32u, icl16s, icl32s, icl32f, icl64f, std::complex<icl32f>, std::complex<icl64f>.
n | size of the dataarray |
matrix | the dataarray |
ICLMath_IMP DynMatrix<T>& icl::math::fft::ifftshift | ( | DynMatrix< T > & | src, |
DynMatrix< T > & | dst | ||
) |
invers function to fftshift.
Shifts the center of the matrix into the upper left corner .
src | datamatrix to be shifted |
dst | destinationmatrix |
ICLMath_IMP DynMatrix<T2>& icl::math::fft::imagpart | ( | const DynMatrix< std::complex< T1 > > & | src, |
DynMatrix< T2 > & | dst | ||
) |
returns imaginary part complex matrix
Computes and returns the imaginary part of a matrix with complex values.
src | the sourcematrix |
dst | the destinationmatrix |
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
real | matrix for realpart |
im | matrix for imaginary part |
dst | destinationmatrix |
ICLMath_IMP DynMatrix<T>& icl::math::fft::logpowerspectrum | ( | const DynMatrix< std::complex< T > > & | src, |
DynMatrix< T > & | dst | ||
) |
computes the logpowerspectrum
Computes and returns the log of the powerspectrum of a matrix with complex values.
src | the sourcematrix |
dst | the destinationmatrix |
ICLMath_IMP DynMatrix<T2>& icl::math::fft::magnitude | ( | const DynMatrix< std::complex< T1 > > & | src, |
DynMatrix< T2 > & | dst | ||
) |
returns the magnitude of complex matrix
Computes and returns the magnitude of a matrix with complex values.
src | the sourcematrix |
dst | the destinationmatrix |
ICLMath_IMP DynMatrix<T>& icl::math::fft::makeborder | ( | const DynMatrix< T > & | src, |
DynMatrix< T > & | dst, | ||
T | borderFill | ||
) |
creates border with given value
Resizes the sourcematrix to the next power of 2, centers the original matrix and fills the border with the given value.
src | the sourcematrix |
dst | the destinationmatrix |
borderFill | Number for filling the border |
ICLMath_IMP DynMatrix<T>& icl::math::fft::mirrorOnCenter | ( | const DynMatrix< T > & | src, |
DynMatrix< T > & | dst | ||
) |
mirrors the sourcematrix
Resizes the sourcematrix to the next power of 2, centers the original matrix and mirrors it at its borders.
src | the sourcematrix |
dst | the destinationmatrix |
ICLMath_API int icl::math::fft::nextPowerOf2 | ( | int | n | ) |
Returns the next value greater then n to power of 2.
ICLMath_IMP DynMatrix<T2>& icl::math::fft::phase | ( | const DynMatrix< std::complex< T1 > > & | src, |
DynMatrix< T2 > & | dst | ||
) |
return phase of complexmatrix
Computes and returns the phase of a matrix with complex values.
src | the sourcematrix |
dst | the destinationmatrix |
ICLMath_IMP DynMatrix<T>& icl::math::fft::powerspectrum | ( | const DynMatrix< std::complex< T > > & | src, |
DynMatrix< T > & | dst | ||
) |
computes the powerspectrum
Computes and returns the powerspectrum of a matrix with complex values.
src | the sourcematrix |
dst | the destinationmatrix |
ICLMath_API int icl::math::fft::priorPowerOf2 | ( | int | n | ) |
Returns the prior value lower then n to power of 2.
ICLMath_IMP DynMatrix<T2>& icl::math::fft::realpart | ( | const DynMatrix< std::complex< T1 > > & | src, |
DynMatrix< T2 > & | dst | ||
) |
returns real part of complex matrix
Computes and returns the real part of a matrix with complex values.
src | the sourcematrix |
dst | the destinationmatrix |
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
Splits a matrix with complex values into two matrices with real and imaginary parts as values.
src | the sourcematrix with complex values |
real | the destinationmatrix for the realparts |
img | the destinationmatrix for the imaginaryparts |
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
Splits a matrix with complex values into two matrices with magnitude and phase as values.
src | the sourcematrix with complex values |
mag | the destinationmatrix for the magnitudevalues |
phase | the destinationmatrix for the phasevalues |
|
static |
2*PI
|
static |
PI.
|
static |
PI/2.