Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

As first please remove the public URL of your webcam !!

than, follow this small sample

string theURL ="your_connection_string";
VideoCapture cap(theURL)
if (cap.isOpened()==false) {cout << "ERRROR!"}
while(1)
{
    cap >> frame;
    imshow ("Live",frame);
    if waykey(5)>0 break;
}

As first please remove the public URL of your webcam !!

than, follow this small sample

int main(int, char**)
{
    Mat frame;
    string theURL ="your_connection_string";
 VideoCapture cap(theURL)
 if (cap.isOpened()==false) {cout << "ERRROR!"}
"ERRROR!";return 1}
    while(1)
 {
     cap >> frame;
     imshow ("Live",frame);
     if waykey(5)>0 break;
    }
return 0;
}

As first please remove the public URL of your webcam !!

than, follow this small sample

int main(int, char**)
{
    Mat frame;
    string theURL ="your_connection_string";
    VideoCapture cap(theURL)
    if (cap.isOpened()==false) {cout << "ERRROR!";return 1}
    while(1)
    {
        cap >> frame;
        imshow ("Live",frame);
        if waykey(5)>0 break;
    }
 return 0;
}

As first please remove the public URL of your webcam !!

than, follow this small sample

int main(int, char**)
{
    Mat frame;
    string theURL ="your_connection_string";
    VideoCapture cap(theURL)
    if (cap.isOpened()==false) {cout << "ERRROR!";return 1}
1;}
    while(1)
    {
        cap >> frame;
        imshow ("Live",frame);
        if waykey(5)>0 break;
    }
    return 0;
}

As first please remove the public URL of your webcam !!

than, follow this small sample

int main(int, char**)
{
    Mat frame;
    string theURL ="your_connection_string";
    VideoCapture cap(theURL)
cap(theURL);
    if (cap.isOpened()==false) {cout << "ERRROR!";return 1;}
    while(1)
    {
        cap >> frame;
        if(frame.empty()) {cout << "ERRROR!";return 1;}
        imshow ("Live",frame);
        if waykey(5)>0 break;
    }
    return 0;
}

As first please remove the public URL of your webcam !!

than, follow this small sample

int main(int, char**)
{
    Mat frame;
    string theURL ="your_connection_string";
url ="your_URL";
    VideoCapture cap(theURL);
cap(url);
    if (cap.isOpened()==false) {cout << "ERRROR!";return 1;}
    while(1)
    {
        cap >> frame;
        if(frame.empty()) {cout << "ERRROR!";return 1;}
        imshow ("Live",frame);
        if waykey(5)>0 break;
    }
    return 0;
}

As first please remove the public URL of your webcam !!

than, follow ...follow this small sample

int main(int, char**)
{
    Mat frame;
    string url ="your_URL";
="YOUR_URL"; // e.g. "http://someIP/videostream.cgi?user=xyz&pwd=some_pwd"
    VideoCapture cap(url);
    if (cap.isOpened()==false) {cout << "ERRROR!";return 1;}
    while(1)
    {
        cap >> frame;
        if(frame.empty()) {cout << "ERRROR!";return 1;}
        imshow ("Live",frame);
        if waykey(5)>0 break;
    }
    return 0;
}