Ask Your Question

UnsatisfiedLinkError in Java with VideoCapture

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

Al_guran gravatar image

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

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://");
        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>(
    at Connector.main(

I use Opencv 2.4.9 and IntelliJIdea13

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

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

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


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

Seen: 5,743 times

Last updated: Aug 21 '14