|
Webcam Tracker
V1.0
Using openCV and an Arduino Uno
|
Child-classe, applies a mask to the input matrix. More...
#include <Mask.h>
Public Member Functions | |
| Mask (const cv::String name) | |
| Constructor. More... | |
| Mask (const cv::String name, HSV_MASK_VALUES hsv) | |
| Constructor. More... | |
| void | setAction (void *data) |
| sets the output of the action More... | |
| void | showWindow () |
| shows the action to the user More... | |
Public Member Functions inherited from PipeLineAction | |
| PipeLineAction () | |
| Default constructor. | |
| PipeLineAction (const cv::String name) | |
| Constructor. More... | |
| virtual void * | getAction () |
| gets the output of the action More... | |
| void | hideWindow () |
| hides the action to the user More... | |
| cv::String | getName () |
| gets the pipeline action name More... | |
Static Private Member Functions | |
| static void | onLowHTreshTrackbar (int, void *data) |
| Handles the change trackbar event for the low hue trackbar. More... | |
| static void | onHighHTreshTrackbar (int, void *data) |
| Handles the change trackbar event for the high hue trackbar. More... | |
| static void | onLowSTreshTrackbar (int, void *data) |
| Handles the change trackbar event for the low saturation trackbar. More... | |
| static void | onHighSTreshTrackbar (int, void *data) |
| Handles the change trackbar event for the high saturation trackbar. More... | |
| static void | onLowVTreshTrackbar (int, void *data) |
| Handles the change trackbar event for the low value trackbar. More... | |
| static void | onHighVTreshTrackbar (int, void *data) |
| Handles the change trackbar event for the high value trackbar. More... | |
Private Attributes | |
| const int | maxValueH = 180 |
| maximum value of the hue trackbar | |
| const int | maxValue = 255 |
| maximum value of the saturation and value trackbars | |
| const int | maxValuePixel = 10 |
| maximum value of the associated trackbar | |
| int | lowH |
| current value of the low hue trackbar | |
| int | lowS |
| current value of the low saturation trackbar | |
| int | lowV |
| current value of the low value trackbar | |
| int | highH |
| current value of the high hue trackbar | |
| int | highS |
| current value of the high saturation trackbar | |
| int | highV |
| current value of the high value trackbar | |
| int | pixelSize |
| current value of the erode and dilate size, based on the pixelsize trackbar position | |
Additional Inherited Members | |
Protected Attributes inherited from PipeLineAction | |
| cv::Mat | img |
| Matrix which holds the image of the action. | |
| bool | show |
| Show action flag. | |
| cv::String | name |
| (screen)name of the pipeline action | |
Child-classe, applies a mask to the input matrix.
| Mask::Mask | ( | const cv::String | name | ) |
Constructor.
| name | (screen)name of mask action |
| Mask::Mask | ( | const cv::String | name, |
| HSV_MASK_VALUES | hsv | ||
| ) |
Constructor.
| name | (screen)name of mask action |
| hsv | struct containing the HGV mask values |
|
virtual |
sets the output of the action
in this case: applying a mask to the input matrix. The mask is based on the trackbar values.
| data | pointer to the input data, should be a OpenCV matrix |
Implements PipeLineAction.
|
virtual |
shows the action to the user
uses cv::imshow(). The name of the window is the name of the pipeline action. Trackbars are added to set max and min values of
Implements PipeLineAction.
|
staticprivate |
Handles the change trackbar event for the low hue trackbar.
sets the trackbar position bepending on the min of the high and low value
| data | pointer to the mask object associated with the trackbar |
|
staticprivate |
Handles the change trackbar event for the high hue trackbar.
sets the trackbar position bepending on the min of the high and low value
| data | pointer to the mask object associated with the trackbar |
|
staticprivate |
Handles the change trackbar event for the low saturation trackbar.
sets the trackbar position bepending on the min of the high and low value
| data | pointer to the mask object associated with the trackbar |
|
staticprivate |
Handles the change trackbar event for the high saturation trackbar.
sets the trackbar position bepending on the min of the high and low value
| data | pointer to the mask object associated with the trackbar |
|
staticprivate |
Handles the change trackbar event for the low value trackbar.
sets the trackbar position bepending on the min of the high and low value
| data | pointer to the mask object associated with the trackbar |
|
staticprivate |
Handles the change trackbar event for the high value trackbar.
sets the trackbar position bepending on the min of the high and low value
| data | pointer to the mask object associated with the trackbar |