简体   繁体   English

EMGU CV的C#exe运行问题

[英]C# exe running issue with EMGU CV

I have been working on Microsoft Visual C# 2010 for an image processing program. 我一直在为图像处理程序开发Microsoft Visual C#2010。 The software uses EMGU CV 2.4.0. 该软件使用EMGU CV 2.4.0。 The program is very long (consists of 8 very lengthy functions) so i cannot post it here. 该程序很长(由8个非常长的功能组成),所以我不能在这里发布它。 Now, the program works perfectly on my pc. 现在,该程序可以在我的PC上完美运行。 I have finished it. 我完成了 I can just run the exe file, and it works. 我可以只运行该exe文件,并且可以运行。 My problem is that the .exe file doesnt work on another computer. 我的问题是.exe文件在另一台计算机上不起作用。 Actually, I have 2 separate projects, But both are using EMGU CV. 实际上,我有2个独立的项目,但是两个都使用EMGU CV。 No error message shows to me when I run the first exe on another pc ( although it shows to me sometimes that ( project1 stopped working, windows is trying to collect information, this might take minutes ) but that's not always. Now the error message that shows to me when i run the second exe on another pc is (microsoft .net framework, EMGU.CV.CVInvoke exception error). then the exe work and a window appear ( which is expected ) but the real task of the program which is doing some image processing is not being done. Note that both of the projects are windows applications output type. Note that .NET framework 4 client profile is the target framework 当我在另一台PC上运行第一个exe时,没有错误消息显示给我(尽管有时向我显示(project1停止工作,Windows试图收集信息,这可能需要几分钟)),但并非总是如此。向我显示了当我在另一台PC上运行第二个exe时(Microsoft .net框架,EMGU.CV.CVInvoke异常错误),然后该exe工作和一个窗口出现(这是预期的),但是该程序的真正任务是未完成某些图像处理。请注意,两个项目都是Windows应用程序输出类型。请注意.NET Framework 4客户端配置文件是目标框架

I don't think this is .NET framework issue. 我认为这不是.NET Framework问题。 Because I have tried to do a simple program and the exe file works on the other pc (it was just a simple streamwriter program which creates .txt) These are the EMGU CV libraries I'm using: 因为我试图做一个简单的程序,并且exe文件在另一台PC上起作用(这只是一个创建.txt的简单的streamwriter程序),所以我正在使用这些EMGU CV库:

EMGU.CV.dll
EMGU.CV.GPU.dll
EMGU.CV.UI.dll
EMGU.CV.UTIL.dll

Just for your information, I have downloaded EMGU CV 2.4.0 on the other pc as well ( after failing in running it with putting the libraries with the .exe in 1 file ) but still nothing works. 仅供参考,我也已在另一台PC上下载了EMGU CV 2.4.0(在将带有.exe的库放入1个文件后无法运行)。 I have no clue what on earth can be the problem! 我不知道到底是什么问题! I don't know if this is useful, but the program uses SURFFEATURE example as the one in the EMGU CV but with lots and lots of modifications ( I have worked on it since the last Novermber) and basically it is a program for object recognition purpose. 我不知道这是否有用,但是该程序使用EMGU CV中的SURFFEATURE示例作为示例,但是进行了大量的修改(自上个Novermber以来我一直在进行此操作),并且基本上它是一个用于对象识别的程序目的。

have you installed the Visual C++ redistributibale on the machine, you are trying to run the file on? 您是否已在计算机上安装了Visual C ++重新分发 ,您正在尝试运行该文件?

If it's a x64 machine you will need the x64 version . 如果是x64机器,则需要x64版本 But I would still also install the x86 version, just in case... 但是我仍然会安装x86版本,以防万一...

I know that this is an old question but.. 我知道这是一个老问题,但是..

If your OS is 64 bit you should use EmguCV x64 but if your OS is 32 bit then use x86 dlls. 如果您的操作系统是64位,则应使用EmguCV x64,但如果您的操作系统是32位,则应使用x86 dll。 I built my solution as 'Any CPU' and it still worked. 我将解决方案构建为“任何CPU”,但仍然可以使用。 Also as @Pogo the Jotz mentioned, you need to install Visual C++ Redistributable on that machine, same as on your visual studio version in which you compiled your exe file. 就像@Pogo Jotz提到的那样,您需要在该计算机上安装Visual C ++ Redistributable,与在其中编译exe文件的Visual Studio版本相同。 The .Net framework also should be the same. .Net框架也应该相同。

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

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