Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenCV template matching to vision library #259

Open
3 tasks
madfrog54321 opened this issue Oct 5, 2017 · 0 comments
Open
3 tasks

Add OpenCV template matching to vision library #259

madfrog54321 opened this issue Oct 5, 2017 · 0 comments

Comments

@madfrog54321
Copy link
Collaborator

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 a TemplateMatchingDetector object given a cv::VideoCapture (i.e. video file, webcam), a cv::Mat (i.e. image), and a sensitivity (i.e. needed match strength from the template matching algorithm to return a positive match).

  • update() reads a cv::Mat using the >> operator on the cv::VideoCapture object, and then performs OpenCV template matching on the frame. The returned tuple<bool, float, float> is of structure tuple<[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]>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant