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:[email protected]: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;
}

猜你喜欢

转载自www.cnblogs.com/mathyk/p/11693028.html