📜 ⬆️ ⬇️

OpenCV. Comparative analysis of C # shells

Being engaged in the analysis of photo and video streams, the search for information on the image involuntarily collided with the open library OpenCV , about which I have already been mentioned many times in Habré . But the problem is that OpenCV is implemented for C ++, and I am programming in C #.
So, in order not to learn C ++ in those subtleties that I would need to use OpenCV, I decided to look for the wrapper of this library written under C #.

1. reconnaissance


We climb to Google and literally from the first search results we find useful links.
The most common OpenCV wrapper under C # is EmguCv .
Slightly less known is OpenCvDotNet .
And the most imperceptible - OpenCvSharp .

// Bold prevalence statements are taken from an estimate of the number of requests for a favorite browser.

2. Comparative analysis


And what, in fact, can be compared with the wrappers of the same OpenCV library?
To be honest, very much.
')
For example:

Everything is short, but in order.

A) Installation process:

EmguCV, OpenCVDotNet: Quite a reasonable installer. It seems that everything is fine and something has been put somewhere, but as soon as we open an example in MSVS, there is an insane amount of errors and warnings that the links to the libraries do not work, cannot find the necessary dll files, etc.

If your hands are growing correctly, you want to understand, then you can fasten the references and copy the necessary dll to the desired folder. BUT if there is an installer, why not do it for the developer?
It turns out that if the purpose of the installation was to familiarize with the environment, then this familiarization requires complete immersion.

OpenCvSharp: No installers, download binaries, put in a folder with the solution, run, everything works! Isn't it great? ! Plus, for familiarization, from which, as a rule, everything starts on the website of the wrapper, there is an archive of examples that are ALREADY uploaded to the MSVC project and just click on the Build Solution button to start everything.
In this solution of examples there are already all the necessary links to libraries, links to all images and in general such a project causes a feeling of satisfaction.

B) Percentage of "wrapped" functions


NameEmguCVOpencvsharpOpenCVDotNet
Cross Platform (Mono)YESNONO
Opencv 2.0YESYESNO
Machine learningYESYESNO
Exception HandlingYESYESNO
Debugger visualizerYESYESYES
Actively MaintainedYESYESNO

// Table taken (almost) from the EmguCV website

C) usability documentation

EmguCV: The site contains a complete description of all the functions, made by the prototype MSDN. Lots of comments.
+ No need to download all the documentation if you need to see some kind of one example.
- In the absence of the Internet online documentation is useless.

OpenCVSharp: On the website of this wrapper there is a link to download documentation in two formats, .chm and .html
+ Once downloaded and constantly using.
- When changing computers, for example, from home to work, you need to either download the documentation again or carry it with you.

OpenCVDotNet: There is simply no documentation. !!!

3. Results


For obvious reasons, OpenCVDotNet remains on the side of the road. At the same time, EmguCV and OpenCvSharp have both advantages and disadvantages. But they are both radically different from the third competitor.
The choice is always up to the developer.
I chose OpenCVSharp for myself and am satisfied :)

Ps This is my first article on Habré. Do not judge strictly. With pleasure I will accept as a gift constructive criticism on design.

Source: https://habr.com/ru/post/86574/


All Articles