Learn R Programming

Rvision (version 0.3.5)

morph: Morphological Operations

Description

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

Usage

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.

See Also

Image

Examples

Run this code
# NOT RUN {
# TODO
# }

Run the code above in your browser using DataLab