-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
76 lines (56 loc) · 1.65 KB
/
mainwindow.h
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTimer>
#include "calibrate.h"
#include <opencv2/opencv.hpp>
namespace Calibration
{
enum CalibTypes {CHESSBOARD, CIRCLESBOARD, CHARUCOBOARD};
}
namespace Ui
{
class MainWindow;
}
class Welcome;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow (Calibration::CalibTypes, QWidget *parent = 0);
~MainWindow();
private:
int savedImagesNumber = 0;
std::vector<cv::Mat> calibrationImages;
bool widthWasSet = false;
bool heightWasSet = false;
bool cameraWasOpened;
Calibrate *CalibrationObject;
bool calibButtonClicked = false;
int MAX_CAMERA_NUMBER;
cv::VideoCapture capWebcam;
bool open_Camera(int); // function to openCamera with appropriate index
Ui::MainWindow *ui;
cv::Mat matOriginal; // Mat object in OpenCV style
cv::Mat matDrawn;
QImage qimgOriginal; // Image in Qt stye
QTimer* tmrTimer; // timer
int camera_index = 0; // currently running camera
QString patternName;
public slots:
void processFrameAndUpdateGUI();
void on_tryAgain_clicked(); //button to re-enable the image from the camera
void on_nextButton_clicked();
void on_backToMenu_clicked();
signals:
void signalBackToMenu();
private slots:
void on_previousButton_clicked();
void on_calibrationButton_clicked();
void on_height_valueChanged(int arg1);
void on_width_valueChanged(int arg1);
void on_saveFrameButton_clicked();
void on_calibrateCameraButton_clicked();
void on_squareDimensions_valueChanged(double arg1);
};
#endif // MAINWINDOW_H