C# 4.0 如何在Raspberry PI 2上运行EMGU CV示例应用程序
我已经下载了Raspberry Pi 2的Emgucv,其中有一些示例项目,当我尝试使用此cmd运行应用程序时C# 4.0 如何在Raspberry PI 2上运行EMGU CV示例应用程序,c#-4.0,mono,raspberry-pi2,C# 4.0,Mono,Raspberry Pi2,我已经下载了Raspberry Pi 2的Emgucv,其中有一些示例项目,当我尝试使用此cmd运行应用程序时 mono /home/pi/Downloads/libEmgu/usr/bin/Example.HelloWorld.monoexe 我有个例外 Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for Emgu.CV.
mono /home/pi/Downloads/libEmgu/usr/bin/Example.HelloWorld.monoexe
我有个例外
Unhandled Exception:
System.TypeInitializationException: An exception was thrown by the type initializer for Emgu.CV.CvInvoke ---> System.TypeInitializationException: An exception was thrown by the type initializer for Emgu.Util.Platform ---> System.DllNotFoundException: c
at (wrapper managed-to-native) Emgu.Util.Platform:uname (intptr)
at Emgu.Util.Platform..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Emgu.CV.CvInvoke.GetModuleFormatString () [0x00000] in <filename unknown>:0
at Emgu.CV.CvInvoke..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at HelloWorld.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for Emgu.CV.CvInvoke ---> System.TypeInitializationException: An exception was thrown by the type initializer for Emgu.Util.Platform ---> System.DllNotFoundException: c
at (wrapper managed-to-native) Emgu.Util.Platform:uname (intptr)
at Emgu.Util.Platform..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Emgu.CV.CvInvoke.GetModuleFormatString () [0x00000] in <filename unknown>:0
at Emgu.CV.CvInvoke..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at HelloWorld.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
未处理的异常:
System.TypeInitializationException:Emgu.CV.CvInvoke的类型初始值设定项引发异常-->System.TypeInitializationException:Emgu.Util.Platform的类型初始值设定项引发异常-->System.DllNotFoundException:c
at(wrapper managed to native)Emgu.Util.Platform:uname(intptr)
在Emgu.Util.Platform..cctor()[0x00000]中:0
---内部异常堆栈跟踪的结束---
在:0中的Emgu.CV.CvInvoke.GetModuleFormatString()[0x00000]处
在:0中的Emgu.CV.CvInvoke..cctor()[0x00000]处
---内部异常堆栈跟踪的结束---
在HelloWorld.Program.Main(System.String[]args)[0x00000]中:0
[错误]致命的未处理异常:System.TypeInitializationException:Emgu.CV.CvInvoke-->System.TypeInitializationException的类型初始值设定项引发异常:Emgu.Util.Platform-->System.DllNotFoundException:c的类型初始值设定项引发异常
at(wrapper managed to native)Emgu.Util.Platform:uname(intptr)
在Emgu.Util.Platform..cctor()[0x00000]中:0
---内部异常堆栈跟踪的结束---
在:0中的Emgu.CV.CvInvoke.GetModuleFormatString()[0x00000]处
在:0中的Emgu.CV.CvInvoke..cctor()[0x00000]处
---内部异常堆栈跟踪的结束---
在HelloWorld.Program.Main(System.String[]args)[0x00000]中:0
任何人都可以帮助指导如何使用opencv运行应用程序。System.DllNotFoundException:
找不到Emgu CV本机库:
System.TypeInitializationException:异常由
Emgu.CV.CvInvoke的类型初始值设定项--->
System.TypeInitializationException:异常由
Emgu.Util.Platform的类型初始值设定项-->System.DllNotFoundException: 在Linux上安装并编译Emgv CV(不仅是C#包装器代码,还有CPP代码)后,您需要告诉
Mono
运行时在哪里可以找到本机库(即使它们与C#程序集位于同一目录中):
运行示例
就你而言:
cd /home/pi/Downloads/libEmgu/usr/bin/
指定动态库路径:
在bin dir中运行示例:
有关详细信息,请参阅以下链接:System.DllNotFoundException:
找不到Emgu CV本机库:
System.TypeInitializationException:异常由
Emgu.CV.CvInvoke的类型初始值设定项--->
System.TypeInitializationException:异常由
Emgu.Util.Platform的类型初始值设定项-->System.DllNotFoundException: 在Linux上安装并编译Emgv CV(不仅是C#包装器代码,还有CPP代码)后,您需要告诉
Mono
运行时在哪里可以找到本机库(即使它们与C#程序集位于同一目录中):
运行示例
就你而言:
cd /home/pi/Downloads/libEmgu/usr/bin/
指定动态库路径:
在bin dir中运行示例:
参考以下链接了解更多详细信息:我已从下载了emgucv,并遵循了您的所有步骤,但我仍然遇到相同的异常。您提供的链接是针对OS-X的,对于RaspberryPI,您需要自己构建,使用我在答案中提供的链接,从Linux部分开始,然后一步一步地进行(包括R-Pi选项)你应该很好:它仍然没有工作,但我仍然得到相同的错误。:(:(我从下载了emgucv,我遵循了你的所有步骤,但我还是遇到了同样的例外。你提供的链接是针对OS-X的,对于RaspberryPI,你需要自己构建它,使用我在答案中提供的链接,从Linux部分开始,然后一步一步地进行(包括R-Pi选项)你应该是好的:它仍然没有工作,但我仍然得到同样的错误(
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
mono Example.HelloWorld.monoexe