You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jav...@googlegroups.com
Hello.
I am writing an application using JavaCV in Netbeans 7.1 using Maven. Unfortunately when I run a simple example like this: 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 JavaCVTest { public static void main(String[] argv) { System.out.println(System.getenv("java.library.path")); String filename = "/home/proger/cat.png"; String resultFile = "/home/proger/catNew.png"; IplImage image = cvLoadImage(filename); if (image != null) { cvSmooth(image, image, CV_GAUSSIAN, 3); cvSaveImage(filename, image); cvReleaseImage(image); } } }
I receive an exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860) at java.lang.Runtime.loadLibrary0(Runtime.java:845) at java.lang.System.loadLibrary(System.java:1084) at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:444) at com.googlecode.javacpp.Loader.load(Loader.java:368) at com.googlecode.javacpp.Loader.load(Loader.java:315) at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:131) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.googlecode.javacpp.Loader.load(Loader.java:334) at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:96) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.googlecode.javacpp.Loader.load(Loader.java:334) at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:91) at uk.ac.glyndwr.imageSpamFilter.JavaCVTest.main(JavaCVTest.java:16)
I installed OpenCV correctly and run examples that is bundled with its source code and everything was fine. I also tried to run an application from JavaCV examples without Maven and it also worked fine.
I added javacv dependencies to my Maven pom file in the following way: <dependency> <groupId>com.googlecode.javacv</groupId> <artifactId>javacv</artifactId> <version>0.1</version> </dependency> <dependency> <groupId>com.googlecode.javacpp</groupId> <artifactId>javacpp</artifactId> <version>0.1</version> </dependency>