= Morphological opening
{title2=$A\circ B$}
<Morphological opening> applies <morphological erosion> and then <morphological dilation> with the same <structuring element>. For a foreground <set> $A$ and <structuring element> $B$,
$$
A\circ B=(A\ominus B)\oplus B.
$$
It keeps the <union> of all translated copies of $B$ contained in $A$. Consequently the result is contained in $A$, and repeating the operation changes nothing: <morphological opening> is <idempotent>.
For a one-dimensional example, take $A=\{0,1,2,5\}$ and $B=\{0,1\}$. <Morphological erosion> gives $\{0,1\}$ and the following <morphological dilation> restores $\{0,1,2\}$; 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.<Morphological Filtering in the scikit-image documentation>[Opening, bright patches and outer-ring example]{ref}
Back to article page