uhsl_m uhsl_m - 2 days ago 5
C# Question

Wrap OpenCV C++ for use with C#

I am trying to wrap openCV for use with C#. This the first time I have tried wrapping C++.

I found this question and answer: Creating an C++/CLI OpenCV wrapper to use in C#

However I cannot get the solution to work. If, as told, I just copy the header files from my static library, I need to also link the openCV libs to c++/cli poject so the opencCV includes in the header files work.

However the project will not build due to MTd_StaticDebug does not match the MDd_DynamicDebug being used to build the c++/cli DLL.

Then I tried to abstract out the code, creating an entry class which itself did not reference any openCV types, this still will not build citing the MTd/MDd error.

What do I need to do?

Answer

I tried out both EmguCV and OpenCvSharp. OpenCvSharp seemed to work the best for me.

Comments