-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVision.h
67 lines (62 loc) · 1.33 KB
/
Vision.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#pragma once
#include "stdafx.h"
#include <opencv\cv.h>
#include <exception>
using namespace cv;
using namespace std;
#define R_ 2
#define G_ 1
#define B_ 0
template <class T>
class bandPass{
public:
T high;
T low;
};
class Vision
{
private:
Mat in;
Mat drawing;
unsigned int contourSize;
vector<vector<Point> > contours_poly;
vector<Point2f> center;
bandPass<float> bBoxBand;
double cannyThresh1;
double cannyThresh2;
int centerX;
int centerY;
vector<KeyPoint> centers;
vector<Point2f> rCenters;
vector<Vec4i> hierarchy;
vector<vector<Point>> contours;
vector<Mat> images;
vector<Rect> boundRect;
double thresholdMin;
double thresholdMax;
double adaptThresholdVoxSz;
double adaptThresholdDiff;
public:
void setThreshold(double, double);
void setAdaptThresh(double, double);
int getCenterX(void);
int getCenterY(void);
vector<KeyPoint> getCenters(void);
vector<Point2f> getRCenters(void);
vector<Vec4i> getHierarchy(void);
vector<vector<Point>> getContours(void);
vector<Mat> getImages(void);
vector<Rect> getBoundRect(void);
Mat getDrawing(void);
Vision(void);
Vision(Mat);
~Vision(void);
void filterContours();
void processContours();
void doThreshold();
void drawCenters();
void setBBoxBand(bandPass<float>);
bandPass<float> getBBoxBand(void);
void setCannyThresh(double);
double getCannyThresh(void);
};