Find local maxima in grayscale image using OpenCV

image, image-processing, mathematical-optimization, opencv

Solution

I think you want to use the

MinMaxLoc(arr, mask=NULL)-> (minVal, maxVal, minLoc, maxLoc)
Finds global minimum and maximum in array or subarray

function on you image

Problem

Does anybody know how to find the local maxima in a grayscale `IPL_DEPTH_8U` image using OpenCV? HarrisCorner mentions something like that but I'm actually not interested in corners ... Thanks!

Original source