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;
    }
  • 相关阅读:
    Python-模块
    POJ 1631 nlogn求LIS
    POJ 1274 二分图匹配
    POJ 3661 DP
    POJ 3662 二分+Dijkstra
    POJ 3666 DP
    POJ 2373 单调队列优化DP
    祝自己生日快乐
    POJ 2385 DP
    POJ 3122 Pie 二分答案
  • 原文地址:https://www.cnblogs.com/dzzy/p/5770158.html
Copyright © 2011-2022 走看看