-
Notifications
You must be signed in to change notification settings - Fork 0
/
ocvcolor.h
52 lines (48 loc) · 1.34 KB
/
ocvcolor.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
44
45
46
47
48
49
50
51
52
#ifndef OCVCOLOR_H
#define OCVCOLOR_H
#include <QString>
#include <QVector>
#include <QColor>
#define OPENCV_START {
#include <opencv2/imgcodecs.hpp>
#define OPENCV_END }
#define BUFFER 32
enum eHSV { lower_, upper_ };
enum eHSVlower { huemin, satmin, valmin };
enum eHSVupper { huemax, satmax, valmax };
using namespace cv;
class ocvColor {
public:
ocvColor(QString name, QColor rgb, Scalar HSVlower, Scalar HSVupper);
~ocvColor() {}
#define SET_START {
void set_name(QString name) {
this->ColorName = name;
}
void set_rgb(QColor color) {
this->rgb = color;
}
void set_HSV(eHSV hsv, Scalar value_hsv);
#define SET_END }
#define GET_START {
QString get_name() {
return ColorName;
}
QColor get_rgb() {
return this->rgb;
}
Scalar get_HSV(eHSV hsv);
QVector<Point> get_allPOINTS();
#define GET_END }
#define OVERLOADING_START {
void operator+(Point pt);
#define OVERLOADING_END }
private:
//VARIABLES
QString ColorName;
QColor rgb;
Scalar HSVlower;
Scalar HSVupper;
QVector<Point> trackedPOINTS;
};
#endif // OCVCOLOR_H