This repository was archived by the owner on Apr 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmainwindow.h
More file actions
109 lines (83 loc) · 2.04 KB
/
Copy pathmainwindow.h
File metadata and controls
109 lines (83 loc) · 2.04 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTextEdit>
#include <QVBoxLayout>
#include <QMessageBox>
#include <QGroupBox>
#include <QComboBox>
#include <QLineEdit>
#include "camera.h"
#include "video_dispatch.h"
#include<opencv2/objdetect/objdetect.hpp>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
static const int DEFAULT_FPS;
private:
void createMenu();
void createGeneralTab(QWidget *parent);
void createCalibrationTab(QWidget *parent);
QGroupBox* createAlgorithmBox();
QGroupBox* createCalibrationBox();
QGroupBox* createMouseBox();
void initiateTimer();
void cleanUp();
// overriden methods
void closeEvent(QCloseEvent *event);
private:
//Ui::MainWindow *ui;
// Widgets UI:
//*********************
// LeftBox:
QTabWidget *tabPanel;
QWidget *generalTab;
QWidget *calibrationTab;
// algorithm:
QPushButton *startButton;
QPushButton *stopButton;
// mouse:
QSlider *smoothnessSlider;
QSlider *speedSlider;
QPushButton *resetButton;
QPushButton *repositionButton;
// calibration:
QPushButton *switchCameraButton;
QPushButton *fotoButton;
QLineEdit *maskLowerBound;
QLineEdit *maskUpperBound;
// saveFile:
QLineEdit *saveFileName;
QPushButton *saveButton;
//***********************
// settings/menu:
QAction *saveAction;
QAction *loadAction;
QAction *quitAction;
// invokes painting video frames
QTimer *paintTimer;
// camera access
Camera *camera;
// dispatches video from camera to listeners
VideoDispatcher *dispatcher;
cv::CascadeClassifier *mouthClassifier;
cv::CascadeClassifier *faceClassifier;
private slots:
void save();
void load();
void quit();
void reposition();
void reset();
//buttons
void start();
void stop();
void switchCamera();
Mat* makeFoto();
};
#endif // MAINWINDOW_H