PCL
|
Generic fast Fourier transform of complex data. More...
#include <FFT1D.h>
Public Types | |
using | base = AbstractFFT< T > |
using | complex = typename base::complex |
using | complex_vector = typename base::complex_vector |
using | scalar = typename base::scalar |
using | transform = typename base::transform |
using | vector = typename base::vector |
Public Types inherited from pcl::AbstractFFT< T > | |
using | complex = Complex< T > |
using | complex_vector = GenericVector< complex > |
using | scalar = T |
using | transform = complex_vector |
using | vector = GenericVector< scalar > |
Public Member Functions | |
GenericFFT (int n) | |
~GenericFFT () override | |
GenericFFT & | operator() (complex *y, const complex *x, int dir=PCL_FFT_FORWARD) const |
GenericFFT & | operator<< (const complex *x) |
GenericFFT & | operator<< (const complex_vector &x) |
GenericFFT & | operator>> (complex *y) const |
GenericFFT & | operator>> (complex_vector &y) const |
Public Member Functions inherited from pcl::AbstractFFT< T > | |
AbstractFFT (int length) | |
virtual | ~AbstractFFT () |
transform & | DFT () |
transform | DFT () const |
int | Length () const |
complex * | operator* () |
const complex * | operator* () const |
virtual void | Release () |
Static Public Member Functions | |
static int | OptimizedLength (int n) |
The GenericFFT template class performs forward and inverse, out-of-place fast Fourier transforms of complex data.
For fast Fourier transforms of real-valued data, see the GenericRealFFT template class.
using pcl::GenericFFT< T >::base = AbstractFFT<T> |
using pcl::GenericFFT< T >::complex = typename base::complex |
using pcl::GenericFFT< T >::complex_vector = typename base::complex_vector |
using pcl::GenericFFT< T >::scalar = typename base::scalar |
using pcl::GenericFFT< T >::transform = typename base::transform |
using pcl::GenericFFT< T >::vector = typename base::vector |
|
inline |
Constructs a GenericFFT object of the specified length n.
The current PCL implementation supports FFTs of arbitrary length, but the underlying routines have been optimized for performance when the length of the input vector can be factorized as follows:
n = 2^n2 * 3^n3 * 4^n4 * 5^n5
where n2, n3, n4, and n5 are arbitrary positive integers. For best performance, you should call GenericFFT::OptimizedLength() to get the smallest optimal length for your data, then place them on an array of the obtained length, padded with zeros.
|
inlineoverride |
|
inline |
Performs the forward or inverse FFT of an input vector of complex values, and stores the result in a caller-supplied output vector.
[in] | x | Input vector. Must be the starting address of a contiguous sequence of at least Length() complex numbers. | ||||
[out] | y | Output vector, where the result of the transform will be stored. Must be the starting address of a contiguous sequence of at least Length() complex numbers. | ||||
dir | Indicates the direction of the Fourier transform:
This parameter is optional; the default value is PCL_FFT_FORWARD. |
The specified arguments x and y must be the starting addresses of two different, non-overlapping contiguous blocks of at least Length() elements.
This member function does not change the current Fourier transform in this object, if it exists.
Returns a reference to this object.
Definition at line 496 of file FFT1D.h.
References PCL_FFT_BACKWARD.
|
inline |
|
inline |
Fast Fourier transform. Performs the FFT of a vector of complex values.
The specified vector x must have at least Length() elements. Otherwise an Error exception will be thrown.
Returns a reference to this object.
Definition at line 439 of file FFT1D.h.
References pcl::GenericVector< T >::Length().
|
inline |
Inverse fast Fourier transform. Performs the inverse FFT and stores the result in the specified vector of complex values.
The argument y must be the starting address of a contiguous block of at least Length() elements.
If no FFT has been performed on this object (by a previous call to operator <<()), this member function throws an Error exception.
Returns a reference to this object.
|
inline |
Inverse fast Fourier transform. Performs the inverse FFT and stores the result in a vector of complex values.
The specified vector y must have at least Length() elements. Otherwise an Error exception will be thrown.
If no FFT has been performed on this object (by a previous call to operator <<()), this member function throws an Error exception.
Returns a reference to this object.
Definition at line 459 of file FFT1D.h.
References pcl::GenericVector< T >::Length().
|
inlinestatic |
Returns the optimized complex FFT length larger than or equal to a given length n. The returned length will be optimal to perform a FFT of complex data with the current PCL implementation. The optimized length can be used as the argument to the constructor of any FFT class for complex data transforms.
Definition at line 520 of file FFT1D.h.
Referenced by pcl::GenericFFT2D< T >::OptimizedLength(), and pcl::GenericRealFFT2D< T >::OptimizedLength().