Search code examples
visual-studiounit-testingopencvemgucvtest-explorer

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. One of those components uses OpenCV cv::Mat.

It's been recommended that I use Emgu CV for unit tests. I've installed Emgu CV for Windows x64.

How do I install Emgu in the unit test project?


Solution

  • In test project:

    • Add reference to Emgu.CV.World.dll
    • Add file opencv_coreXXXd.dll

      • XXX = version number
      • Properties | Copy to Output Directory = "Copy Always"
      • Above unit test class add
        • using Emgu.CV;

      See Setting up EMGU C Sharp.