Problem in linking opencv java with eclipse
Hi, I am trying to use openCV with eclipse in windows 7.I followed this(http://) tutorial but still it is giving following error: Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_eye(III)J at org.opencv.core.Mat.n_eye(Native Method) at org.opencv.core.Mat.eye(Mat.java:1467) at com.hit_and_try.Hello.main(Hello.java:12) Please let me know where I am going wrong.
Can you add part of your code?
This is the sample code
package com.hit_and_try;
import org.opencv.core.Core; import org.opencv.core.CvType; import org.opencv.core.Mat;
public class Hello { public static void main( String[] args ) { System.loadLibrary( Core.NATIVE_LIBRARY_NAME ); Mat mat = Mat.eye( 3, 3, CvType.CV_8UC1 ); System.out.println( "mat = " + mat.dump() ); } }
And this is the error m getting
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_eye(III)J at org.opencv.core.Mat.n_eye(Native Method) at org.opencv.core.Mat.eye(Mat.java:1467) at com.hit_and_try.Hello.main(Hello.java:12)
I think that you have to call to " private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) {" and just after this you can create matrix. look at this http://docs.opencv.org/platforms/android/service/doc/BaseLoaderCallback.html and this tutorial : http://docs.opencv.org/trunk/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html
there was some problem with native libraries..which I sorted out by trying out different combinations Thankyou itay
@kaira, what have you done exactly ? : |
I'm facing the same problem... would you give me mote information about what you've done, Kaira?
Got it! Try A new version! it worked for me!
Tried a new version of what? I still cannot get this to work.