matchTemplate(Image, Template, ResImage, CV_TM_CCOEFF);
double Min, Max;
Point MinLoc, MaxLoc;
minMaxLoc(ResImage, &Min, &Max, &MinLoc, &MaxLoc, Mat());
minMaxLoc() always returns values even "Template" doesn't exist in "Image".
How do we know if it really exists or not?
The documentation says that if CV_TM_CCOEFF is used, the best match is MaxLoc.
But MaxLoc always contains values.