Click or drag to resize

CvInvokeGrabCut Method

http://www.emgu.com
The grab cut algorithm for segmentation

Namespace:  Emgu.CV
Assembly:  Emgu.CV.World (in Emgu.CV.World.dll) Version: 4.1.1.3497 (4.1.1.3497)
Syntax
public static void GrabCut(
	IInputArray img,
	IInputOutputArray mask,
	Rectangle rect,
	IInputOutputArray bgdModel,
	IInputOutputArray fgdModel,
	int iterCount,
	GrabcutInitType type
)

Parameters

img
Type: Emgu.CVIInputArray
The 8-bit 3-channel image to be segmented
mask
Type: Emgu.CVIInputOutputArray
Input/output 8-bit single-channel mask. The mask is initialized by the function when mode is set to GC_INIT_WITH_RECT. Its elements may have one of following values: 0 (GC_BGD) defines an obvious background pixels. 1 (GC_FGD) defines an obvious foreground (object) pixel. 2 (GC_PR_BGR) defines a possible background pixel. 3 (GC_PR_FGD) defines a possible foreground pixel.
rect
Type: System.DrawingRectangle
The rectangle to initialize the segmentation
bgdModel
Type: Emgu.CVIInputOutputArray
Temporary array for the background model. Do not modify it while you are processing the same image.
fgdModel
Type: Emgu.CVIInputOutputArray
Temporary arrays for the foreground model. Do not modify it while you are processing the same image.
iterCount
Type: SystemInt32
The number of iterations
type
Type: Emgu.CV.CvEnumGrabcutInitType
The initialization type
See Also