Ask Your Question
0

How can I get an image from a network stream?

asked 2016-09-12 08:22:14 -0600

j0h gravatar image

updated 2016-09-13 11:58:02 -0600

I have a streaming web-camera in my office, it is a proprietary consumer electronics product, I did not build it, and I have a somewhat limited access to programing its underlying hardware.

The stream is at (http://someIP/videostream.cgi?user=z&...)

UPDATE: The camera is a FOSSCAM F18910W

and is formated as a series of jpegs. is there any way I can have OpenCV read a network stream? how would I set that up?

edit retag flag offensive close merge delete

Comments

2

Videocapture is able to read the stream if it receives the proper string. What is the camera manufacturer/model? My suggestion is to visit this page, search for your camera model, and see if you can find that proper url. As your camera seems to be publicly accessible, I can take a look (if you give the model, of course)

LorenaGdL gravatar imageLorenaGdL ( 2016-09-12 08:57:42 -0600 )edit

the listing to the camera, I changed, its a limited user any how.

j0h gravatar imagej0h ( 2016-09-13 12:03:47 -0600 )edit
1

@j0h please be informed that the public URL is still active the update history of the question (/cc @StevenPuttemans )

pklab gravatar imagepklab ( 2016-09-13 13:08:09 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2016-09-12 13:16:35 -0600

pklab gravatar image

updated 2016-09-13 13:03:54 -0600

...follow this small sample

int main(int, char**)
{
    Mat frame;
    string 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;
}
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-09-12 08:22:14 -0600

Seen: 1,979 times

Last updated: Sep 13 '16