connectedComponents: Find Connected Components in a binary Image

Description Usage Arguments Value Author(s) See Also Examples

View source: R/shape.R

Description

connectedComponents computes the connected components (i.e. areas of contiguous non-zero pixels) of a binary image.

Usage

1
connectedComponents(image, connectivity = 8, return_table = TRUE)

Arguments

image

An an 8-bit (8U) single-channel Image object.

connectivity

The connetivity neighborhood to decide whether 2 pixels are contiguous. This parameter can take two values:

  • 4: the neighborhood of a pixel are the four pixels located above (north), below (south), to the left (west) and right (east) of the pixel.

  • 8 (the default): the neighborhood of a pixel includes the four 4-neighbors and the four pixels along the diagonal directions (northeast, northwest, southeast, and southwest).

return_table

A logical indicating whether a dataframe of the x-y coordinates of the connected components should be returned (default: TRUE).

Value

A list with 2 (or 3) items:

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.