可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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.
回答1:
I started out with opencvdotnet but it's not really actively developed any more. Further, support for the feature I needed (facedetection) was patchy. I'm using EmguCV now: It wraps a much greater part of the API and the guy behind it is very responsive to suggestions and requests. The code is a joy to look at and is known to work on Mono.
I've wrote up a quick getting-started guide on my blog.
回答2:
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.
回答3:
I think it's important to note that the original question was asked in 2008, and OpenCV 2.0 was released in 2009. The version 2.0 release introduced a C++ wrapper which is significantly easier to work with than the older C interface that the OP was confronted with. For my .NET project, I'm leaving all the graphic manipulation in native C++.
Try this: create a C++/CLR DLL project which links to the OpenCV libraries. The OpenCV manual describes how to do this for a Windows C++ EXE, the same steps also work for a C++/CLR DLL. Then of course the DLL exports methods which are callable from a .NET EXE.
To test it, you should be able to incorporate any of the OpenCV samples into your DLL with a little tweaking. (Add the .CPP file to your project, convert the main() function to a class member, etc. - you know the drill...) A good test candidate might be the "mat_mask_operations" sample.
回答4:
OpenCV.NET is available from NuGet
https://bitbucket.org/horizongir/opencv.net
https://www.nuget.org/packages/OpenCV.Net
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)
回答5:
I think best wrapper is opencvsharp
http://code.google.com/p/opencvsharp/
回答6:
I created a NuGet Package to make easy to start with OpenCv in C#, using EmguCV.
Check it out!
In Visual Studio search and add the myEmguCV.Net NuGet package.
https://www.nuget.org/packages/myEmguCV.Net
回答7:
SharperCV was our tool of choice, and it doesn't let us down, for our robotics project. Even though it is currently marked as abandoned, the code is in really good shape, requires only minor tweaking to customize it for your need. No msgboxes, and actually very sane exception handling.
Not cross-platform, though, due to the interoperability layer.
回答8:
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)