opencv - JavaCV giving java.lang.UnsatisfiedLinkError -
alright, may "use google search this, there millions of them". however, spent day run following code every since tried got java.lang.unsatisfiedlinkerror: c:\users\hp\appdata\local\temp\jniopencv_core2477828805078034839.dll: can't find dependent libraries error drives me mad.
i found javacv-bin folder includes javacpp.jar, javacv.jar, javacv-windows-x86.jar, javacv-windows-x86_64.jar.
in netbeans, opened project properties , added them libraries
i found opencv2.3 folder, copied , pasted c:\ directory.
added c:\opencv2.3\build\bin; c:\opencv2.3\build\x86\vc10\bin; c:\opencv2.3\build\x64\vc10\bin; in path.
, believe nothing left. however, every since tried got same error. i'm exhausted please me.
and last say, have both 32-bit , 64-bit jdks tried both compilers it's no use.
import static com.googlecode.javacv.cpp.opencv_core.*; import static com.googlecode.javacv.cpp.opencv_imgproc.*; import static com.googlecode.javacv.cpp.opencv_highgui.*; public class smoother { public static void main(string[] args) { smooth("filename0.png"); } public static void smooth(string filename) { system.out.println("java.library.path="+system.getproperty("java.library.path")); iplimage image = cvloadimage(filename); if (image != null) { cvsmooth(image, image, cv_gaussian, 3); cvsaveimage(filename, image); cvreleaseimage(image); } } }
i had same problem did. assuming opencv folder location c:\opencv2.3
, here do.
create path , classpath variables under both user , system environment variables.
append 4 variables(assuming have latest version of opencv2.3):
c:\opencv2.3\build\bin;c:\opencv2.3\build\x64\mingw\bin;c:\opencv2.3\build\x64\vc9\bin;c:\opencv2.3\build\x64\vc10\bin;c:\opencv2.3\build\x86\mingw\bin;c:\opencv2.3\build\x86\vc9\bin;c:\opencv2.3\build\x86\vc10\bin;
hope helps! aravind
Comments
Post a Comment