opencv测试代码


1.

#include "opencv2/opencv.hpp"
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"  
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/video/video.hpp"
#include <iostream>
#include <amcomdef.h>
#include <arcsoft_face_sdk.h>
#include <asvloffscreen.h>
#include <merror.h>

using namespace cv;

int main()
{
    VideoCapture capture;
    Mat frame;
    frame = capture.open("rtsp://admin:admin123@10.129.74.199:554/cam/realmonitor?channel=1&subtype=1");
    if (!capture.isOpened())
    {
        printf("can not open ...\n");
        return -1;
    }
    namedWindow("output", CV_WINDOW_AUTOSIZE);

    while (capture.read(frame))
    {
        imshow("output", frame);
        waitKey(10);
    }
    capture.release();
    return 0;
}

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM