Start » Filter Reference » OpenCV » Miscellaneous Image Transformations » cvGrabCut
Module: | OpenCV |
---|
Runs the GrabCut algorithm.
Name | Type | Description | |
---|---|---|---|
![]() |
inImage | Image | UINT8, 3-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. |
DomainError | Input rectangle must be set in GC_INIT_WITH_RECT. |
Complexity Level
This filter is available on Basic Complexity Level.