-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.h
118 lines (102 loc) · 2.26 KB
/
home.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
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
110
111
112
113
114
115
116
117
118
#ifndef HOME_H
#define HOME_H
#include <QMainWindow>
#include <QtWidgets>
#include <QString>
#include <QApplication>
#include <QtWidgets>
#include <iostream>
#include <QGraphicsOpacityEffect>
#include <QPropertyAnimation>
#include <opencv2/opencv.hpp>
#include <opencv2/face.hpp>
#include <iostream>
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <dirent.h>
#include <opencv2/objdetect.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include "opencv2/core.hpp"
#include <opencv2/core/core.hpp>
#include <fstream>
#include <sstream>
class Home;
class MarkAttendance;
using namespace std;
using namespace cv;
using namespace cv::face;
class AddStudent
{
private:
string cf;
string ff;
string ef;
string sf;
string videoPath;
string roll;
int filenumber;
public:
AddStudent(QString classFolder, QSpinBox *rollEdit);
void detectAndDisplay(Mat frame);
void addFace(int i, QString vidPath);
void eigenFaceTrainer();
};
class Student
{
private:
QString name;
string roll;
QString Label;
QString date;
bool present;
bool marked;
public:
Student(int label);
string Mark(MarkAttendance *M);
};
class MarkAttendance
{
private:
string cf;
string ef;
string sf;
string af;
QString SF;
QString AF;
int label;
bool marked = false;
int array_hash[200] = {0};
public:
MarkAttendance(QString cf, QComboBox *subBox, QComboBox *comboBox, QSpinBox *batchEdit, QString today);
void faceRecognition();
friend string Student::Mark(MarkAttendance *M);
};
class Home : public QMainWindow
{
Q_OBJECT
private:
QMainWindow *menu;
QWidget *addStudentPage;
QMainWindow *addFacePage;
QString today;
bool isFaceAdded;
bool isFaceDeleted;
QString dir = "/home/teja/Mark/Database/";
public:
Home();
~Home();
private slots:
void showMenu();
void addFaceButton(QString classFolder, QString faceFolder, QSpinBox *rollEdit);
void recognizeFaceButton();
void showMessage(const QString &message);
void addStudentButton();
void deleteStudentButton();
void webCamButton(AddStudent &S);
void videoButton(QString classFolder, QSpinBox *rollEdit);
};
#endif // HOME_H