View Single Post
  #1   Spotlight this post!  
Unread 14-10-2014, 14:15
dawonn's Avatar
dawonn dawonn is offline
Mentor
AKA: Dereck
FRC #2586 (Calumet Copperbots)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Auburn Hills, Mi
Posts: 53
dawonn is an unknown quantity at this point
Angry Java, OpenCV, & an Axis Camera

I grabbed the latest copy of the JDK, OpenCV, and Eclipse and I want to simply read in the live video stream from an Axis M1013 camera and display it.

I've spent a few hours at it and found plenty of other posts with code they used to connect to the camera but it appears to be no luck for me.

Here's what I have:
Code:
import org.opencv.core.Core;
import org.opencv.highgui.VideoCapture;

public class HelloCV {

    public static void main(String[] args) {
        System.out.println("Welcome to OpenCV " + Core.VERSION);
        System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
        
        VideoCapture capture = new VideoCapture();
        capture.open("http://10.25.86.11/mjpg/video.mjpg");

        if (capture.isOpened()) 
            System.out.println("Video link open.");
        else 
            System.out.println("Video link not open.");    
    }

}
But the connection never opens, here's the output:
Code:
Welcome to OpenCV 2.4.10.0
Video link not open.

I can use that url in VLC to view the live stream, so I am of the belief that the camera is correctly configured and the network is properly set up. Suggestions greatly appreciated.
Reply With Quote