Integrate OpenCV (Emgu or OpenCvSharp) how to?

Hi everyone,

I’ve saw videos like this: Unity + OpenCvSharp - YouTube
which seems a successfully integrated OpenCvSharp into Unity.

I tried to contact this ‘aiminable’ but he’s not giving back any response.

Did anyone here integrated OpenCV to Unity before? Could you give me some information on how to do that? I keep getting errors when I try to make OpenCvSharp or Emgu working.

Any help would be appreciated. Thanks.

I ran across quite a few questions like this while searching around today to get OpenCV up and running, and after an embarassing length of time to figure it out, just figured I should follow up here:

The Internal Compiler/System.Drawing error that people see: in your project settings / Player / Api compatibility level, set your to .NET 2.0 instead of the Subset!

As to the other common error people are seeing, the OpenCVSharp popup for “DllNotFoundException: opencv_core220.dll”
when using the OpenCvSharp from HERE the current build on there depends on OpenCV 2.4, you then need to download OpenCV 2.4 from HERE then take the .dll’s you plan to use and place them in the same directory as your Exe…

EX: if you want to play in the editor, you can place them in the Program files/Unity/Editor/ dir… if you want to play with a standalone, place them in the same dir as your standalone .exe file.

after that, fun with programming!

PS: I should also add that I ended up having to compile my own OpenCV before it would work, following the directions in the openCV help, cmake, visual studio, etc.

Does anyone have a Unity plugin or sample program that we could just download?

I actually figured it out months ago, but forget to post an answer here!

I finally made contact with animinable. The thing is OpenCvSharp need to be recompiled with System.Drawings deleted (unity do not support that). Then put the dlls in and it will work.

Thanks to animinable!

Hi,

I think the best approach is to get OpenCV plus Unity from Asset Store.

94975-forum-small.png