-
Notifications
You must be signed in to change notification settings - Fork 0
Add OpenCV template matching to vision library #259
Copy link
Copy link
Open
Description
Using OpenCV template matching the vision library will perform template matching on a streaming source (i.e. video file, webcam).
Requirements
- A class with the following public interface is created:
class TemplateMatchingDetector {
public:
TemplateMatchingDetector(cv::VideoCapture imageStream, cv::Mat templateImage, float sensitivity);
std::tuple<bool, float, float> update();
}-
TemplateMatchingDetector(...)creates aTemplateMatchingDetectorobject given acv::VideoCapture(i.e. video file, webcam), acv::Mat(i.e. image), and a sensitivity (i.e. needed match strength from the template matching algorithm to return a positive match). -
update()reads acv::Matusing the>>operator on thecv::VideoCaptureobject, and then performs OpenCV template matching on the frame. The returnedtuple<bool, float, float>is of structuretuple<[is the template image found?], [the x coordinate of the template image from -1 to 1], [the y coordinate of the template image from -1 to 1]>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels