imager (version 0.45.8)

split_connected: Split pixset into connected components

Description

Compute connected components (using "label"), then split into as many sets as there are components. Useful for segmentation

Usage

split_connected(px, ...)

Value

a list of pixsets

Arguments

px

a pixset

...

further arguments passed to label

Author

Simon Barthelme

See Also

label

Examples

Run this code
cimg.limit.openmp()
px <- isoblur(grayscale(boats),5) > .75
plot(px)
spl <- split_connected(px)
plot(spl[[1]])
px <- isoblur(grayscale(boats),5) > .75
plot(px)
spl <- split_connected(px)
plot(spl[[1]])

Run the code above in your browser using DataLab