-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathCamera.hpp
57 lines (49 loc) · 1.41 KB
/
Camera.hpp
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
53
54
55
56
57
#ifndef CAMERA_HPP
#define CAMERA_HPP
#include<opencv2/opencv.hpp>
class Camera {
private:
float frameRows;
float frameCols;
float theta;
float cosTheta;
float sinTheta;
float focalDistance;
float height;
float Rz; //distance from its projection on the ground(xz plane) to
//ciclyst
public:
Camera();
Camera(std::string confFileName);
~Camera();
void SetFrameRows(int rows);
int GetFrameRows(void);
void SetFrameCols(int cols);
int GetFrameCols(void);
//d := known distance from camera to object.
//h := height of the real object.
//P1 := From image, bottom point of the object.
//P2 := From image, top point of the object.
void SetFocalDistance(float d, float h, cv::Point2f P1, cv::Point2f P2);
float GetFocalDistance(void);
//lr := lengh of the real object.
//P1 := From image, bottom point of the object.
//P2 := From image, top point of the object.
void SetHeight(float lr, cv::Point2f P1, cv::Point2f P2);
float GetHeight(void);
//f := a captured frame.
//l := norm(Rz2 - Rz1).
//P1 := From image, bottom point of the object.
//P2 := From image, top point of the object.
//h := height of known object.
void SetTheta(float l, cv::Point2f P1, cv::Point2f P2, float h);
float GetTheta(void);
float GetCosTheta(void);
float GetSinTheta(void);
//P := ?
//h := real object height.
void SetRz(cv::Point2f P, float h);
float GetRz(void);
void SaveConf(std::string confFileName);
};
#endif