A collection of morphological filters for grayscale images (8-bits) optimised for speed.
This plugin provides facilities for morphological filtering of grayscale images. The plugin supports basic operations such as dilation, erosion, opening, and closing, as well as combination of them such as top-hat, morphological gradient or Laplacian.
Some utilities such as chamfer distance maps or image border padding are also included for convenience.
Important notice: this package is now integrated into the “morphological segmentation” plugin.
The main function of this plugin is “Morphological Filters”. It implements fast versions of erosion, dilation, opening and closing with various structuring elements: square, octagon, lines (horizontal, vertical or diagonal). The size of structuring elements is given in diameter (it is possible to use squares with even side length).
The implementation makes use of structuring element decomposition, and of local histograms. Computation times below the second are obtained for operations on 2000×3000 images using 100×100 square.
Geodesic reconstruction is a powerful algorithm that can be used to reconstruct complex particles from a marker image. An example of reconstruction by dilation is shown below. Several grains are manually selected, and a binary image of markers is created. This marker image is used as input of geodesic reconstruction by dilation, using the original image as mask. The particles identified by the markers are reconstructed, while the other one are removed.
Geodesic reconstruction algorithms can also be used for removing particules touching image borders, or filling holes. Corresponding plugins are also included into the package for convenience.
Starting from version 1.4, the plugin provides detection of regional minima and maxima, as well as detection of extended minima and maxima. Such filters are particularly useful for helping a segmentation process. A function for imposing minima or maxima on a grayscale image is also provided.
The images below show an example of regional maxima detection (middle image) on a filtered grain image, and the result of extended minima detection with a dynamic of 10 (right).
Regional minima and maxima use a fast algorithm based on flood-filling like algorithm. Extended minima and maxima make use of geodesic reconstruction by dilation or erosion. The latter algorithm is implemented using iteration of forward-bacward updates until idempotence.
In order to manage the problem of image borders, an “Extend Image Border” plugin is provided. It creates a new image bigger than the original by mirroring, replicating, or repeating the input image.
A “Chamfer Distance Map”, similar to distance map, is also provided. It provides more choices in the distance approximations, and makes it possible to choose the output type (8-bits, 16-bits, 32-bits).
The plugin can be obtained from here:
Simply copy the file into the plugin directory, and click on menu “Help→Refresh Plugins”. All functions should be available in menu “Plugins→Fast Morphology”
* 2014.07.16 Update to version 1.5 added support for 3D morphological filters and regions minima/maxima, added support for morphological filtering of floating point images * 2013-10-16 Update to version 1.4 add geodesic reconstruction by erosion, regional minima/maxima, extended minima/maxima, imposition of minima/maxima. Most plugins are now based on PlugInFilter (making it possible to have preview). Also fix some bugs. * 2013-06-10 Update to version 1.3 (add geodesic reconstruction plugin, add chamfer distance maps with 5x5 neighborhood, morphological filters now keep spatial calibration of images, update package arborescence) * 2012-11-07 Update to version 1.2 (inner and outer gradients, morphological laplacian, fix bug in Shape list, use size in radius) * 2012-08-29 first release, by David Legland