27 |
jakw |
1 |
#ifndef SMCALIBRATIONPARAMETERS_H
|
|
|
2 |
#define SMCALIBRATIONPARAMETERS_H
|
|
|
3 |
|
|
|
4 |
#include <QObject>
|
|
|
5 |
#include <QDataStream>
|
|
|
6 |
#include <QMetaType>
|
|
|
7 |
#include <opencv2/opencv.hpp>
|
|
|
8 |
|
|
|
9 |
class SMCalibrationParameters{
|
|
|
10 |
|
|
|
11 |
public:
|
|
|
12 |
|
|
|
13 |
SMCalibrationParameters() : frameHeight(0), frameWidth(0),
|
|
|
14 |
K0(1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0), k0(0.0), cam0_error(0.0),
|
|
|
15 |
K1(1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0), k1(0.0), cam1_error(0.0),
|
75 |
jakw |
16 |
R1(1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0), T1(0.0), stereo_error(0.0),
|
|
|
17 |
Rr(1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0), Tr(0.0),
|
|
|
18 |
E(0.0), F(0.0){
|
27 |
jakw |
19 |
|
167 |
jakw |
20 |
//qRegisterMetaType<SMCalibrationParameters>("SMCalibrationParameters");
|
|
|
21 |
//qRegisterMetaTypeStreamOperators<SMCalibrationParameters>("SMCalibrationParameters");
|
27 |
jakw |
22 |
}
|
|
|
23 |
|
|
|
24 |
~SMCalibrationParameters(){}
|
|
|
25 |
|
|
|
26 |
unsigned int frameHeight;
|
|
|
27 |
unsigned int frameWidth;
|
|
|
28 |
|
|
|
29 |
cv::Matx33f K0; // intrinsic camera matrix
|
|
|
30 |
cv::Vec<float, 5> k0; // distortion coefficients
|
|
|
31 |
double cam0_error; // overall reprojection error
|
148 |
jakw |
32 |
std::vector<float> cam0_errors_per_view; // per view reprojection errors
|
27 |
jakw |
33 |
|
|
|
34 |
cv::Matx33f K1;
|
|
|
35 |
cv::Vec<float, 5> k1;
|
|
|
36 |
double cam1_error;
|
|
|
37 |
|
31 |
jakw |
38 |
cv::Matx33f R1; // extrinsic rotation matrix camera 1
|
|
|
39 |
cv::Vec3f T1; // extrinsic translation vector camera 1
|
75 |
jakw |
40 |
double stereo_error; // stereo calibration reprojection error
|
148 |
jakw |
41 |
std::vector<float> cam1_errors_per_view; // per view reprojection errors
|
27 |
jakw |
42 |
|
31 |
jakw |
43 |
cv::Matx33f Rr; // extrinsic rotation rotation stage
|
|
|
44 |
cv::Vec3f Tr; // extrinsic translation vector rotation stage
|
|
|
45 |
|
|
|
46 |
cv::Matx33f E; // essential matrix
|
|
|
47 |
cv::Matx33f F; // fundamental matrix
|
|
|
48 |
|
148 |
jakw |
49 |
|
27 |
jakw |
50 |
void print();
|
42 |
jakw |
51 |
void exportToXML(QString fileName);
|
135 |
jakw |
52 |
void importFromXML(QString fileName);
|
27 |
jakw |
53 |
};
|
|
|
54 |
|
|
|
55 |
QDataStream& operator>>(QDataStream& in, SMCalibrationParameters& data);
|
|
|
56 |
QDataStream& operator<<(QDataStream& out, const SMCalibrationParameters& data);
|
|
|
57 |
|
|
|
58 |
Q_DECLARE_METATYPE(SMCalibrationParameters)
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
#endif // SMCALIBRATIONPARAMETERS_H
|