-
Notifications
You must be signed in to change notification settings - Fork 0
/
stereorectification.cpp
23 lines (21 loc) · 873 Bytes
/
stereorectification.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "stereorectification.h"
StereoRectification::StereoRectification() { readParametersFromFile(); }
StereoRectification::~StereoRectification() { destroyAllWindows(); }
void StereoRectification::readParametersFromFile() {
FileStorage cvFile =
FileStorage("calibrationParamaters.xml", FileStorage::READ);
cvFile["leftStereoMapX"] >> leftStereoMapX;
cvFile["leftStereoMapY"] >> leftStereoMapY;
cvFile["rightStereoMapX"] >> rightStereoMapX;
cvFile["rightStereoMapY"] >> rightStereoMapY;
cvFile["Q"] >> Q;
cvFile["RoiLeftX"] >> RoiLeft.x;
cvFile["RoiLefY"] >> RoiLeft.y;
cvFile["RoiLeftHeight"] >> RoiLeft.height;
cvFile["RoiLeftWidth"] >> RoiLeft.width;
cvFile["RoiRightX"] >> RoiRight.x;
cvFile["RoiRightY"] >> RoiRight.y;
cvFile["RoiRightHeight"] >> RoiRight.height;
cvFile["RoiRightWidth"] >> RoiRight.width;
cvFile.release();
}