Hey all,
I have been trying desperately to get javacv working on my MacBook 10.6.8 64-bit without any luck.
I followed the following quickstart guide:
http://code.google.com/p/javacv/
I want to use eclipse to do this, but unfortunately i get the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkE
rror:
/private/var/folders/LB/LB
61BZtPFq4L
ULxHfE3xPE
+++TI/-Tmp
-/libjniop
encv_core6
6168757713
79943551.d
ylib:
Library not loaded: lib/libopencv_core.2.4.dyl
ib
Referenced from: /private/var/folders/LB/LB
61BZtPFq4L
ULxHfE3xPE
+++TI/-Tmp
-/libjniop
encv_core6
6168757713
79943551.d
ylib
Reason: image not found
I have tried dumping libopencv_core.2.4.dylib into every lib folder on my system with no luck and have tried changing the following variable in configurations.
DYLD_FALLBACK_LIBRARY_PATH
which i have set to:
/usr/local/lib
and
opt/local/lib
and various other lib directories i have placed the .dylib file into.
I have moved onto compiling on the command line providing the classpath to the jar files via the -cp option and the class compiles, but when i try to run i get the error:
Exception in thread "main" java.lang.NoClassDefFoundE
rror: MotionDetector
So i pulled all the code out of motion detector except for a single print statement that would tell me the classpath "System.out.println(System
.getProper
ty("java.c
lasspath")
)" and i still get the error which leads me to believe that the imports are causing the problem.
import com.googlecode.javacpp.Loa
der;
import com.googlecode.javacv.*;
import static com.googlecode.javacv.cpp.
opencv_cor
e.*;
import static com.googlecode.javacv.cpp.
opencv_img
proc.*;
import static com.googlecode.javacv.cpp.
opencv_cal
ib3d.*;
import static com.googlecode.javacv.cpp.
opencv_obj
detect.*;
I compile and run with commands like:
javac -cp ../javacv.jar:../javacpp.j
ar MotionDetector.java
java -cp ../javacv.jar:../javacpp.j
ar MotionDetector
I have searched the internet for days now trying to find the correct way to include the googlecode into my classpath or on my system but haven't found any, i did follow a tutorial that installed the google plugin into eclipse so i figure it should be there, any help would be hugely appreciated.
- Tristan
MotionDetector2.java
Premium Content
You need an Expert Office subscription to comment.Start Free Trial