Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This function as the documentation says returns the minimum and maximum value found in image/array.

Mat inArray;
double min, max; 
minMaxLoc(inArray, &min, &max);

If you need the exact location, you pass another two arguments as well. Then it will return the point where the extreme is. The function goes through the matrix and find the minimum and the maximum value. Note that the input image has to be grayscale.

This function as the documentation says returns the minimum and maximum value found in image/array.

Mat inArray;
double min, max; 
minMaxLoc(inArray, &min, &max);

If you need the exact location, you pass another two arguments as well. Then it will return the point where the extreme is. The function goes through the matrix and find the minimum and the maximum value. Note that the input image has to be grayscale.

Using it with matchTemplate function. The returned points would be the part of matched image.