Perform area opening.
Remove objects with less than lim elements from a binary image bw.
Element connectivity conn, to define the size of objects, can be specified with a numeric scalar (number of elements in the neighborhood):
for 2 dimensional matrices;
for 3 dimensional matrices;
or with a binary matrix representing a connectivity array. Defaults to
conndef (ndims (bw), "maximal")
which is equivalent to
conn of 8 and 26 for 2 and 3 dimensional matrices respectively.
See also: bwconncomp, conndef, bwboundaries.
Package: image