OpenCV. Comparative analysis of shells under C #

    While analyzing photo and video streams, searching for information on the image, I involuntarily ran into the OpenCV open library , which was mentioned more than once on  Habré . But the problem is that OpenCV is implemented for C ++, and I program in C #.
    So, in order not to learn C ++ in the intricacies that I would need to use OpenCV, I decided to look for the wrapper of this library written under C #.

    1. Reconnaissance in battle

    We climb into  Google and literally from the first search results we find useful links.
    The most common wrapper for OpenCV under C # is  EmguCv .
    A little less known is OpenCvDotNet .
    And the most inconspicuous - OpenCvSharp .

    // Bold statements about prevalence taken from an estimate of the number of requests of your  favorite browser.

    2. Comparative analysis

    And what, in fact, can be compared with the wrappers of the same OpenCV library?
    To be honest, then a lot.

    For instance:
    • Installation process
    • Percentage of Wrapped Features
    • Usability documentation
    • Availability of examples
    • Etc.

    Everything is short, but in order.

    A) Installation process:

    EmguCV, OpenCVDotNet: Quite a reasonable installer. Everything seems to be fine and something has been delivered somewhere, BUT as soon as we open the example in MSVS, an insane amount of errors and warnings arises that the links to the libraries do not work, cannot find the necessary dll files, etc.

    If  your hands grow correctly, I want to understand, then you can fasten the references and copy the necessary dlls 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 yourself with the environment, then this familiarization requires complete immersion.

    OpenCvSharp: No installers, download binaries, put in the solution folder, run, everything works!Isn't that 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 evokes a feeling of satisfaction.

    B) Percentage of “wrapped” functions

    Cross Platform (Mono)YesNONO
    Opencv 2.0YesYesNO
    Machine learningYesYesNO
    Exception handlingYesYesNO
    Debugger visualizerYesYesYes
    Actively maintainedYesYesNO

    // The table is taken (almost) from the EmguCV website

    C) Usability documentation

    EmguCV: The site contains a full description of all the functions, made on the prototype of MSDN. A lot of comments.
    + No need to download all the documentation if you need to look at one example.
    - In the absence of the Internet, online documentation is useless.

    OpenCVSharp: There is a link on the website of this wrapper for downloading documentation in two formats, .chm and .html
    + Once downloaded and constantly used.
    - When changing a computer, 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. Summary

    For obvious reasons, OpenCVDotNet remains on the side of the road. At the same time, EmguCV and OpenCvSharp have both pros and cons. But they are both radically different from their 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. I will gladly accept a gift of constructive criticism of the design.

    Also popular now: