Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

error C2572 is: "redefinition of default parameter"

so, you have to call it like:

Ptr<BackgroundSubtractorMOG2>cv::createBackgroundSubtractorMOG2(500, 16, true);

(whithout the varnames)

((it's probably time, to grab your c++ book, again...))

error C2572 is: "redefinition of default parameter"

so, you have to call it like:

Ptr<BackgroundSubtractorMOG2>cv::createBackgroundSubtractorMOG2(500, Ptr<BackgroundSubtractorMOG2> subtractor = cv::createBackgroundSubtractorMOG2(500, 16, true);
subtractor->apply(image, mask);

(whithout the varnames)

((it's probably time, to grab your c++ book, again...))

error C2572 is: "redefinition of default parameter"

so, you have to call it like:

Ptr<BackgroundSubtractorMOG2> subtractor = cv::createBackgroundSubtractorMOG2(500, 16, true);
subtractor->apply(image, mask);

(whithout the varnames)varnames, what you've pasted there, is the function's declaration, not a call)

((it's probably time, to grab your c++ book, again...))