Local extrema detection: Since the input images (and hence the
computed separations) contain a significant amount of noise, we
first smooth them with a Gaussian filter. The filter width is set to
0.25 of the grid spacing. We detect both local minima and local
maxima in each channel image, because in areas where the dots are
large enough they blend with each other. In such areas it is easier
to recover the grid by identifying the gaps between the dots (local
minima), rather than the dot centers (local maxima).