Debug Assertion failed in GMM

asked 2016-12-03 06:37:41 -0600

Ruby_Sheng gravatar image

Thank you so much Derek~~

But as I run the project which I has posted before, It said

image description

the code

#include <opencv2\opencv.hpp>
using namespace cv;


int main(){
    VideoCapture video(0);
    Mat frame, mask, thresholdImage, output;
    Ptr<BackgroundSubtractorMOG2> subtractor = cv::createBackgroundSubtractorMOG2(20, 16, true);
    namedWindow("background");
    while (true){
        video >> frame;
        subtractor->apply(frame, mask, 0.001);
        imshow("background", mask);
        char c = (char)waitKey(20);
        if (c == 27)
            break;
    }
    return 0;
}
edit retag flag offensive close merge delete