-
Notifications
You must be signed in to change notification settings - Fork 0
/
projector.h
37 lines (31 loc) · 861 Bytes
/
projector.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
#ifndef PROJECTOR_H
#define PROJECTOR_H
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <QImage>
#include <QWidget>
#include <QLabel>
#include <QPicture>
#include <QMainWindow>
class Projector : public QWidget
{
public:
Projector(QWidget *parent, int scanW, int scanH, int projW, int projH, int xos, int yos);
~Projector();
void showImg(IplImage *img);
void showMatImg(cv::Mat img);
QImage *IplImageToQPixmap(const IplImage *img);
IplImage* QImageToIplImage(const QImage *qImage);
QLabel *imageLabel;//hold image.
void displaySwitch(bool isWhite);
void opencvWindow();
void destoryWindow();//delete the projector window created by cv after showImg
protected:
void paintEvent(QPaintEvent *event);
private:
int xoffset;
int yoffset;
int height;
int width;
};
#endif // PROJECTOR_H