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