Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to specify mask for grabCut in C++

I'm just starting with opencv and can't find any samples. I would like to use GC_INIT_WITH_MASK, how do you specify the mask to grabCut if I have two rectangles: outer and inner.

cv::Rect outer = values cv::Rect inner = values for inner rectangle sits inside outer rectangle

cv::Mat mask = ??

Thanks in advance, Tom