Jürgen K.
Jürgen K.

Reputation: 3487

Mat initialization exception in java

I am using OpenCv in Java.

import org.opencv.core.Mat;

Now i'm trying to initialize a new Mat like this:

Mat points = new Mat();

What i recieve is the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError:

org.opencv.core.Mat.n_Mat()J
    at org.opencv.core.Mat.n_Mat(Native Method)
    at org.opencv.core.Mat.<init>(Mat.java:15)

I have no idea what this exception is about. Also no idea what i could have done wrong. Do you?

Upvotes: 3

Views: 779

Answers (1)

J&#252;rgen K.
J&#252;rgen K.

Reputation: 3487

Now i found it out.
following line is missing:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

Upvotes: 2

Related Questions