-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcliente.h
More file actions
64 lines (48 loc) · 1.17 KB
/
cliente.h
File metadata and controls
64 lines (48 loc) · 1.17 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
#ifndef CLIENTE_H
#define CLIENTE_H
#include <QObject>
#include <QTcpSocket>
#include <QCamera>
#include <QMovie>
#include <QTimer>
#include <QTime>
#include <QPixmap>
#include <QBuffer>
#include <QPainter>
#include <opencv2/opencv.hpp>
#include "cvmatandqimage.h"
#include "capturebuffer.h"
#define PROTOCOL "VVG"
#define PROTOCOL_VERSION "0.1"
typedef std::vector<cv::Mat> ImagesType;
typedef std::vector<std::vector<cv::Point> > ContoursType;
class cliente : public QObject
{
Q_OBJECT
private:
QList<QByteArray> devices_;
int selectedDevice_;
CaptureBuffer *captureBuffer_;
QMovie *movie_;
QCamera *camera_;
QTimer *timer_;
const int TIMEOUT_TIMER;
QTcpSocket *socket_;
QString hostAdress_;
bool mode_;
qint16 port_;
cv::BackgroundSubtractorMOG2 *backgroundSubtractor;
cv::Mat foregroundMask;
QVector<QRect> VRect;
void startStream(const QImage &image2);
public:
explicit cliente(QObject *parent = 0);
~cliente();
signals:
public slots:
void movie_updated(const QRect& rect);
void image_s(const QImage &image);
void ConnectToHost();
void StreamVideo();
};
#endif // CLIENTE_H