-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeasure.h
36 lines (30 loc) · 1.08 KB
/
measure.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
#ifndef MEASURE_H
#define MEASURE_H
#include <opencv2/opencv.hpp>
#include <vector>
#include "common.h"
using namespace std;
using namespace cv;
class MeasureDistance{
public:
void getPoint2D(Target &target);
void getPoint3D();
void getPoint3D1();
Point3f pnpResolving();
private:
//单目大符相机内参
const cv::Mat caremaMatrix = (
cv::Mat_<float>(3, 3) <<
1007.71031680782, 1.06891167897360, 622.027728537478,
0, 1345.23165046327, 667.300428891571,
0, 0, 1);
//畸变参数
const cv::Mat distCoeffs = (cv::Mat_<float>(1, 5) << 0.0180891111150545,
0.0209453916251860,
0.00363657514369072,
0.00137452978133387,
-0.186986366245217);
vector<Point2f> point2D;
vector<Point3f> point3D;
};
#endif // MEASURE_H