Morphological opening
ID: morphological-opening
Morphological opening applies morphological erosion and then morphological dilation with the same structuring element. For a foreground set and structuring element ,It keeps the union of all translated copies of contained in . Consequently the result is contained in , and repeating the operation changes nothing: morphological opening is idempotent.
For a one-dimensional example, take and . Morphological erosion gives and the following morphological dilation restores ; the isolated point at five disappears. The surviving run is restored rather than shifted. In image processing, selecting the structuring element controls which bright features survive. Scikit-image demonstrates removal of bright regions too thin to contain the chosen footprint.[ref]
Morphological Filtering in the scikit-image documentation. Opening, bright patches and outer-ring example
New to topics? Read the docs here!