-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathimage.h
More file actions
85 lines (78 loc) · 2.05 KB
/
image.h
File metadata and controls
85 lines (78 loc) · 2.05 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef IMAGE_H
#define IMAGE_H
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <QLabel>
#include <QMainWindow>
#include <QtCore>
#include <math.h>
using namespace cv;
class Image
{
public:
Image();
void setCameraNum(int i);
void takePicture();
QImage convertToQImage();
void displayImage(QLabel& location);
void copy(Image *imIn);
void copyMat(Mat toCopy);
void sobelCV();
void sobelMe();
void gaussian(int mult);
void invert();
void difference(Image *im1,Image *im2);
void differenceBinary(Image *im1,Image *im2, int threshold);
void highlightMask(Image *mask);
void identifyWhite();
void repaintMast(Image *cam,Image *mask);
void createHist(int bucketsIn);
void clearHist();
void addHSV(Image *cam, int xl, int xr, int yl, int yr);
void addHSVfromFile(Mat histIn);
void histToSrc();
void colorHistHSV(Image *histIm, int thresh, Image *history);
//Alex adds
void paintScreen(Image *histIm, int thresh, Image *history);
bool collisionCheck(int x, int y, Image *history);
void rectList();
void onHit(Image *history);
void drawRect(int xS, int xE, int yS, int yE);
void drawRect2(int xS, int xE, int yS, int yE);
void hitCheck(int xS, int xE, int yS, int yE, Image *history);
//end alex adds
void savePath(Mat path2Save); ///******** new as of Thursday
bool hasHistory();
void showPath(Image *history);
void clearHistory();
Mat prepPath();
void checkPath();
bool pixelUsed = false;
Mat src;
Mat path2Show;
void saveHist();
//Mat src;
Mat srcClean;
Mat display;
VideoCapture cam;
long **hist;
int buckets;
//alex adds more
int xStart;
int xEnd;
int yStart;
int yEnd;
bool collision = false;
int numSq = 8;
int xStartLs[8];
int yStartLs[8];
int xEndLs[8];
int yEndLs[8];
int rPath;
int gPath;
int bPath;
bool canClear = true;
//end alex adds more
};
#endif // IMAGE_H