Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Java Webcam Capture

Hello,

I'm trying to lear openCV (java). I have started with simple project (capture video with webcam). Here is a code (I'm using eclipse).

import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.highgui.VideoCapture;

public class Main {
    public static void main(String[] args) {

        //System.loadLibrary("opencv-246.jar");
        VideoCapture cap = new VideoCapture(0);
        Mat frame = new Mat();
        cap.retrieve(frame);

    }
}

When I run my code I'm get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.highgui.VideoCapture.n_VideoCapture(I)J
    at org.opencv.highgui.VideoCapture.n_VideoCapture(Native Method)
    at org.opencv.highgui.VideoCapture.<init>(VideoCapture.java:113)
    at Main.main(Main.java:10)

Can please someone help me.

Thank you very much.

Best

Java Webcam Capture

Hello,

I'm trying to lear learn openCV (java). I have started with simple project (capture video with webcam). Here is a code (I'm using eclipse).

import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.highgui.VideoCapture;

public class Main {
    public static void main(String[] args) {

        //System.loadLibrary("opencv-246.jar");
        VideoCapture cap = new VideoCapture(0);
        Mat frame = new Mat();
        cap.retrieve(frame);

    }
}

When I run my code I'm get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.highgui.VideoCapture.n_VideoCapture(I)J
    at org.opencv.highgui.VideoCapture.n_VideoCapture(Native Method)
    at org.opencv.highgui.VideoCapture.<init>(VideoCapture.java:113)
    at Main.main(Main.java:10)

Can please someone help me.

Thank you very much.

Best

click to hide/show revision 3
retagged

updated 2013-10-01 07:50:53 -0600

berak gravatar image

Java Webcam Capture

Hello,

I'm trying to learn openCV (java). I have started with simple project (capture video with webcam). Here is a code (I'm using eclipse).

import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.highgui.VideoCapture;

public class Main {
    public static void main(String[] args) {

        //System.loadLibrary("opencv-246.jar");
        VideoCapture cap = new VideoCapture(0);
        Mat frame = new Mat();
        cap.retrieve(frame);

    }
}

When I run my code I'm get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.highgui.VideoCapture.n_VideoCapture(I)J
    at org.opencv.highgui.VideoCapture.n_VideoCapture(Native Method)
    at org.opencv.highgui.VideoCapture.<init>(VideoCapture.java:113)
    at Main.main(Main.java:10)

Can please someone help me.

Thank you very much.

Best

Java Webcam Capture

Hello,

I'm trying to learn openCV (java). I have started with simple project (capture video with webcam). Here is a code (I'm using eclipse).

import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.highgui.VideoCapture;

public class Main {
    public static void main(String[] args) {

        //System.loadLibrary("opencv-246.jar");
        VideoCapture cap = new VideoCapture(0);
        Mat frame = new Mat();
        cap.retrieve(frame);

    }
}

When I run my code I'm get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.highgui.VideoCapture.n_VideoCapture(I)J
    at org.opencv.highgui.VideoCapture.n_VideoCapture(Native Method)
    at org.opencv.highgui.VideoCapture.<init>(VideoCapture.java:113)
    at Main.main(Main.java:10)

Can please someone help me.

Thank you very much.

Best

This is how I set my lib. image description

Java Webcam Capture

Hello,

I'm trying to learn openCV (java). I have started with simple project (capture video with webcam). Here is a code (I'm using eclipse).

import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.highgui.VideoCapture;

public class Main {
    public static void main(String[] args) {

        //System.loadLibrary("opencv-246.jar");
        VideoCapture cap = new VideoCapture(0);
        Mat frame = new Mat();
        cap.retrieve(frame);

    }
}

When I run my code I'm get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.highgui.VideoCapture.n_VideoCapture(I)J
    at org.opencv.highgui.VideoCapture.n_VideoCapture(Native Method)
    at org.opencv.highgui.VideoCapture.<init>(VideoCapture.java:113)
    at Main.main(Main.java:10)

Can please someone help me.

Thank you very much.

Best

This is how I set my lib. image descriptionimage description

Java Webcam Capture

Hello,

I'm trying to learn openCV (java). I have started with simple project (capture video with webcam). Here is a code (I'm using eclipse).

import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.highgui.VideoCapture;

public class Main {
    public static void main(String[] args) {

        //System.loadLibrary("opencv-246.jar");
        VideoCapture cap = new VideoCapture(0);
        Mat frame = new Mat();
        cap.retrieve(frame);

    }
}

When I run my code I'm get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.highgui.VideoCapture.n_VideoCapture(I)J
    at org.opencv.highgui.VideoCapture.n_VideoCapture(Native Method)
    at org.opencv.highgui.VideoCapture.<init>(VideoCapture.java:113)
    at Main.main(Main.java:10)

Can please someone help me.

Thank you very much.

Best

This is how I set reset my lib. image descriptionlib. But still get the same error. image description

Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv-246.jar in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1874) at java.lang.Runtime.loadLibrary0(Runtime.java:849) at java.lang.System.loadLibrary(System.java:1087) at Main.main(Main.java:9)