Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds

Wrapping OpenCV

Save for later
  • 120 min read
  • 2013-11-11 00:00:00

article-image

(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:

wrapping-opencv-img-0

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at $15.99/month. Cancel anytime

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:

wrapping-opencv-img-1

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