Click here to Skip to main content
15,897,273 members

problem with Emgu in Monodevelop

mateusz.matyaszek asked:

Open original thread
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
Tags: C#, .NET (Mono), Mobile Apps (Android), EMGUCV

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



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