Main MRPT website > C++ reference for MRPT 1.5.6
fourier.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
8  +---------------------------------------------------------------------------+ */
9 #ifndef mrpt_math_fourier_H
10 #define mrpt_math_fourier_H
11
12 #include <mrpt/utils/utils_defs.h>
14
15 /*---------------------------------------------------------------
16  Namespace
17  ---------------------------------------------------------------*/
18 namespace mrpt
19 {
20  namespace math
21  {
22
23  /** \addtogroup fourier_grp Fourier transform functions
24  * \ingroup mrpt_base_grp
25  * @{ */
26
27  /** Computes the FFT of a 2^N-size vector of real numbers, and returns the Re+Im+Magnitude parts.
28  * \sa fft2_real
29  */
30  void BASE_IMPEXP fft_real( CVectorFloat &in_realData,
31  CVectorFloat &out_FFT_Re,
32  CVectorFloat &out_FFT_Im,
33  CVectorFloat &out_FFT_Mag );
34
35  /** Compute the 2D Discrete Fourier Transform (DFT) of a real matrix, returning the real and imaginary parts separately.
36  * \param in_data The N_1xN_2 matrix.
37  * \param out_real The N_1xN_2 output matrix which will store the real values (user has not to initialize the size of this matrix).
38  * \param out_imag The N_1xN_2 output matrix which will store the imaginary values (user has not to initialize the size of this matrix).
39  * \sa fft_real, ifft2_read, fft2_complex
40  * If the dimensions of the matrix are powers of two, the fast fourier transform (FFT) is used instead of the general algorithm.
41  */
43  const CMatrixFloat &in_data,
44  CMatrixFloat &out_real,
45  CMatrixFloat &out_imag );
46
47  /** Compute the 2D inverse Discrete Fourier Transform (DFT)
48  * \param in_real The N_1xN_2 input matrix with real values.
49  * \param in_imag The N_1xN_2 input matrix with imaginary values.
50  * \param out_data The N_1xN_2 output matrix (user has not to initialize the size of this matrix).
51  * Note that the real and imaginary parts of the FFT will NOT be checked to assure that they represent the transformation
52  * of purely real data.
53  * If the dimensions of the matrix are powers of two, the fast fourier transform (FFT) is used instead of the general algorithm.
54  * \sa fft_real, fft2_real
55  */
57  const CMatrixFloat &in_real,
58  const CMatrixFloat &in_imag,
59  CMatrixFloat &out_data );
60
61  /** Compute the 2D Discrete Fourier Transform (DFT) of a complex matrix, returning the real and imaginary parts separately.
62  * \param in_real The N_1xN_2 matrix with the real part.
63  * \param in_imag The N_1xN_2 matrix with the imaginary part.
64  * \param out_real The N_1xN_2 output matrix which will store the real values (user has not to initialize the size of this matrix).
65  * \param out_imag The N_1xN_2 output matrix which will store the imaginary values (user has not to initialize the size of this matrix).
66  * If the dimensions of the matrix are powers of two, the fast fourier transform (FFT) is used instead of the general algorithm.
67  * \sa fft_real, idft2_complex,dft2_real
68  */
70  const CMatrixFloat &in_real,
71  const CMatrixFloat &in_imag,
72  CMatrixFloat &out_real,
73  CMatrixFloat &out_imag);
74
75  /** Compute the 2D inverse Discrete Fourier Transform (DFT).
76  * \param in_real The N_1xN_2 input matrix with real values, where both dimensions MUST BE powers of 2.
77  * \param in_imag The N_1xN_2 input matrix with imaginary values, where both dimensions MUST BE powers of 2.
78  * \param out_real The N_1xN_2 output matrix for real part (user has not to initialize the size of this matrix).
79  * \param out_imag The N_1xN_2 output matrix for imaginary part (user has not to initialize the size of this matrix).
80  * \sa fft_real, dft2_real,dft2_complex
81  * If the dimensions of the matrix are powers of two, the fast fourier transform (FFT) is used instead of the general algorithm.
82  */
84  const CMatrixFloat &in_real,
85  const CMatrixFloat &in_imag,
86  CMatrixFloat &out_real,
87  CMatrixFloat &out_imag );
88
89
90  /** Correlation of two matrixes using 2D FFT
91  */
93  const CMatrixFloat &A,
94  const CMatrixFloat &B,
95  CMatrixFloat &out_corr );
96
97  /** @} */
98
99  } // End of MATH namespace
100
101 } // End of namespace
102
103 #endif
void BASE_IMPEXP dft2_real(const CMatrixFloat &in_data, CMatrixFloat &out_real, CMatrixFloat &out_imag)
Compute the 2D Discrete Fourier Transform (DFT) of a real matrix, returning the real and imaginary pa...
Definition: math.cpp:1186
void BASE_IMPEXP fft_real(CVectorFloat &in_realData, CVectorFloat &out_FFT_Re, CVectorFloat &out_FFT_Im, CVectorFloat &out_FFT_Mag)
Computes the FFT of a 2^N-size vector of real numbers, and returns the Re+Im+Magnitude parts...
Definition: math.cpp:1004
dynamic_vector< float > CVectorFloat
Column vector, like Eigen::MatrixXf, but automatically initialized to zeros since construction...
Definition: eigen_frwds.h:35
void BASE_IMPEXP cross_correlation_FFT(const CMatrixFloat &A, const CMatrixFloat &B, CMatrixFloat &out_corr)
Correlation of two matrixes using 2D FFT.
Definition: math.cpp:1991
CMatrixTemplateNumeric< float > CMatrixFloat
Declares a matrix of float numbers (non serializable).
void BASE_IMPEXP idft2_complex(const CMatrixFloat &in_real, const CMatrixFloat &in_imag, CMatrixFloat &out_real, CMatrixFloat &out_imag)
Compute the 2D inverse Discrete Fourier Transform (DFT).
Definition: math.cpp:1560
void BASE_IMPEXP idft2_real(const CMatrixFloat &in_real, const CMatrixFloat &in_imag, CMatrixFloat &out_data)
Compute the 2D inverse Discrete Fourier Transform (DFT)
Definition: math.cpp:1286
void BASE_IMPEXP dft2_complex(const CMatrixFloat &in_real, const CMatrixFloat &in_imag, CMatrixFloat &out_real, CMatrixFloat &out_imag)
Compute the 2D Discrete Fourier Transform (DFT) of a complex matrix, returning the real and imaginary...
Definition: math.cpp:1451

 Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018