Webcam Tracker  V1.0
Using openCV and an Arduino Uno
Contour.h
Go to the documentation of this file.
1 
9 #pragma once
10 #include "PipeLineAction.h"
15 class Contour : public PipeLineAction {
16 private:
17 
18  std::vector<std::vector<cv::Point>> contours;
19  std::vector<std::vector<cv::Point>> polylines;
20 
21  const cv::Scalar green{ 0,255,0 };
22  const cv::Scalar red{ 0,0,255 };
23 
24  const int accuracyMax = 20;
25  const int areaMax = 50;
26 
27  int accuracy;
28  int area;
29 
30 public:
33  Contour(const cv::String name);
34 
40  void setAction(void* data);
41 
44  void* getAction();
45 
49  void showWindow();
50 };
header file of the PipeLineAction base-class
Child-classe, implements OpenCV's contour finding.
Definition: Contour.h:15
void showWindow()
shows the action to the user
Definition: Contour.cpp:65
int accuracy
current value of the accuracy trackbar
Definition: Contour.h:27
const cv::Scalar green
color green
Definition: Contour.h:21
int area
area value of the accuracy trackbar
Definition: Contour.h:28
void setAction(void *data)
sets the output of the action
Definition: Contour.cpp:19
const cv::Scalar red
color red
Definition: Contour.h:22
Contour(const cv::String name)
Constructor.
Definition: Contour.cpp:13
void * getAction()
gets the output of the action
Definition: Contour.cpp:60
const int accuracyMax
maximum value of the accuracy trackbar
Definition: Contour.h:24
std::vector< std::vector< cv::Point > > polylines
vector containing all polyline points
Definition: Contour.h:19
const int areaMax
maximum value of the area trackbar
Definition: Contour.h:25
std::vector< std::vector< cv::Point > > contours
vector containing all contour points
Definition: Contour.h:18
Base-class for all OpenCV pipeline actions.
Definition: PipeLineAction.h:23
cv::String name
(screen)name of the pipeline action
Definition: PipeLineAction.h:27