Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ip camera with opencv c++

Hi all, I know this has been asked before, but i can't get it to work despite that...

I have a foscam FI9821EP ip camera that i am trying to use inside opencv.

this code pops up a window, then closes it instantly. Driving me mad! Any help greatly appreciated.

Mat frame;
namedWindow("video", 1);
VideoCapture cap("");
while (cap.isOpened())
    cap >> frame;
    if (frame.empty()) break;

    imshow("video", frame);
    if (waitKey(30) >= 0) break;