Minimum and Maximum Filters



::Index  <Prev

The MinMaxFilter Process

Filter Type

Box Size

Shape of the Kernel Box

Amount

Number of Iterations

The Minimum/Maximum Filters Window



The MinMaxFilter Process

Minimum and maximum filters, also known as erosion and dilation filters, respectively, are morphological filters that work by considering a neighborhood around each pixel. From the list of neighbor pixels, the minimum or maximum value is found and stored as the corresponding resulting value. Finally, each pixel in the image is replaced by the resulting value generated for its associated neighborhood.

An important application of minimum filtering to astrophotographical images was devised by Mike Cook. Many wide field deep sky images have so many, so small, and so bright stars, that nonstellar objects as diffuse nebulae and Milky Way condensations, can be greatly obscured by them. A modulated minimum filter (Amount parameter less than 1) can be applied in these cases to decrease the visual impact of stars, giving nonstellar objects their deserved importance in the scene.

PTeam member Chris Schur has found recently an interesting application of dilation (maximum) filters. When a large, high-resolution image having faint stars as small as a pixel or two is resampled to reduce its size severely, many of these very small stars vanish due to pixel interpolation. By applying an appropriate dilation filter, faint stars can be enlarged in the original image, prior size reduction, in such a way that on the reduced image they will be one pixel in size again. The same technique is useful to print high resolution images on many inkjet printers. Chris found that using circular kernels and relatively low Amount values, PixInsight's maximum filters are ideal to carry out this task. Here is a link to Chris Schur's original example describing this technique.

Minimum and maximum filters have been implemented into a single process in PixInsight, namely MinMaxFilter. The relevant parameters are:


Filter Type

This is to specify a minimum or maximum filter (erosion or dilation).


Box Size

The odd size of the neighborhood considered for each pixel. The smallest box size is 3 pixels.


Shape of the Kernel Box

Our implementation can use both square and circular neighborhoods. See the explanations given for the counterpart Kernel Type parameter of MedianFilter. Circular kernels can yield better detail preservation, especially for small image features, but produce a weaker filtering effect.


Amount

The Amount parameter modulates the filtering process by mixing filtered and original pixels. The functionality of this MinMaxFilter parameter is identical to its counterpart Amount parameter of MedianFilter.


Number of Iterations

As MedianFilter, MinMaxFilter also can work as a recursive process when the Amount parameter preserves a fraction of unprocessed data. See the equivalent parameter of MedianFilter.


The Minimum/Maximum Filters Window

The Use Luminance option is equivalent to its counterpart on the Median Filter window.



::Index  <Prev