Click here to Skip to main content
15,887,442 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I get error:
E/mono (14146): WARNING: The runtime version supported by this application is unavailable.
E/mono (14146): Using default runtime: v2.0.50727
I/monodroid-gc(14146): environment supports jni NewWeakGlobalRef
W/monodroid-gc(14146): GREF GC Threshold: 1800
I/dalvikvm-heap(14146): Grow heap (frag case) to 7.457MB for 1440016-byte allocation
I/mono-stdout(14146): Loaded opencv_core.
I/MonoDroid(14146): UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for Emgu.CV.CvInvoke ---> Java.Lang.UnsatisfiedLinkError: Exception of type 'Java.Lang.UnsatisfiedLinkError' was thrown.
I/MonoDroid(14146): at Android.Runtime.JNIEnv.CallStaticVoidMethod (IntPtr jclass, IntPtr jmethod, Android.Runtime.JValue[] parms) [0x00000] in <filename unknown="">:0
I/MonoDroid(14146): at Java.Lang.JavaSystem.LoadLibrary (System.String libName) [0x00000] in <filename unknown="">:0
I/MonoDroid(14146): at Emgu.CV.CvInvoke..cctor () [0x00000] in <filename unknown="">:0
I/MonoDroid(14146): --- End of managed exception stack trace ---
I/MonoDroid(14146): java.lang.UnsatisfiedLinkError: Cannot load library: find_library[1199]: 37 'libopencv_imgproc.so' failed to load previously

from code :
 public void LoadImage (String imageName)
		{
			int Width = 800;
			int Height = 600;
       		                            
			byte[] buffer = new byte[Width * Height * 3];

			using (System.IO.Stream iStream = Assets.Open ("800x600.bmp")) {     
				iStream.Read (buffer, 0, buffer.Length);
	            
			}
			GCHandle handle = GCHandle.Alloc (buffer, GCHandleType.Pinned);		
			Image<Gray, Byte> grey = new Image<Gray, byte>(Width, Height, Width, handle.AddrOfPinnedObject());

			CvInvoke.cvCanny (grey, grey, 100, 60, 3);
}

Funny enough error shows on Image... while if I remove CvInvoke line it loads all .so files correctly
Help im stuck
Posted
Updated 4-Jul-12 23:38pm
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900