Skip to contents

Fill internal holes in root binary images while preserving edges

Usage

fill_root_holes(img, min_hole_size = 1, max_hole_size = Inf)

Arguments

img

A binary image of root systems (imager cimg object)

min_hole_size

Minimum size of holes to fill (in pixels)

max_hole_size

Maximum size of holes to fill (in pixels, Inf means no limit)

Value

A processed binary image with internal holes filled

Examples

if (FALSE) { # \dontrun{
data("seg_Oulanka2023_Session01_T067")
img <- seg_Oulanka2023_Session01_T067
filled <- fill_root_holes(img, min_hole_size = 1, max_hole_size = 100)
plot(filled)
} # }