-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDeBruijnImplementation.h
53 lines (43 loc) · 1.26 KB
/
DeBruijnImplementation.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
51
52
53
#ifndef DEBRUIJN_IMPLEMENTATION_H
#define DEBRUIJN_IMPLEMENTATION_H
#include "slBenchmark.h"
#define DEBRUIJN_K 5
#define DEBRUIJN_N 3
#define DEBRUIJN_ALPHA 0.2
#define DEBRUIJN_BETA 0.8
//#define DEBRUIJN_ALPHA -1.0
//#define DEBRUIJN_BETA 2.0
//#define DEBRUIJN_THRESHOLD 5000
#define DEBRUIJN_THRESHOLD 200
using namespace cv;
typedef struct {
double score;
int numberItems;
int caseSigma;
} pairScore;
class DeBruijnImplementation : public slImplementation {
public:
DeBruijnImplementation(unsigned int);
virtual ~DeBruijnImplementation() {};
void preExperimentRun();
void postExperimentRun();
virtual double getPatternWidth();
bool hasMoreIterations();
virtual Mat generatePattern();
void calculateCroppedCapture();
virtual void processCapture(Mat);
virtual void postIterationsProcess();
unsigned int getNumberColumns();
unsigned int getNumberEdges();
protected:
void db(int, int, int, int, vector<int> &, vector<int> &);
double clamp(double, double, double);
double consistency(int, int);
double score(Vec3s, Vec3s);
double sigma(int, int, Vec3s *, Vec3s *, pairScore **);
void populateCorrespondences(int, int, int[][2], pairScore **);
Vec3s *transitions;
private:
double numberEdges;
};
#endif //DEBRUIJN_IMPLEMENTATION_H