-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdialogcalibration.cpp
42 lines (35 loc) · 1.27 KB
/
dialogcalibration.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "dialogcalibration.h"
#include "ui_dialogcalibration.h"
DialogCalibration::DialogCalibration(QWidget *parent) :
QDialog(parent),
ui(new Ui::DialogCalibration)
{
ui->setupUi(this);
this->setWindowTitle("Calibration");
}
DialogCalibration::~DialogCalibration()
{
delete ui;
}
void DialogCalibration::on_btnExit_clicked()
{
reject();
}
void DialogCalibration::on_btnStart_clicked()
{
CalibrationStereoCamera calibrationStereoCamera(this->pathCalibrationLeftCamera,this->pathCalibrationRightCamera);
int numOfColumns =ui->txtColumns->text().toInt();
int numOfRows = ui->txtRows->text().toInt();
int squareSize = ui->txtSquareSize->text().toInt();
calibrationStereoCamera.setChessBoardColumns(numOfColumns);
calibrationStereoCamera.setChessBoardRows(numOfRows);
calibrationStereoCamera.setSquareSize(squareSize);
calibrationStereoCamera.executeCaibrationStereoCamera();
}
void DialogCalibration::on_btnSelect_clicked()
{
QString dirPath = QFileDialog::getExistingDirectory(this,tr("open Directory"),"/home", QFileDialog::ShowDirsOnly);
String pathCalibrationPictures = dirPath.toStdString();
this->pathCalibrationLeftCamera = pathCalibrationPictures+"/Left";
this->pathCalibrationRightCamera = pathCalibrationPictures+"/Right";
}