1 | initial version |
instead of :
void matchTemplate (Mat image, Mat templ, Mat result, int method);
you probably wanted :
matchTemplate(image, templ, result, method);
the former is not doing anything, it's a (useless)declaration, not a function call.
so your result Mat is empty, and imshow does not like it.
also please throw in a waitKey(0)
between imshow() and return, else you won't see anything