ImageMorphology.jl

This package provides morphology operations for structure analysis and image processing.

setup

ImageMorphology is a sub-package of the umbrella package Images.jl – either using Images or using ImageMorphology will give you access to this functionality.

Installation

Just like all normal Julia packages, you can use Pkg to install it:

pkg> add ImageMorphology # hit ] to enter Pkg mode

Learn

The perhaps quickest way to use this library is to find a set of useful operators from the gallery and build your own pipeline from it.

For any advanced usage, we recommend you to read the "Concept" part. For instance, many morphology operation supports generic "structuring element".

Overview

The following tables give an overview of ImageMorphology functionalities.

🚧 work in progress

This overview is not yet finished and only contains a subset of exported functions. The missing functions will be added in the future. You might still need to check the heavy reference page to find out what you need. Contributions are welcome!

Structuring Element (SE)

Structuring element is the key concept in morphology. If you're not familiar with this, please read concept: structuring element first.

namesummary
strelconvert between different SE representations
strel_typeinfer the SE type
strel_sizeget the minimal block size that contains the SE
strel_chain and strel_productcompose multiple SEs into a bigger one
strel_boxconstruct a box-shaped SE, e.g., C8, C26 connectivity
strel_diamondconstruct a diamond-shaped SE, e.g., C4, C6 connectivity
centeredshift the array center to (0, 0, ..., 0)

Basic morphological operations

namesummaryexamples
extreme_filter and extreme_filter!iteratively apply a select function f(x, y) to each neighborhoodextreme_filter operation
dilate and dilate!morphological max filterdilate operation
erode and erode!morphological min filtererode operation
opening and opening!fills white holesopening operation
closing and closing!fills black holesclosing operation
bothat and bothat!extract black detailsbothat operation
tophat and tophat!extract white detailstophat operation
mgradient and mgradient!morphological gradientmgradient operation
mlaplacian and mlaplacian!morpholigical laplacianmlaplacian operation

Geodesic operations

namesummaryexamples
underbuildmorphological reconstruction by dilation, see also mreconstructunderbuild operation and mreconstruct operation
underbuildmorphological reconstruction by erosion, see also mreconstructoverbuild operation and mreconstruct operation