Error in JavaCV 0.7 VideoCapture
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?
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)
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); }
ah, ok, my bad. sorry for the confusion
So what's the solution?? I also have put the opencv_java249.dll in Netbeans Project directory.