繁体   English   中英

Emgu.CV在Windows 7 x64上不起作用

[英]Emgu.CV dont work on windows 7 x64

我的程序可以在Windows 8 x64中正常工作。 但是,当我尝试在装有Windows 7 x64的笔记本电脑上运行它时,我遇到了一些问题。

错误:

A first chance exception of type 'System.ArgumentException' occurred in mscorlib.dll
Additional information: URI formats are not supported.

A first chance exception of type 'System.BadImageFormatException' occurred in Emgu.CV.dll
Additional information: You tried to load the wrong format. (Excluded from the HRESULT: 0x8007000B)

A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Additional information: Target call threw an exception.

A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Additional information: Target call threw an exception.

'InzV2.vshost.exe' (CLR v4.0.30319: InzV2.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml.resources\v4.0_4.0.0.0_pl_b77a5c561934e089\System.Xaml.resources.dll'. Module was built without symbols.
A first chance exception of type 'System.Xaml.XamlObjectWriterException' occurred in System.Xaml.dll
Additional information:Calling the constructor for the type of „InzV2.MainWindow” compatible with specific binding constraints caused an exception.

A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
Additional information: Calling the constructor for the type of „InzV2.MainWindow” compatible with specific binding constraints caused an exception., line number 3, position 9.

An unhandled exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
Additional information: Calling the constructor for the type of „InzV2.MainWindow” compatible with specific binding constraints caused an exception., line number 3, position 9.

这个错误看起来像这样: 在此处输入图片说明

我正在使用来自Nuget的Emgu.CV库,名为:myEmguCV.Net。

即使我尝试只用以下命令创建新项目:

BackgroundSubtractorMOG2 pMog11 = new BackgroundSubtractorMOG2(0, 80, false);

我有错误..

当非托管程序集是为不同于当前正在编译的.NET代码的平台编译的时,会发生此错误。

例如,如果非托管dll在x86体系结构中,而您尝试将代码编译为x64 .NET运行时,则将出现此类错误。

在您提供的映像中,您似乎正在尝试将代码编译为x86体系结构,并且您的EmguCV非托管.dll可能基于x64。

所以去

项目->属性->生成->选中与非托管dll编译平台匹配的平台(x86,x64)(在您的情况下,应该为x64)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM