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.
Examplesopen allclose all
Basic Examples (3)
By default, CornerNeighbors->True is used:
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:
Place the detected foreground on a different 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:
Wolfram Research (2014), GrowCutComponents, Wolfram Language function, https://reference.wolfram.com/language/ref/GrowCutComponents.html.
Wolfram Language. 2014. "GrowCutComponents." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GrowCutComponents.html.
Wolfram Language. (2014). GrowCutComponents. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GrowCutComponents.html