Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Mono C# Android EMGU
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 Blush | :O
I/MonoDroid(14146): at Java.Lang.JavaSystem.LoadLibrary (System.String libName) [0x00000] in Blush | :O
I/MonoDroid(14146): at Emgu.CV.CvInvoke..cctor () [0x00000] in Blush | :O
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 4-Jul-12 23:55pm
Edited 5-Jul-12 0:38am
v4

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

  Print Answers RSS
0 OriginalGriff 390
1 Jochen Arndt 150
2 Richard MacCutchan 135
3 DamithSL 95
4 Garth J Lancaster 90
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,260


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 5 Jul 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100