Morphology Operators
Страница в процессе перевода. |
This page describes the interfaces for the basic morphology operators that you can use to build your own pipeline. To easily visualize the effect of different operators, the "blobs" image is used to build the cover image.
using TestImages, ImageBase
restrict(testimage("blobs"))
Unless explicitly used, most operations in this package don’t support color images. This is because many morphological operation is based on pixel value comparisons |
This page contains only a subset of exported functions. The missing ones will be added in the future. You might need to check the heavy reference page to find out what you need. Contributions are welcome! |
Operators
The extreme_filter
function is the core operation in ImageMorphology. Many other morphological operations such as dilate
and erode
are direct usages of it. The cover image shows a pixel jitter using random select function.
The dilation operator dilate
is essentially a max filter. This is a basic term in mathematical morphology — many operations are built on top of dilate
and the erode
operator.
The dilation operator erode
is essentially a min filter. This is a basic term in mathematical morphology — many operations are built on top of erode
and the dilate
operator.
opening
operator is defined as dilate(erode(img))
. Intuitively, opening operation fills the white holes in the image.
closing
operator is defined as dilate(erode(img))
. Intuitively, closing operation fills the black holes in the image.
The (white) tophat operator is defined as img - opening(img)
. Intuitively, this filter can be used to extract small white elements and details from an image.
The (black) tophat operator, also known as bottom hat, is defined as closing(img) - img
. Intuitively, this filter can be used to extract small black elements and details from an image.
There are three commonly used morphological gradient definitions: the beucher gradident dilate(img) - erode(img)
, the external half-gradient dilate(img) - img
, and the internal half-gradident img - erode(img)
.
Laplacian operator is defined as the difference between external gradient and internal gradient — mgradient(img; mode=:external) - mgradient(img; mode=:internal)
.
The morphological reconstruction operator is to repeatedly apply particular operator until the stability, i.e,. output unchanged. The most widely used ones are reconstruction by dilation and reconstruction by erosion.
underbuild
is reconstruction by dilation, it is an alias for mreconstruct
when op=dilate
.
overbuild
is reconstruction by erosion, it is an alias for mreconstruct
when op=erode
.