-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpointer.h
35 lines (32 loc) · 910 Bytes
/
pointer.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
#ifndef DEMOS
#define DEMOS
#include <opencv2/opencv.hpp>
#include <vector>
#include "segmentation.h"
#include "video_manager.h"
#include "colour_detection.h"
#include "utility.h"
using cv::Mat;
using cv::Point;
using std::string;
using std::vector;
using std::pair;
namespace pointer {
class Pointer {
private:
colour_detection::ColourDetector colourDetector;
video_manager::VideoManager<Pointer> videoManager{this};
utility::hsvRange hsvColours;
segmentation::Segmenter segmenter;
pair<double, int> findClosestContourToPoint(const vector<vector<cv::Point>> &, const vector<int> &, cv::Point);
void highlightClosestContour();
void highlightClosestContourToLine(Mat &, cv::Point2f, cv::Point2f, bool = true);
void testHighlightClosestContourToLine();
public:
Pointer(utility::hsvRange);
void point(Mat &img);
void handle(Mat &img, int key);
void go();
};
} // namespace demos
#endif