forked from maksym-taranukhin/slam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
triples.h
39 lines (38 loc) · 1.03 KB
/
triples.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
#ifndef TRIPLES_H
#define TRIPLES_H
#include "opencv2/highgui/highgui.hpp"
#include "matchpoints.h"
namespace LuxSlam
{
class Triple
{
public:
MatchPoints first_point;
MatchPoints second_point;
MatchPoints third_point;
cv::Point3d translation_vector;
cv::Mat rotation_matrix;
Triple()
{
translation_vector = cv::Point3d(0,0,0);
rotation_matrix = cv::Mat::eye(3,3,CV_32FC1);
}
cv::Point3d getPoint3d(int frame,int index) const
{
if (frame==0)
{
switch (index){
case 0: return first_point.first3d;
case 1: return second_point.first3d;
case 2: return third_point.first3d;}
}else
{
switch (index){
case 0: return first_point.second3d;
case 1: return second_point.second3d;
case 2: return third_point.second3d;}
}
}
};
}
#endif // TRIPLES_H