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;
    }
  • 相关阅读:
    Mongo 应用查询
    Rocket MQ 问题排查命令
    阿里云部署杂记-节约时间
    linux shell 杂
    垃圾回收算法学习
    Hbase数据读写流程
    TCP 协议相关
    Netty
    ELK
    MiniGUI
  • 原文地址:https://www.cnblogs.com/dzzy/p/5770158.html
Copyright © 2011-2022 走看看