Find local maxima in grayscale image using OpenCV
A pixel is considered a local maximum if it is equal to the maximum value in a ‘local’ neighborhood. The function below captures this property in two lines of code. To deal with pixels on ‘plateaus’ (value equal to their neighborhood) one can use the local minimum property, since plateaus pixels are equal to their … Read more