Error in JavaCV 0.7 VideoCapture

asked 2014-05-11 02:23:33 -0600

This is so sad. I am interested in learning Computer Vision by using Java but I end up got an error at the beginning stage of my learning. I got the following error:

java.lang.UnsatisfiedLinkError: org.opencv.highgui.VideoCapture.VideoCapture_2(I)J

at org.opencv.highgui.VideoCapture.VideoCapture_2(Native Method)

at org.opencv.highgui.VideoCapture.<init>(VideoCapture.java:154)

Anybody knows how can I resolve this issue?

edit retag flag offensive close merge delete

Comments

are you sure, that code is using javacv ?

the error looks more like it's from opencv's own java wrapper (please understand, that it's 2 different pair of shoes here) .

if you are on windows, did you put the opencv dlls on the PATH ? (seems it can't find opencv_java*.dll)

berak gravatar imageberak ( 2014-05-11 04:57:50 -0600 )edit

yes the code is using JavaCV. private VideoCapture initGrabber(int ID) { VideoCapture grabber = new VideoCapture(ID); if ((grabber == null) || (!grabber.isOpened())) { System.out.println("Cannot connect to webcam: " + ID); System.exit(1); } else { System.out.println("Connected to webcam: " + ID); grabber.set(Highgui.CV_CAP_PROP_FRAME_WIDTH, WIDTH); // make sure of frame size grabber.set(Highgui.CV_CAP_PROP_FRAME_HEIGHT, HEIGHT); }

    return grabber;
}  // end of initGrabber()
charisma tubagus s gravatar imagecharisma tubagus s ( 2014-05-11 08:43:53 -0600 )edit

ah, ok, my bad. sorry for the confusion

berak gravatar imageberak ( 2014-05-11 08:46:32 -0600 )edit

So what's the solution?? I also have put the opencv_java249.dll in Netbeans Project directory.

charisma tubagus s gravatar imagecharisma tubagus s ( 2014-05-17 19:42:43 -0600 )edit