Add OpenCV source code
[platform/upstream/opencv.git] / modules / objdetect / src / _lsvm_fft.h
1 #ifndef _LSVM_FFT_H_
2 #define _LSVM_FFT_H_
3
4 #include "_lsvm_types.h"
5 #include "_lsvm_error.h"
6 #include <math.h>
7
8 /*
9 // 1-dimensional FFT
10 //
11 // API
12 // int fft(float *x_in, float *x_out, int n, int shift);
13 // INPUT
14 // x_in              - input signal
15 // n                 - number of elements for searching Fourier image
16 // shift             - shift between input elements
17 // OUTPUT
18 // x_out             - output signal (contains 2n elements in order
19                        Re(x_in[0]), Im(x_in[0]), Re(x_in[1]), Im(x_in[1]) and etc.)
20 // RESULT
21 // Error status
22 */
23 int fft(float *x_in, float *x_out, int n, int shift);
24
25 /*
26 // Inverse 1-dimensional FFT
27 //
28 // API
29 // int fftInverse(float *x_in, float *x_out, int n, int shift);
30 // INPUT
31 // x_in              - Fourier image of 1d input signal(contains 2n elements
32                        in order Re(x_in[0]), Im(x_in[0]),
33                        Re(x_in[1]), Im(x_in[1]) and etc.)
34 // n                 - number of elements for searching counter FFT image
35 // shift             - shift between input elements
36 // OUTPUT
37 // x_in              - input signal (contains n elements)
38 // RESULT
39 // Error status
40 */
41 int fftInverse(float *x_in, float *x_out, int n, int shift);
42
43 /*
44 // 2-dimensional FFT
45 //
46 // API
47 // int fft2d(float *x_in, float *x_out, int numRows, int numColls);
48 // INPUT
49 // x_in              - input signal (matrix, launched by rows)
50 // numRows           - number of rows
51 // numColls          - number of collumns
52 // OUTPUT
53 // x_out             - output signal (contains (2 * numRows * numColls) elements
54                        in order Re(x_in[0][0]), Im(x_in[0][0]),
55                        Re(x_in[0][1]), Im(x_in[0][1]) and etc.)
56 // RESULT
57 // Error status
58 */
59 int fft2d(float *x_in, float *x_out, int numRows, int numColls);
60
61 /*
62 // Inverse 2-dimensional FFT
63 //
64 // API
65 // int fftInverse2d(float *x_in, float *x_out, int numRows, int numColls);
66 // INPUT
67 // x_in              - Fourier image of matrix (contains (2 * numRows * numColls)
68                        elements in order Re(x_in[0][0]), Im(x_in[0][0]),
69                        Re(x_in[0][1]), Im(x_in[0][1]) and etc.)
70 // numRows           - number of rows
71 // numColls          - number of collumns
72 // OUTPUT
73 // x_out             - initial signal (matrix, launched by rows)
74 // RESULT
75 // Error status
76 */
77 int fftInverse2d(float *x_in, float *x_out, int numRows, int numColls);
78
79 #endif