forked from rafapages/pointcloudmesher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
camera.h
41 lines (26 loc) · 898 Bytes
/
camera.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
#ifndef CAMERA_H
#define CAMERA_H
#include <Eigen/Dense>
#include <stdio.h>
#include "pointXYZRGBNormalCam.h"
class Camera{
public:
Camera();
~Camera();
float getFocalLength() const;
const Eigen::Matrix3f& getRotationMatrix() const;
const Eigen::Vector3f& getTranslationVector() const;
void setFocalLength(const float _f);
void setDistortionCoefficients(const float _k1, const float _k2);
void setRotationMatrix(const Eigen::Matrix3f _R);
void setTranslationVector(const Eigen::Vector3f _t);
Eigen::Vector3f getCameraPosition() const;
void getCameraPosition(PointXYZRGBNormalCam& _point) const;
void readCamera(std::ifstream& _stream);
private:
float f_; // Focal length
float k1_, k2_; // Radial distortion coefficients
Eigen::Matrix3f R_; // Rotation matrix
Eigen::Vector3f t_; // Camera translation vector
};
#endif