-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedgetracking.h
55 lines (38 loc) · 1.07 KB
/
edgetracking.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
#pragma once
#include "tracking.h"
class EdgeTracking : public Tracking {
public:
EdgeTracking( bool debug = false ) : Tracking( debug ) {}
virtual ~EdgeTracking() {}
std::vector< Object >& getObjects() override;
private:
void process( Mat );
static void morphOps( Mat& thresh );
int trackFilteredObject( Object theObject, Mat threshold, Mat HSV, Mat& cameraFeed );
//if we would like to calibrate our filter values, set to true.
bool calibrationMode = false;
int H_MIN = 0;
int H_MAX = 256;
int S_MIN = 0;
int S_MAX = 256;
int V_MIN = 0;
int V_MAX = 256;
//Matrix to store each frame of the webcam feed
Mat sourceFeed;
Mat cameraFeed;
Mat threshold;
vector< Object > objects;
//The following for canny edge detec
Mat dst, detected_edges;
Mat src, src_gray;
int edgeThresh = 1;
int lowThreshold;
int const max_lowThreshold = 100;
int ratio = 3;
int kernel_size = 3;
const char* window_name = "Edge Map";
const int MAX_NUM_OBJECTS = 200;
//minimum and maximum object area
const int MIN_OBJECT_AREA = 1 * 1;
const int MAX_OBJECT_AREA = 20 * 20;
};