magick (version 2.0)

morphology: Morphology

Description

Apply a morphology method. This is a very flexible function which can be used to apply any morphology method with custom parameters. See imagemagick website for examples.

Usage

image_morphology(image, method = "convolve", kernel = "Gaussian",
  iterations = 1, opts = list())

image_convolve(image, kernel = "Gaussian", iterations = 1, scaling = NULL, bias = NULL)

Arguments

image

magick image object returned by image_read() or image_graph()

method

a string with a valid method from morphology_types()

kernel

either a square matrix or a string. The string can either be a parameterized kerneltype such as: "DoG:0,0,2" or "Diamond" or it can contain a custom matrix (see examples)

iterations

number of iterations

opts

a named list or character vector with custom attributes

scaling

string with kernel scaling. The special flag "!" automatically scales to full dynamic range, for example: "50%!"

bias

output bias string, for example "50%"

See Also

Other image: _index_, analysis, animation, attributes, color, composite, device, edges, editing, effects, fx, geometry, ocr, options, painting, segmentation, transform, video