replaces small connected components in a binary image image with background pixels.
replaces positive integers in a label matrix m with 0 if their tally is small.
replaces components consisting of n or fewer elements.
Details and Options
- DeleteSmallComponents works with arbitrary 2D and 3D images or label matrices.
- The following options can be given:
CornerNeighbors True whether to include corner neighbors Method Automatic method to determine a size threshold
- Possible settings for the Method option include:
"Cluster" cluster variance maximization (Otsu's algorithm) "Mean" use the mean of component sizes as the threshold "Median" use the median of component sizes as the threshold
- The default setting is Method->"Cluster", corresponding to cluster variance maximization.
Examplesopen allclose all
Basic Examples (3)
Wolfram Research (2010), DeleteSmallComponents, Wolfram Language function, https://reference.wolfram.com/language/ref/DeleteSmallComponents.html (updated 2012).
Wolfram Language. 2010. "DeleteSmallComponents." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/DeleteSmallComponents.html.
Wolfram Language. (2010). DeleteSmallComponents. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DeleteSmallComponents.html