Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Using VS capvideo >> img

I'm trying to display a live stream video of an IP camera in my raspberry Pi. What I want to know is the difference of using instead capVideo >> img. My program is in C++.

using namespace cv;
using namespace std;

int main(){
    Mat frame;
    VideoCapture cap("rtsp://ipofmycamera/11");

        cap >> frame; //
        if(frame.empty()) {
            cout << "no frame" << endl;
        imshow("video", frame);
        if(waitKey(30) >= 0) break;