-
Notifications
You must be signed in to change notification settings - Fork 0
/
showimage.h
43 lines (38 loc) · 947 Bytes
/
showimage.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
#ifndef SHOWIMAGE_H
#define SHOWIMAGE_H
#include<imageprovider.h>
#include <opencv.hpp>
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/videoio.hpp"
#include "opencv2/imgproc/types_c.h"
#include "Thread.h"
extern "C"
{
#include <libswscale/swscale.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
}
#pragma comment(lib, "swscale.lib")
#pragma comment(lib, "avcodec.lib")
#pragma comment(lib, "avutil.lib")
#pragma comment(lib, "avformat.lib")
using namespace cv;
using namespace std;
class ShowImage : public QObject
{
Q_OBJECT
public:
explicit ShowImage(QObject *parent = 0);
ImageProvider *m_pImgProvider;
QImage MattoQImage(Mat cvImg);
Mat QImage2cvMat(QImage image);
void connectWithThread(IThread* t);
void closewithThread(IThread* t);
public slots:
void setImage(QImage Image1);
signals:
void callQmlRefeshImg();
private:
};
#endif // IMAGESHOW_H