PCL
|
Generic two-dimensional fast Fourier transform of real data. More...
#include <FFT2D.h>
Public Types | |
using | base = AbstractFFT2D< T > |
using | complex = typename base::complex |
using | complex_matrix = typename base::complex_matrix |
using | complex_vector = typename base::complex_vector |
using | matrix = typename base::matrix |
using | scalar = typename base::scalar |
using | transform = typename base::transform |
using | vector = typename base::vector |
Public Types inherited from pcl::AbstractFFT2D< T > | |
using | complex = Complex< T > |
using | complex_matrix = GenericMatrix< complex > |
using | complex_vector = GenericVector< complex > |
using | matrix = GenericMatrix< scalar > |
using | scalar = T |
using | transform = complex_matrix |
using | vector = GenericVector< scalar > |
Public Member Functions | |
GenericRealFFT2D (int rows, int cols) | |
GenericRealFFT2D (int rows, int cols, StatusMonitor &status) | |
~GenericRealFFT2D () override | |
GenericRealFFT2D & | operator() (complex *y, const scalar *x) const |
GenericRealFFT2D & | operator() (scalar *y, const complex *x) const |
GenericRealFFT2D & | operator<< (const matrix &x) |
GenericRealFFT2D & | operator<< (const scalar *x) |
GenericRealFFT2D & | operator>> (matrix &y) const |
GenericRealFFT2D & | operator>> (scalar *y) const |
Public Member Functions inherited from pcl::AbstractFFT2D< T > | |
AbstractFFT2D (int rows, int cols) | |
AbstractFFT2D (int rows, int cols, StatusMonitor &monitor) | |
~AbstractFFT2D () override | |
int | Cols () const |
transform & | DFT () |
transform | DFT () const |
int | NumberOfElements () const |
virtual void | Release () |
int | Rows () const |
Public Member Functions inherited from pcl::ParallelProcess | |
ParallelProcess ()=default | |
ParallelProcess (const ParallelProcess &)=default | |
virtual | ~ParallelProcess () |
void | DisableParallelProcessing (bool disable=true) noexcept |
void | EnableParallelProcessing (bool enable=true, int maxProcessors=0) noexcept |
bool | IsParallelProcessingEnabled () const noexcept |
int | MaxProcessors () const noexcept |
ParallelProcess & | operator= (const ParallelProcess &)=default |
void | SetMaxProcessors (int maxProcessors) noexcept |
void | Swap (ParallelProcess &process) noexcept |
Static Public Member Functions | |
static int | OptimizedLength (int n) |
The GenericRealFFT2D template class performs forward and inverse, out-of-place fast two-dimensional 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 two-dimensional fast Fourier transforms of complex-valued data, see the GenericFFT2D template class.
using pcl::GenericRealFFT2D< T >::base = AbstractFFT2D<T> |
using pcl::GenericRealFFT2D< T >::complex = typename base::complex |
using pcl::GenericRealFFT2D< T >::complex_matrix = typename base::complex_matrix |
using pcl::GenericRealFFT2D< T >::complex_vector = typename base::complex_vector |
using pcl::GenericRealFFT2D< T >::matrix = typename base::matrix |
using pcl::GenericRealFFT2D< T >::scalar = typename base::scalar |
using pcl::GenericRealFFT2D< T >::transform = typename base::transform |
using pcl::GenericRealFFT2D< T >::vector = typename base::vector |
|
inline |
Constructs a GenericRealFFT2D object of the specified dimensions rows and cols.
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 GenericRealFFT2D::OptimizedLength() to get the smallest optimal dimensions for your real-valued data, then place them on a matrix of the obtained dimensions, padded with zeros.
|
inline |
Constructs a GenericRealFFT2D object of the specified dimensions rows and cols, using the specified status monitoring object status.
On each transform performed with this object, the status m_monitor will be incremented by the sum of transform dimensions: rows + cols.
See the GenericRealFFT2D( int, int ) constructor for more information.
|
inlineoverride |
|
inline |
Performs the two-dimensional FFT of an input matrix of real numbers, and stores the result in an output matrix of complex numbers.
[in] | x | Input matrix. Must be the starting address of a contiguous sequence of at least NumberOfElements() real numbers, stored in row order: all elements of the first row followed by all elements of the second row, and so on. |
[out] | y | Output matrix, where the result of the transform will be stored. Must be the starting address of a contiguous sequence of at least Rows()*(Cols()/2 + 1) complex numbers. The result will be stored in row order: all elements of the first row followed by all elements of the second row, and so on, where each row has Cols()/2 + 1 complex numbers. |
The output matrix will have Rows() rows and Cols()/2 + 1 columns, stored in row order.
This member function does not change the current Fourier transform in this object, if it exists.
Returns a reference to this object.
|
inline |
Performs the inverse two-dimensional FFT of an input matrix of complex numbers, and stores the result in an output matrix of real numbers.
[in] | x | Input matrix. Must be the starting address of a contiguous sequence of at least Rows()*(Cols()/2 + 1) complex numbers, stored in row order: all elements of the first row followed by all elements of the second row, and so on, where each row must have Cols()/2 + 1 complex numbers. |
[out] | y | Output matrix, where the result of the transform will be stored. Must be the starting address of a contiguous sequence of at least NumberOfElements() real numbers. The result will be stored in row order: all elements of the first row followed by all elements of the second row, and so on. |
The input matrix must have Rows() rows and Cols()/2 + 1 columns, stored in row order.
This member function does not change the current Fourier transform in this object, if it exists.
Returns a reference to this object.
|
inline |
Fast Fourier transform. Performs the two-dimensional FFT of a matrix of real numbers.
The specified matrix x must have Rows() and Cols() dimensions. Otherwise an Error exception will be thrown.
Returns a reference to this object.
Definition at line 680 of file FFT2D.h.
References pcl::GenericMatrix< T >::Rows().
|
inline |
Fast Fourier transform. Performs the two-dimensional FFT of the specified matrix of real values.
The argument x must be the starting address of a contiguous block of at least NumberOfElements() elements, stored in row order: all elements of the first matrix row followed by all elements of the second row, and so on.
Returns a reference to this object.
|
inline |
Inverse fast Fourier transform. Performs the two-dimensional inverse FFT and stores the result in a matrix of real numbers.
The specified matrix y must have Rows() and Cols() dimensions. 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 701 of file FFT2D.h.
References pcl::GenericMatrix< T >::Rows().
|
inline |
Inverse fast Fourier transform. Performs the two-dimensional inverse FFT and stores the result in the specified matrix of real values.
The argument y must be the starting address of a contiguous block of at least NumberOfElements() elements. The result matrix will be stored in row order: all elements of the first matrix row followed by all elements of the second row, and so on.
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.
|
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 real data with the current PCL implementation. The optimized length can be used as the rows or cols argument to the constructor of any two-dimensional FFT class for real-valued data transforms.
Definition at line 779 of file FFT2D.h.
References pcl::GenericFFT< T >::OptimizedLength().