libVision
1.0
A vision library made by FRC team #4529
|
Vision processing/target acquisition code. More...
#include <TargetDetector.h>
Public Member Functions | |
TargetDetector (Mat &_image) | |
TargetDetector constructor. More... | |
virtual | ~TargetDetector () |
TargetDetector destructor. | |
void | prepareImage () |
Prepare/threshold input frame. More... | |
void | findContours () |
Cleans old data and prepares contour shells via OpenCV. More... | |
bool | filterContours () |
Filter contours to find shells that match the target. More... | |
LineResult | getContours () |
Process and retrieve resulting contours. More... | |
Public Attributes | |
int | thresholdVal |
Threshold value for cuttoff when running prepareImage. More... | |
Vision processing/target acquisition code.
Order of calling:
TargetDetector::TargetDetector | ( | Mat & | _image | ) |
TargetDetector constructor.
_image | Reference to source cv::Mat for processing |
bool TargetDetector::filterContours | ( | ) |
Filter contours to find shells that match the target.
Filters through the found contours, leaving only the contours that match the target.
void TargetDetector::findContours | ( | ) |
Cleans old data and prepares contour shells via OpenCV.
Clears data from previous the frame, finds contours in the binary image and decimate the found shells.
LineResult TargetDetector::getContours | ( | ) |
Process and retrieve resulting contours.
Processes filtered contours, returning more specific information about the found target.
void TargetDetector::prepareImage | ( | ) |
Prepare/threshold input frame.
int TargetDetector::thresholdVal |