Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I guess you are giving your function 2 Mat objects as an input, right?

Wouldnt it work, if you just use your outputArray in the last function that manipulates the img_foreground like this:

cv::threshold(img_foreground, _fgmask.getMat(), threshold, 255, cv::THRESH_BINARY);

I guess you are giving your function 2 Mat objects as an input, right?

Wouldnt it work, if you just use your outputArray in the last function that manipulates the img_foreground like this:

cv::threshold(img_foreground, _fgmask.getMat(), threshold, 255, cv::THRESH_BINARY);

edit: just use _fgmask should also work? I havent used cv::OutputArray yet, but this might work

I guess you are giving your function 2 Mat objects as an input, right?

Wouldnt it work, if you just use your outputArray in the last function that manipulates the img_foreground like this:

cv::threshold(img_foreground, _fgmask.getMat(), threshold, 255, cv::THRESH_BINARY);

edit: just use using _fgmask instead of _fgmask.getMat() should also work? work. I havent used cv::OutputArray yet, but this might workI dont see why not.