Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Connect to public IP camera in Java

I'm trying to connect to a public IP camera ( in Java by using the following:

import org.opencv.core.Core;
import org.opencv.videoio.VideoCapture;

public class Main
    public static void main(String[] args)
        System.out.println("Welcome to OpenCV " + Core.VERSION);

        VideoCapture ip_cam = new VideoCapture();"");

        if (!ip_cam.isOpened())
            System.out.print("Error while trying to open the webcam");



However, it refuses to open. It doesn't throws any error messages nor anything. I've tried running it as admin, downgrading from OpenCV 3.0.0 to 2.4.11, trying to connect to a different IP camera.. nothing. Since it's such a simple program I just can't figure out what's wrong.

I'm using OpenCV 3.0.0, Eclipse Mars 1 4.5.1 and Win7 64bits.