]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/blob - src/fft.h
Merge branch 'rotation' of https://github.com/Shanigen/kcf into rotation
[hercules2020/kcf.git] / src / fft.h
1
2 #ifndef FFT_H
3 #define FFT_H
4
5 #include <opencv2/opencv.hpp>
6 #include <vector>
7 #include "threadctx.hpp"
8
9 #ifdef CUFFT
10     #include "complexmat.cuh"
11 #else
12     #include "complexmat.hpp"
13 #endif
14
15 #ifdef BIG_BATCH
16 #define BIG_BATCH_MODE 1
17 #else
18 #define BIG_BATCH_MODE 0
19 #endif
20
21 class Fft
22 {
23 public:
24     virtual void init(unsigned width, unsigned height,unsigned num_of_feats, unsigned num_of_scales) = 0;
25     virtual void set_window(const cv::Mat & window) = 0;
26     virtual void forward(const cv::Mat & real_input, ComplexMat & complex_result, float *real_input_arr, cudaStream_t  stream) = 0;
27     virtual void forward_window(std::vector<cv::Mat> patch_feats, ComplexMat & complex_result, cv::Mat & fw_all, float *real_input_arr, cudaStream_t stream) = 0;
28     virtual void inverse(ComplexMat &  complex_input, cv::Mat & real_result, float *real_result_arr, cudaStream_t stream) = 0;
29     virtual ~Fft() = 0;
30 };
31
32 #endif // FFT_H