Opening ip cam mjpg stream

asked 2014-12-07 12:26:44 -0600

I am trying to view a mjpg stream with opencv so I can do some image processing. I am using VideoCapture to open the stream and grab the image, but I cant seem to get the stream to open. I am using this code

    System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
    VideoCapture vc = new VideoCapture();
    vc.open("http://construction.sfhs.com/mjpg/video.mjpg");
    Thread.sleep(100);
    while(true) {
        System.out.println(vc.isOpened());
        Thread.sleep(100);
    }

It just outputs false. I am on windows 7 using opencv 2.4.9

edit retag flag offensive close merge delete