-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimpleFlowDenseOF.h
32 lines (30 loc) · 1.27 KB
/
SimpleFlowDenseOF.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
#pragma once
#include "DenseOF.h"
class SimpleFlowDenseOF: public DenseOF
{
public:
SimpleFlowDenseOF() { setOmegaRadius(0); setetaRadius(0); } ;
~SimpleFlowDenseOF() {};
bool calcFlow( Mat &resultImage );
void setOmegaRadius( const unsigned OmRadius ) { OmegaRadius = OmRadius; OmegaPixelCount = (2*OmRadius+1)*(2*OmRadius+1);};
void setetaRadius( const unsigned etRadius ) { etaRadius = etRadius; etaPixelCount = (2*etRadius+1)*(2*etRadius+1); };
void setsigma_d( const float sigma_d_in ) { sigma_d = sigma_d_in; assert(sigma_d > 0); };
void setsigma_c( const float sigma_c_in ) { sigma_c = sigma_c_in; assert(sigma_c > 0); };
private:
bool calcFlowAtLevel( Mat &fromImage, Mat &toImage, Mat ¤tFlow, Mat &newFlow );
bool calcNormsWithMean( Mat &fromImage, Mat &toImage, Mat ¤tFlow, Mat &norms );
bool filterThenFindEnergyMinimiser( Mat &fromImage, Mat &norms, Mat ¤tFlow, Mat &newFlow );
void createMapping();
unsigned OmegaRadius;
unsigned OmegaPixelCount;
unsigned etaRadius;
unsigned etaPixelCount;
float sigma_d;
float sigma_c;
Mat mapto1DOmega;
vector<int> vecxOmega;
vector<int> vecyOmega;
Mat mapto1Deta;
vector<int> vecxeta;
vector<int> vecyeta;
};