PCL
|
Generic fast Fourier transform of real 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 | |
GenericRealFFT (int length) | |
~GenericRealFFT () override | |
GenericRealFFT & | operator() (complex *y, const scalar *x) const |
GenericRealFFT & | operator() (scalar *y, const complex *x) const |
GenericRealFFT & | operator<< (const scalar *x) |
GenericRealFFT & | operator<< (const vector &x) |
GenericRealFFT & | operator>> (scalar *y) const |
GenericRealFFT & | operator>> (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 GenericRealFFT template class performs forward and inverse, out-of-place fast Fourier transforms of real-valued data. For real data in the time domain, this class performs nearly twice as fast as Fourier transform classes for complex data.
For fast Fourier transforms of complex-valued data, see the GenericFFT template class.
using pcl::GenericRealFFT< T >::base = AbstractFFT<T> |
using pcl::GenericRealFFT< T >::complex = typename base::complex |
using pcl::GenericRealFFT< T >::complex_vector = typename base::complex_vector |
using pcl::GenericRealFFT< T >::scalar = typename base::scalar |
using pcl::GenericRealFFT< T >::transform = typename base::transform |
using pcl::GenericRealFFT< T >::vector = typename base::vector |
|
inline |
Constructs a GenericRealFFT object of the specified length.
The current PCL implementation supports FFTs for real data of any even 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, and n is an even integer. For best performance, you should call GenericRealFFT::OptimizedLength() to get the smallest optimal length for your real data, then place them on an array of the obtained length, padded with zeros.
|
inlineoverride |
|
inline |
Performs the FFT of an input vector of real numbers, and stores the result in a caller-supplied output vector of complex values.
[in] | x | Input vector. Must be the starting address of a contiguous sequence of at least Length() scalars. |
[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()/2 + 1 complex numbers. |
The specified arguments x and y must be the starting addresses of two different, non-overlapping contiguous blocks of data. The output transform will be a sequence of Length()/2 + 1 complex numbers.
This member function does not change the current Fourier transform in this object, if any.
Returns a reference to this object.
|
inline |
Performs the inverse FFT of an input vector of complex numbers, and stores the result in a caller-supplied output vector of real values.
[in] | x | Input vector. Must be the starting address of a contiguous sequence of at least Length()/2 + 1 complex numbers, corresponding to a discrete real Fourier transform of length Length(). |
[out] | y | Output vector, where the result of the inverse transform will be stored. Must be the starting address of a contiguous sequence of at least Length() real numbers. |
The specified arguments x and y must be the starting addresses of two different, non-overlapping contiguous blocks of data. The input transform must be a sequence of Length()/2 + 1 complex numbers. The output inverse transform will be a sequence of Length() real numbers.
This member function does not change the current Fourier transform in this object, if any.
Returns a reference to this object.
|
inline |
|
inline |
Fast Fourier transform. Performs the FFT of a vector of real numbers.
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 658 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 real values.
The value of y must be the starting address of a contiguous block of at least Length() elements.
If no FFT has been performed for 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 the specified vector of real 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 677 of file FFT1D.h.
References pcl::GenericVector< T >::Length().
|
inlinestatic |
Returns the optimized real FFT length larger than or equal to a given length n. The returned length will be optimal to perform a FFT of real data with the current PCL implementation. The optimized length can be used as the argument to the constructor of any FFT class for real data transforms.