c# download opencv.net - .Net (dotNet) wrappers for OpenCV?

4 Answers

We use OpenCVSharp the google code website is in Japanese but it uses the latest OpenCV builds and impliments IDisposable throughout. It seems to provide more functioanlity than any of the others we have seen to date and is still active. It has quite extensive example programs as well.

examples tutorial pdf

I've seen there are a few of them. opencvdotnet, SharperCV, EmguCV, One on Code Project.

Does anyone have any experience with any of these? I played around with the one on Code Project for a bit, but as soon as I tried to do anything complicated I got some nasty uncatchable exceptions (i.e. Msgbox exceptions). Cross platform (supports Mono) would be best.

OpenCV.NET is available from NuGet



Here's a list of features from the project site:

OpenCV.NET is a .NET interface for the popular OpenCV computer vision and image processing library. These bindings were developed over the course of a year and include many features that have been missing from other attempts, namely:

  • Cross-platform Mono compatibility (only P/Invoke is used)
  • Very close to 100% support of the latest C API (including undocumented functions)
  • Full documentation/intellisense for all supported methods, classes and enum members (arduously mined from many different sources)
  • Support for exceptions
  • Garbage-collector friendly:
    • GC is aware of the actual memory used by matrices and images
    • Pointers are guaranteed to survive function calls even if concurrent garbage collection happens
  • Object model following C++ API as much as possible (towards future increased support of C++ API)
  • BSD-style license (MIT)

I know this question has been answered for a long time, but I would like to add that there is a very good wrapper here. This is the new version of the openCV wrapper that you tried on code project. I've tried it for a couple of days and everything works perfect. Also, I got it working in minutes.

I don't know for the compatibility with mono but under Visual Studio 2010, it works like a charm and saved me ton's of time and money (my project is commercial and most of the library are open source with licence that doesn't allow commercial utilisation unless publishing the code)