GrowCutComponents
GrowCutComponents[image,{marker1,marker2,…}]
creates a segmentation from image by growing each markeri.
Details and Options
- GrowCutComponents models the image using cellular automata where the automata evolution leads to an image segmentation.
- GrowCutComponents works with arbitrary 2D and 3D images.
- Each marker markeri can be given either as an image or a list of points in the standard image coordinate system.
- The following options can be specified:
-
CornerNeighbors True whether to include corner neighbors MaxIterations Automatic maximum number of iterations to use - With MaxIterations->Automatic the algorithm runs until convergence.
Examples
open allclose allBasic Examples (3)
Options (2)
CornerNeighbors (1)
By default, CornerNeighbors->True is used:
Use CornerNeighbors->False:
Applications (3)
Use grow-cut segmentation to separate foreground and background in a complex image:
Separate foreground and background in an image:
Use the binary mask as an alpha channel:
Blur the binary mask for a smoother separation of foreground and background:
Properties & Relations (3)
Switching the foreground and background marker will result in the complement mask:
Not all pixels are necessarily segmented:
Use ArrayComponents to relabel the array and convert the label matrix into an Image object:
Text
Wolfram Research (2014), GrowCutComponents, Wolfram Language function, https://reference.wolfram.com/language/ref/GrowCutComponents.html.
CMS
Wolfram Language. 2014. "GrowCutComponents." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GrowCutComponents.html.
APA
Wolfram Language. (2014). GrowCutComponents. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GrowCutComponents.html