-
Notifications
You must be signed in to change notification settings - Fork 7
/
oflow.h
50 lines (33 loc) · 1.12 KB
/
oflow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Class implements main flow computation loop over all scales
#ifndef OFC_HEADER
#define OFC_HEADER
#include <nppi.h>
#include <cublas_v2.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include "params.h"
#include "patchgrid.h"
#include "refine_variational.h"
using std::cout;
using std::endl;
namespace OFC {
class OFClass {
public:
OFClass(opt_params _op, img_params _i_params);
~OFClass();
void calc(Npp32f* _I0, Npp32f* _I1, img_params _iparams, const float * initflow, float * outflow);
private:
void ConstructImgPyramids(img_params iparams);
Npp32f* I0, * I1;
float ** I0s, ** I0xs, ** I0ys;
float ** I1s, ** I1xs, ** I1ys;
opt_params op; // Struct for optimization parameters
std::vector<img_params> iparams; // Struct (for each scale) for image parameter
std::vector<PatGridClass*> grid;
std::vector<float*> flow;
// Temp images to speedup pyramid generation
Npp32f* pDeviceIx, *pDeviceIy, *pDeviceTmp, *pDeviceWew;
};
}
#endif /* OFC_HEADER */