remove_small_objects: Remove connected regions/objects smaller than a specified...

View source: R/segmentation.R

remove_small_objectsR Documentation

Remove connected regions/objects smaller than a specified size

Description

Remove connected regions/objects smaller than a specified size

Usage

remove_small_objects(image, size = 50, output_mask = FALSE)

Arguments

image

binary image (instance of im object)

size

Optional. Defaults to 50 units. Exclude any objects smaller than this size. Units default to units of the input im.

output_mask

Optional. Logical value to indicate whether a mask of objects should be returned. If FALSE a labelled image will be returned.

Value

labelled image (im object) or mask containing only connected components > size.


keithschulze/supr documentation built on Nov. 26, 2022, 7:09 a.m.