Check what already exists in `image-js` to detect the minima and maxima of the intensity of a grayscale image.