Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Miscellaneous Image Transformations » cvGrabCut

cvGrabCut


Runs the GrabCut algorithm.

Name Type Description
inImage Image UINT8, single-channel input image.
inForeground Region Obvious foreground region.
inBackground Region Obvious background region.
inPBackground Region Possible background region.
inRect Box* Box containing segmented object.
inIterCount Integer Number of iterations the algorithm should make before returning the result.
inMode CvGrabCutMode Mode of GrabCut.
outBackground Region Output region of obvious background.
outForeground Region Output region of obvious foreground.
outPBackground Region Output region of possible background.
outPForeground Region Output region of possible foreground.

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Foreground and Background regions must not be empty in cvGrabCut.
DomainError Input image must be 3-channel, UINT8 in cvGrabCut.
DomainError Input image must not be empty in cvGrabCut.

Complexity Level

This filter is available on Basic Complexity Level.