-
Notifications
You must be signed in to change notification settings - Fork 0
/
drawer.h
41 lines (33 loc) · 894 Bytes
/
drawer.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
#ifndef DRAWER_H
#define DRAWER_H
#include <QMainWindow>
#include <QImage>
#include "opencv2/opencv.hpp"
using namespace cv;
#define OFFSET 23
class Drawer{
public:
int _squareSize = 1;
bool _isGrey = false;
QImage *_originImage;
QImage *_editedImage;
QImage *_greyImage;
QImage *_blurImage;
int _imgWidth;
int _imgHeight;
Drawer(){}
~Drawer();
int GetImgwidth();
int GetImgheight();
void SetImage(QMainWindow *MainWindow);
void CaptureColor(int pos_x, int pos_y, int *R, int *G, int *B);
void RGBToGrey();
void DrawPoint(int pos_x, int pos_y, int R, int G, int B);
void DrawSquare(int pos_x, int pos_y, int R, int G, int B);
void DrawSpary(int pos_x, int pos_y, int R, int G, int B);
void GetGaussianBlur();
private:
cv::Mat QImage2Mat(QImage img);
QImage Mat2QImage(cv::Mat mat);
};
#endif // DRAWER