/
reconstructor.h
51 lines (35 loc) · 1.37 KB
/
reconstructor.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
#ifndef RECONSTRUCTOR_H
#define RECONSTRUCTOR_H
#include <vector>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/features2d/features2d.hpp>
#include "opencv2/nonfree/nonfree.hpp"
#include "opencv2/nonfree/features2d.hpp"
#include "opencv2/photo/photo.hpp"
#include <opencv2/legacy/legacy.hpp>
using namespace std;
class Reconstructor
{
public:
Reconstructor();
cv::Mat_<double> *getPCandidatesfromFundamentalMtx (cv::Mat_<double> Fund);
cv::Mat_<double> calculateP2 (cv::Mat_<double> P1,
cv::Mat_<double> *list_possible_P2s,
vector<cv::Point2f> points1,
vector<cv::Point2f> points2);
cv::Mat_<double> triangulate (cv::Mat_<double> x1,
cv::Mat_<double> x2,
cv::Mat_<double> P1,
cv::Mat_<double> P2);
void doTriangulationSweep (cv::Mat_<double> *P1,
cv::Mat_<double> *P2,
vector<cv::Point2f> *points1,
vector<cv::Point2f> *points2,
vector<cv::Point3d> *pc_segment);
int getIndex (void);
private:
int _index;
};
#endif // RECONSTRUCTOR_H