4 |
jakw |
1 |
#ifndef SMCalibrationParams_H
|
|
|
2 |
#define SMCalibrationParams_H
|
|
|
3 |
|
|
|
4 |
#include <QString>
|
|
|
5 |
#include <opencv2/core/core.hpp>
|
|
|
6 |
|
|
|
7 |
class SMCalibrationParams{
|
|
|
8 |
public:
|
|
|
9 |
SMCalibrationParams() : Kc(1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0), kc(0.0), cam_error(0.0),
|
|
|
10 |
Kp(1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0), kp(0.0), proj_error(0.0),
|
|
|
11 |
Rp(1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0), Tp(0.0), stereo_error(0.0){}
|
|
|
12 |
SMCalibrationParams(cv::Matx33f _Kc, cv::Vec<float, 5> _kc, double _cam_error, cv::Matx33f _Kp, cv::Vec<float, 5> _kp, double _proj_error, cv::Matx33f _Rp, cv::Vec3f _Tp, double _stereo_error) :
|
|
|
13 |
Kc(_Kc), kc(_kc), cam_error(_cam_error), Kp(_Kp), kp(_kp), proj_error(_proj_error), Rp(_Rp), Tp(_Tp), stereo_error(_stereo_error){}
|
|
|
14 |
//SMCalibrationParams(const QString& filename){load(filename);}
|
|
|
15 |
bool load(const QString& filename);
|
|
|
16 |
bool save(const QString& filename);
|
|
|
17 |
bool loadYML(const QString& filename);
|
|
|
18 |
bool saveYML(const QString& filename);
|
|
|
19 |
bool saveMatlab(const QString& filename);
|
|
|
20 |
bool saveSLCALIB(const QString& filename);
|
|
|
21 |
void print(std::ostream &stream);
|
|
|
22 |
|
|
|
23 |
cv::Matx33f Kc; // Intrinsic camera matrix
|
|
|
24 |
cv::Vec<float, 5> kc; // Camera distortion coefficients
|
|
|
25 |
double cam_error;
|
|
|
26 |
|
|
|
27 |
cv::Matx33f Kp; // Intrinsic projector matrix
|
|
|
28 |
cv::Vec<float, 5> kp; // Projector distortion coefficients
|
|
|
29 |
double proj_error;
|
|
|
30 |
|
|
|
31 |
cv::Matx33f Rp; // Extrinsic camera rotation matrix
|
|
|
32 |
cv::Vec3f Tp; // Extrinsic camera rotation matrix
|
|
|
33 |
|
|
|
34 |
double stereo_error;
|
|
|
35 |
|
|
|
36 |
std::string calibrationDateTime;
|
|
|
37 |
};
|
|
|
38 |
|
|
|
39 |
#endif
|