I have this code
cvMatchTemplate(image2, templat2, result, CV_TM_CCORR_NORMED);
How do I make the program execute the following lines if there is a match:
double min_val, max_val;
CvPoint min_loc, max_loc;
cvMinMaxLoc(result, &min_val, &max_val, &min_loc, &max_loc);
cvRectangle(image3, max_loc, cvPoint(max_loc.x+templat->width,
max_loc.y+templat->height), cvScalar(0,1,1), 1);
Thank you.