Skip to content

Commit 88bd610

Browse files
author
Erika
committed
Refactoring class structure
1 parent 4ada712 commit 88bd610

8 files changed

+727
-905
lines changed

depthmap/camera.h

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
11
#ifndef CAMERA_H
22
#define CAMERA_H
3+
#include <tiffio.h>
4+
#include <vector>
5+
#include <QString>
6+
#include <eigen3/Eigen/Core>
37

48
class Camera
59
{
610
public:
7-
Camera();
11+
//intrinsic
12+
uint32_t width = 0, height = 0;
13+
float focal = 0;
14+
float PPx = 0, PPy = 0; // principal point
15+
float Cx = 0, Cy = 0; // center of distorsion
16+
float R3 = 0, R5 = 0, R7 = 0; // radial distorsion
17+
//extrinsic
18+
Eigen::Matrix3f rotation;
19+
Eigen::Vector3f center;
20+
bool loadXml(const QString &path); //read the MicMac xml origin, origin resolution ecc.
21+
bool loadInternParameters(const QString &internePath); // read the xml with the center, rotation, focal parameter, principal points parameters ecc.
22+
Eigen::Vector3f projectionToImage(Eigen::Vector3f realPosition) const;
23+
Eigen::Vector3f applyRadialDistortion(Eigen::Vector3f& u);
24+
Eigen::Vector3f applyIntrinsicCalibration(Eigen::Vector3f& u) const;
825
};
926

1027
#endif // CAMERA_H

0 commit comments

Comments
 (0)