zoukankan      html  css  js  c++  java
  • OpencV2.4.13前景提取示例代码

    OpenCV2编译  基于高斯混合模型

    #include<fstream>
    #include<iostream>
    #include<iostream> 
    #include<highgui.h>
    #include<opencv2/opencv.hpp>
    #include<opencv2corecore.hpp>
    #include<opencv2/core/core.hpp> 
    #include<opencv2highguihighgui.hpp>
    #include<opencv2/highgui/highgui.hpp>  
    #include<opencv2/imgproc/imgproc.hpp> 
    #include<opencv2/imgproc/imgproc.hpp>
    #include<opencv2/objdetect/objdetect.hpp>
    using namespace std;
    using namespace cv;
    int main()
    {
        VideoCapture video(0);
        Mat frame, mask, thresholdImage, output;
        BackgroundSubtractorMOG2 bgSubtractor(20, 16, true);
        namedWindow("background");
        while (true){
            video >> frame;
            bgSubtractor(frame, mask, 0.001);
            imshow("background", mask);
            char c = (char)waitKey(20);
            if (c == 27)
                break;
        }
        return 0;
    }
  • 相关阅读:
    [HDU 2089]不要62
    [WC 2011]Xor
    [BJOI 2011]元素
    [NOIp 2014]解方程
    [UVa 1326]Jurassic Remains
    [BZOJ 2152]聪聪可可
    [IOI 2011]Race
    [测试题]打地鼠
    [POJ 2828]Buy Tickets
    [测试题]gene
  • 原文地址:https://www.cnblogs.com/dzzy/p/5770158.html
Copyright © 2011-2022 走看看