-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathprojector.h
More file actions
41 lines (33 loc) · 894 Bytes
/
projector.h
File metadata and controls
41 lines (33 loc) · 894 Bytes
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
#ifndef PROJECTOR_H
#define PROJECTOR_H
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <QImage>
#include <QWidget>
#include <QLabel>
#include <QPicture>
#include <QPainter>
#include <QMainWindow>
class Projector : public QWidget
{
public:
Projector(QWidget *parent, int scanW, int scanH, int projW, int projH, int xos, int yos);
~Projector();
void showMatImg(cv::Mat img);
void showImg(cv::Mat img);//直接利用窗口显示由Mat转换而来的Qt图像
void displaySwitch(bool isWhite);
void opencvWindow();
void destoryWindow();//delete the projector window created by cv after showImg
void setCrossVisable(bool flag);
void paintEvent(QPaintEvent *event);
private:
QLabel *label;
QImage pshow;
bool crossVisible;
bool imageAva;
int xoffset;
int yoffset;
int height;
int width;
};
#endif // PROJECTOR_H