Categories: TutorialsData

Wrapping OpenCV

2 min read

(For more resources related to this topic, see here.)

Architecture overview

In this section we will examine and compare the architectures of OpenCV and Emgu CV.

OpenCV

In the hello-world project, we already knew our code had something to do with the bin folder in the Emgu library that we installed. Those files are OpenCV DLLs, which have the filename starting with opencv_. So the Emgu CV users need to have some basic knowledge about OpenCV.

OpenCV is broadly structured into five main components. Four of them are described in the following section:

  • The first one is the CV component, which includes the algorithms about computer vision and basic image processing. All the methods for basic processes are found here.
  • ML is short for Machine Learning, which contains popular machine learning algorithms with clustering tools and statistical classifiers.

  • HighGUI is designed to construct user-friendly interfaces to load and store media data.
  • CXCore is the most important one. This component provides all the basic data structures and contents.

The components can be seen in the following diagram:

The preceding structure map does not include CvAux, which contains many areas. It can be divided into two parts: defunct areas and experimental algorithms. CvAux is not particularly well documented in the Wiki, but it covers many features. Some of them may migrate to CV in the future, others probably never will.

Emgu CV

Emgu CV can be seen as two layers on top of OpenCV, which are explained as follows:

  • Layer 1 is the basic layer. It includes enumeration, structure, and function mappings. The namespaces are direct wrappers from OpenCV components.
  • Layer 2 is an upper layer. It takes good advantage of .NET framework and mixes the classes together. It can be seen in the bridge from OpenCV to .NET.

The architecture of Emgu CV can be seen in the following diagram, which includes more details:

After we create our new Emgu CV project, the first thing we will do is add references. Now we can see what those DLLs are used for:

  • Emgu.Util.dll: A collection of .NET utilities
  • Emgu.CV.dll: Basic image-processing algorithms from OpenCV
  • Emgu.CV.UI.dll: Useful tools for Emgu controls
  • Emgu.CV.GPU.dll: GPU processing (Nvidia Cuda)
  • Emgu.CV.ML.dll: Machine learning algorithms
Packt

Share
Published by
Packt

Recent Posts

Top life hacks for prepping for your IT certification exam

I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…

3 years ago

Learn Transformers for Natural Language Processing with Denis Rothman

Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…

3 years ago

Learning Essential Linux Commands for Navigating the Shell Effectively

Once we learn how to deploy an Ubuntu server, how to manage users, and how…

3 years ago

Clean Coding in Python with Mariano Anaya

Key-takeaways:   Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…

3 years ago

Exploring Forms in Angular – types, benefits and differences   

While developing a web application, or setting dynamic pages and meta tags we need to deal with…

3 years ago

Gain Practical Expertise with the Latest Edition of Software Architecture with C# 9 and .NET 5

Software architecture is one of the most discussed topics in the software industry today, and…

3 years ago