/* String model = System.getProperty(“sun.arch.data.model”);
// the path the .dll lib location
String libraryPath = “G:\opencv\build\java\x64\”;
// check for if system is 64 or 32
if(model.equals(“64”)) {
libraryPath = “G:\opencv\build\java\x64\”;
}
// set the path
System.setProperty(“java.library.path”, libraryPath);
java.lang.reflect.Field sysPath = ClassLoader.class.getDeclaredField(“sys_paths”);
sysPath.setAccessible(true);
sysPath.set(null, null); */
// load the lib
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
Mat mat = Mat.eye( 3, 3, CvType.CV_8UC1 );
System.out.println( "mat = "+ mat.dump() );
把注释的代码放开 运行就ok了
java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_eye(III)J
最新推荐文章于 2024-03-24 23:11:17 发布