简体   繁体   English

如何在Visual Studio 2013上为单元测试设置Emgu CV?

[英]How do I set up Emgu CV on Visual Studio 2013 for Unit Tests?

I've got to test in C# some new C++/CLI managed components in a Visual Studio 2013 Unit Test so that it's visible in the Test Explorer. 我必须在C#中测试Visual Studio 2013单元测试中的一些新的C ++ / CLI托管组件,以便在测试资源管理器中可见。 One of those components uses OpenCV cv::Mat. 这些组件之一使用OpenCV cv :: Mat。

It's been recommended that I use Emgu CV for unit tests. 建议将Emgu CV用于单元测试。 I've installed Emgu CV for Windows x64. 我已经为Windows x64安装了Emgu CV。

How do I install Emgu in the unit test project? 如何在单元测试项目中安装Emgu?

In test project: 在测试项目中:

  • Add reference to Emgu.CV.World.dll 添加对Emgu.CV.World.dll的引用
  • Add file opencv_coreXXXd.dll 添加文件opencv_coreXXXd.dll

    • XXX = version number XXX =版本号
    • Properties | 属性| Copy to Output Directory = "Copy Always" 复制到输出目录=“始终复制”
    • Above unit test class add 以上单元测试课加
      • using Emgu.CV; 使用Emgu.CV;

    See Setting up EMGU C Sharp . 请参阅设置EMGU C Sharp

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

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