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),
|
|
|
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 |
|
|
|
18 |
qRegisterMetaType<SMCalibrationParameters>("SMCalibrationParameters");
|
|
|
19 |
qRegisterMetaTypeStreamOperators<SMCalibrationParameters>("SMCalibrationParameters");
|
|
|
20 |
}
|
|
|
21 |
|
|
|
22 |
~SMCalibrationParameters(){}
|
|
|
23 |
|
|
|
24 |
unsigned int frameHeight;
|
|
|
25 |
unsigned int frameWidth;
|
|
|
26 |
|
|
|
27 |
cv::Matx33f K0; // intrinsic camera matrix
|
|
|
28 |
cv::Vec<float, 5> k0; // distortion coefficients
|
|
|
29 |
double cam0_error; // overall reprojection error
|
|
|
30 |
|
|
|
31 |
cv::Matx33f K1;
|
|
|
32 |
cv::Vec<float, 5> k1;
|
|
|
33 |
double cam1_error;
|
|
|
34 |
|
|
|
35 |
double stereo_error; // stereo calibration reprojection error
|
|
|
36 |
|
|
|
37 |
cv::Matx33f R1; // extrinsic rotation matrix
|
|
|
38 |
cv::Vec3f T1; // extrinsic translation vector
|
|
|
39 |
|
|
|
40 |
void print();
|
|
|
41 |
};
|
|
|
42 |
|
|
|
43 |
QDataStream& operator>>(QDataStream& in, SMCalibrationParameters& data);
|
|
|
44 |
QDataStream& operator<<(QDataStream& out, const SMCalibrationParameters& data);
|
|
|
45 |
|
|
|
46 |
Q_DECLARE_METATYPE(SMCalibrationParameters)
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
#endif // SMCALIBRATIONPARAMETERS_H
|