Ask Your Question
0

UnsatisfiedLinkError in Java with VideoCapture

asked 2014-08-20 19:30:36 -0600

Al_guran gravatar image

updated 2014-08-21 00:48:52 -0600

berak gravatar image

I have been able to connect to and open an rstp h264 IP camera stream, and grab the first frame. But this code:

import org.opencv.highgui.VideoCapture;

public class Connector {

    public static void main(final String[] args) throws Exception
    {
        VideoCapture capture = new VideoCapture("rtsp://109.110.33.67:1935/live/CAM-Shamora.stream");
        if (capture.isOpened()) {
            System.out.println("Video is captured");}
    }
}

give me exception

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.highgui.VideoCapture.VideoCapture_1(Ljava/lang/String;)J
    at org.opencv.highgui.VideoCapture.VideoCapture_1(Native Method)
    at org.opencv.highgui.VideoCapture.<init>(VideoCapture.java:128)
    at Connector.main(Connector.java:7)

I use Opencv 2.4.9 and IntelliJIdea13

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-08-21 00:48:11 -0600

berak gravatar image

your code is missing:

static{ System.loadLibrary(Core.NATIVE_LIBRARY_NAME); }

before main() (so the native c++ code was not loaded)

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-08-20 19:30:36 -0600

Seen: 7,630 times

Last updated: Aug 21 '14