05Robot 3.0

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

Processor_CameraCalibration.h
Go to the documentation of this file.
1
7 #ifndef Processor_CameraCalibration_H
8 #define Processor_CameraCalibration_H
9
10 #include "Processor.h"
11
12 #include <opencv2/opencv.hpp>
13 #include <opencv2/highgui/highgui.hpp>
14 #include <opencv2/imgproc/imgproc.hpp>
15 #include <opencv2/calib3d/calib3d.hpp>
16
17 using namespace std;
26 class Processor_CameraCalibration: public Processor
27 {
28 Q_OBJECT
32 ADD_PROPERTY(path, QString)
36 ADD_PROPERTY(filename, QString)
40 ADD_PROPERTY(boardSize_X, int)
44 ADD_PROPERTY(boardSize_Y, int)
48 ADD_PROPERTY(squareSize, double)
49
50 public:
54 Processor_CameraCalibration()
55 {
56 Processor();
57 inputType = InputTypeMat;
58
59 mode = Processor_CameraCalibration_Mode_Normal;
60
61 m_path = QString("calibration/");
62 m_filename = QString("%s.yml");
63 m_boardSize_X = 9;
64 m_boardSize_Y = 6;
65 m_squareSize = 0.042;
66 }
67
68 private:
69 vector<vector<cv::Point2f> > imagePoints;
70 vector<vector<cv::Point3f> > objectPoints;
71 vector<cv::Point2f> imageCorners;
72 vector<cv::Point3f> objectCorners;
73
74 int acquiredImageDisplayTimeout;
75
76 enum Processor_CameraCalibration_Mode {Processor_CameraCalibration_Mode_Normal, Processor_CameraCalibration_Mode_Acquire, Processor_CameraCalibration_Mode_Calibrate};
77 Processor_CameraCalibration_Mode mode;
78
79
80 public:
86 int start();
94 int process(int t1, int t2);
105 int processSpecial(string s);
111 int stop();
112 };
114 #endif
ADD_PROPERTY
#define ADD_PROPERTY(member, _type)
Definition: common.h:14
Processor
Image processor base class.
Definition: Processor.h:28
Processor_CameraCalibration
Camera calibration image processor.
Definition: Processor_CameraCalibration.h:26
std
Processor.h