Subversion Repositories seema-scanner

Rev

Rev 31 | Rev 75 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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
 
31 jakw 37
        cv::Matx33f R1; // extrinsic rotation matrix camera 1
38
        cv::Vec3f   T1; // extrinsic translation vector camera 1
27 jakw 39
 
31 jakw 40
        cv::Matx33f Rr; // extrinsic rotation rotation stage
41
        cv::Vec3f   Tr; // extrinsic translation vector rotation stage
42
 
43
        cv::Matx33f E; // essential matrix
44
        cv::Matx33f F; // fundamental matrix
45
 
27 jakw 46
        void print();
42 jakw 47
        void exportToXML(QString fileName);
27 jakw 48
};
49
 
50
QDataStream& operator>>(QDataStream& in, SMCalibrationParameters& data);
51
QDataStream& operator<<(QDataStream& out, const SMCalibrationParameters& data);
52
 
53
Q_DECLARE_METATYPE(SMCalibrationParameters)
54
 
55
 
56
#endif // SMCALIBRATIONPARAMETERS_H