3DStereoReconstructionApp
calibrationstereocamera.h
Go to the documentation of this file.
1#ifndef CALIBRATIONSTEREOCAMERA_H
2#define CALIBRATIONSTEREOCAMERA_H
3
5#include <iostream>
6#include <opencv2/calib3d.hpp>
7#include <opencv2/core.hpp>
8#include <opencv2/highgui.hpp>
9#include <opencv2/imgproc.hpp>
10#include <string>
11
12using namespace std;
13using namespace cv;
14
16
17public:
19 CalibrationStereoCamera(String pathCalibrationPicturesLeftCamera,
20 String pathCalibrationPicturesRightCamera);
22
24
26
29 template <class T> void printAllPoint(const vector<T> &points);
31
33
34 void saveFile();
35private:
36 vector<vector<Point3f>> objectPoints;
37 vector<vector<Point2f>> imagePointsLeftCamera, imagePointsRightCamera;
38
39 vector<Point2f> cornersLeftCamera;
40 vector<Point2f> cornersRightCamera;
41
42 vector<Point3f> obj;
43 int chessBoard[2] = {8, 6};
44 int squareSize{30};
45
46 CalibrationPictures calibrationPictures;
47
48 Mat leftPicture;
49 Mat rightPicture;
50 // left - Right Camera
51 Mat mtxL, distL, R_L, T_L;
52 Mat mtxR, distR, R_R, T_R;
53 Mat new_mtxL, new_mtxR;
54
55 // Stereo Camera
56 Mat Rot, Trns, Emat, Fmat;
57 Mat rect_l, rect_r, proj_mat_l, proj_mat_r, Q;
58 Mat leftStereoMapX, leftStereoMapY;
59 Mat rightStereoMapX, rightStereoMapY;
60
61
62};
63
64#endif // CALIBRATIONSTEREOCAMERA_H
Definition: calibrationpictures.h:17
Definition: calibrationstereocamera.h:15
void findAndStoreChessBoardPoints()
Definition: calibrationstereocamera.cpp:15
void defineWorldCoordinates3DPoints()
void executeCaibrationStereoCamera()
Definition: calibrationstereocamera.cpp:142
void printAllPoint(const vector< T > &points)
Definition: calibrationstereocamera.cpp:157
~CalibrationStereoCamera()
Definition: calibrationstereocamera.cpp:9
void saveFile()
Definition: calibrationstereocamera.cpp:133
void calibrateEachCamera()
Definition: calibrationstereocamera.cpp:91
void UndistortRectifyMap()
Definition: calibrationstereocamera.cpp:125
void calibrateStereoCamera()
Definition: calibrationstereocamera.cpp:108