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
| #ifndef LINEAR_H
| #define LINEAR_H
| #include <iostream>
| #include "camera_config.h"
| #include "math_utils.h"
| #include <math.h>
|
|
| class Linear
| {
| private:
| vector<vector<int>> points_list;
| int center_x;
| int center_y;
| float k = 0;
| float b = 0;
| int flag = 0;
|
| public:
| Linear(vector<vector<int>> cam_vec_ray, int center_x,int center_y);
| double cal_distance();
| double adjust_distance(int base_distance,int bottom_distance, double center_distance,int angle);
|
|
| private:
| void bottom_line();
| void third_line();
| vector<float> inter_points(vector<int> point_A, vector<int> point_B);
|
|
| };
|
| #endif
|
|