-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathserver.h
92 lines (74 loc) · 1.98 KB
/
server.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
#ifndef SERVER_H
#define SERVER_H
#include <QMainWindow>
#include <QObject>
#include <QTcpServer>
#include <QTcpSocket>
#include <QDebug>
#include <QFileDialog>
#include <QDateTime>
#include <QTableWidget>
#include <QMessageBox>
#include <QLabel>
#include <QPushButton>
#include <QStatusBar>
#include <QTimer>
// DBOX modules
#include "preprocessing.h"
#include "extraction.h"
#include "matcher.h"
// OpenCV
#include "opencv2/world.hpp"
// Suprema BioMini Slim image size in bytes
#define SUPREMA_IMG_SIZE 153600
// Suprema BioMini Slim image size in pixels
#define SUPREMA_IMG_WIDTH 320
#define SUPREMA_IMG_HEIGHT 480
// control data size in bytes
#define CONTROL_DATA_SIZE 16
namespace Ui {
class Server;
}
class Server : public QMainWindow
{
Q_OBJECT
public:
explicit Server(QWidget *parent = 0);
~Server();
void setServerStatus(bool);
void statusBarMsg(const QString& msg, quint64 time);
public slots:
void connectionSlot();
void readSlot();
void disconnectClientSlot(bool);
void clientDisconnectedSlot();
void stateChangedSlot(QAbstractSocket::SocketState);
void preprocessingDoneSlot(PREPROCESSING_RESULTS results);
void extractionDoneSlot(EXTRACTION_RESULTS results);
void verificationDoneSlot(bool success);
private slots:
void on_start_server_button_clicked();
void on_stop_server_button_clicked();
void on_save_image_button_clicked();
void on_output_combo_activated(const QString &arg1);
void on_save_image_button2_clicked();
void on_save_conn_help_clicked();
void on_conn_preset_activated(const QString &arg1);
private:
Ui::Server *ui;
QTcpServer server;
QTcpSocket* tcpsocket;
QList<QTcpSocket*> tcpsockets;
QByteArray img;
Preprocessing p;
Extraction e;
Matcher m;
QImage originalImage, skeletonImage;
unsigned char* lastImageData;
QVector<QVector<MINUTIA>> fingerprints;
int fragmentCounter;
int bc_class;
int img_w, img_h;
int windowID;
};
#endif // SERVER_H