-
Notifications
You must be signed in to change notification settings - Fork 0
/
graphmatch.h
52 lines (37 loc) · 1.12 KB
/
graphmatch.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
#ifndef GRAPHMATCH_H
#define GRAPHMATCH_H
#include <QObject>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/flann/flann.hpp>
#include <iostream>
#include <fstream>
#include "segmentation.h"
#include "utilTypes.h"
#include "qcustomplot.h"
using namespace cv;
#define MATCH_LINE_COLOR Scalar(0,0,0)
#define MATCH_LINE_WIDTH 2
#define MATCH_CIRCLE_RADIUS 20
#define MULTIPLIER_1000 10000.0
#define IMG_RESIZE_RATIO 0.3
class GraphMatch : public QObject
{
Q_OBJECT
public:
GraphMatch(Parameters* params);
float drawMatches(vector<NodeSig> ns1, vector<NodeSig> ns2,
Mat img1, Mat img2);
float matchTwoImages(vector<NodeSig> ns1, vector<NodeSig> ns2,
Mat& assignment, Mat& cost);
float matchTwoImages(SSG& ssg1, SSG& ssg2,
Mat& assignment, Mat& cost);
double calcN2NDistance(NodeSig s1, NodeSig s2);
Parameters* params;
signals:
void showMatchImage(QImage img);
public slots:
};
#endif // GRAPHMATCH_H