morph: Morphological Operations

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/morphology.R

Description

morph applies various morphological operations (see Note) to an Image object.

Usage

1
2
morph(image, operation, kernel = NULL, k_shape = "rectangle",
  k_height = 5, k_width = 5, iterations = 1)

Arguments

image

An Image object.

operation

A string corresponding to the name of a morphological operation to apply to the image (see Note).

kernel

A binary matrix. If the matrix is not binary, all positive values will be automatically converted to 1, all negative values to 0, unless operation = "hitmiss" in which case they will be converted to -1.

k_shape

A string corresponding to the shape of the kernel for the morphological operation (see Note; default: "rectangle"). Ignored if a custom kernel is provided.

k_height

The half-height in pixels of the kernel. Ignored if a custom kernel is provided.

k_width

The half-width in pixels of the kernel. Ignored if a custom kernel is provided.

iterations

The number of times the morphological operations should be applied.

Value

An Image object.

Note

There are 8 types of morphological operations that can be achieved with this function:

There are 3 types of predetermined kernel shapes that can be used with this function when a custom kernel is not provided:

Author(s)

Simon Garnier, garnier@njit.edu

See Also

Image

Examples

1
# TODO

neuroconductor-devel/Rvision documentation built on May 16, 2021, 5:16 p.m.