Questions tagged [emgucv]

EmguCV is a cross-platform .NET wrapper to the OpenCV image processing library. Allowing OpenCV functions to be called from .NET compatible languages such as C#, VB, C++-CLI, IronPython etc. The wrapper can be compiled in Mono and run on Linux or Mac OS X.

About EmguCV

EmguCV opens the OpenCV (Open Source Computer Vision Library) library of programming functions mainly aimed at real time computer vision to .NET developers. OpenCV was originally developed by Intel and now supported by Willow Garage.

Current versions for x86 , x64 and ARM(only for iOS and Android) architectures are available for download at their SourceForge website, https://sourceforge.net/projects/emgucv/.

A download and installation guide is available here. This is particularly useful for newcomers as ensuring the correct references are used and that the associated OpenCV .dll files are copied to the output directory can be difficult.

EmguCV uses a dual-license business model for its software development library and offers licenses for two distinct purposes: open source, and commercial development. More information can be found here.

Cross Platform

Unlike other wrappers such as OpenCVDotNet, SharperCV or Code Project which use unsafe code, EmguCV is written entirely in C#. The benefit is that it can be compiled in Mono and therefore is able to run on any platform Mono supports, including Linux, Solaris and Mac OS X. A lot of efforts have been spent creating a pure C# implementation since the headers have to be ported, compared with managed C++ implementation where header files can simply be included. But it is well worth it if you see EmguCV running on Fedora 10! Plus it always gives you the comfort knowing that your code is cross-platform.

EmguCV can be used from several different languages, including C#, VB.NET, C++-CLI and IronPython. On this wiki, we provide examples for all those languages, which are available from the Examples section on Tutorial page. Our discussion forum is also available if you have any questions related to your favorite programming language.

Other Advantages

  • Image class with Generic Color and Depth
  • Automatic garbage collection
  • XML Serializable Image
  • XML Documentation and intellisense support
  • The choice to either use the Image class or direct invoke functions from OpenCV
  • Generic operations on image pixels

Architecture Overview

EmguCV has two layers of wrapper as shown below

  • The basic layer (layer 1) contains function, structure and enumeration mappings which directly reflect those in OpenCV.
  • The second layer (layer 2) contains classes that mix in advantages from the .NET world.

EmguCVArchitecture.png

2204 questions
15
votes
3 answers

How to lock autofocus

Is there a way to prevent auto-focus from focusing, using any of the "standard" libraries, such as OpenCV, EmGU, DirectShow, etc? I want auto-focus to find the optimal focus, then during video capture, prevent auto-focus from auto-focusing. I know I…
15
votes
3 answers

Type initialization exception

I created imageHolder class: public class ImageHolder : Image { private String imagePath; public ImageHolder(String path):base(path) { this.imagePath = path; } public String…
Michael
  • 13,950
  • 57
  • 145
  • 288
14
votes
1 answer

EmguCV: Draw contour on object in Motion using Optical Flow?

I would like to do motion detection in C# (using EmguCV 3.0) to remove object in motion or in foreground to draw an overlay. Here is a sample test I done with a Kinect (because It's a depth camera) How can I get started with EmguCV 3.0 ? I tried…
Jean-Philippe Encausse
  • 1,491
  • 2
  • 22
  • 40
14
votes
2 answers

How to convert Bitmap to Mat structur in EmguCV & How to detect two images shift

Hello Dear Forum Members ! I am working on a project to detect change view from security camera. I mean, when someone try to move camera (some kind of sabotage...) I have to notice this. My idea is: capture images from camera every 10 sec and…
Mariusz
  • 233
  • 1
  • 3
  • 8
14
votes
6 answers

EmguCV TypeInitializationException

i really a newbie with EgmuCV i try to capture images from webcam with the following code: //Program.cs (Winform) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using…
rkmax
  • 17,633
  • 23
  • 91
  • 176
13
votes
6 answers

People Counting System

I want to develop a "People Counting System" using OpenCV (or Emgu CV). Please guide me on how to implement or lead me to some examples or open source projects. (I have done some work: extracting diff then threshold to delete background, using…
Kaveh Shahbazian
  • 13,088
  • 13
  • 80
  • 139
13
votes
5 answers

Emgu error when trying to install emgu.CV.runtime.windows in VC# 2017

I'm trying to install emgu.CV.runtime.windows from within Visual Studio 2017, and installing by the recommeded method of right-clicking references and installing via NuGet. However I am getting the error below. Could not install package…
Scott Mooney
  • 167
  • 1
  • 1
  • 4
13
votes
7 answers

Dice face value recognition

I’m trying to build a simple application that will recognize the values of two 6-sided dice. I’m looking for some general pointers, or maybe even an open source project. The two dice will be black and white, with white and black pips respectively.…
Jakob Gade
  • 12,319
  • 15
  • 70
  • 118
13
votes
2 answers

Image preprocessing for text recognition

What's the best set of image preprocessing operations to apply to images for text recognition in EmguCV? I've included two sample images here. Applying a low or high pass filter won't be suitable, as the text may be of any size. I've tried median…
Osiris
  • 4,195
  • 2
  • 22
  • 52
12
votes
2 answers

How to reduce number of classes in YOLOv3 files?

I am using YOLOv3 to detect cars in videos. I downloaded three files used in my code coco.names, yolov3.cfg and yolov3.weights which are trained for 80 different classes of objects to be detected. The code worked but very slowly, it takes more than…
AbdelAziz AbdelLatef
  • 3,650
  • 6
  • 24
  • 52
12
votes
2 answers

HoughCircles Doesn't detect circles correctly in OpenCV

I am using Visual Studio 2015, OpenCV.3 and EmguCV.3. My code represented below and the result is shown in the picture. I know that the problem is the input values of HoughCircles function, but I don't know which inputs are suitable for this…
mjyazdani
  • 2,110
  • 6
  • 33
  • 64
12
votes
2 answers

It is possible to get an IntPtr from an int[] array?

Greetings. In C#: If I have an int[] array declared like this int[] array = new array[size]; there is an way to get the IntPtr from this array? The thing is that I'm using the EmguCV framework, and there is an constructor to create an image which…
João Cardoso
  • 351
  • 3
  • 5
  • 13
12
votes
2 answers

emgu finding image a in image b

I'm new to emgu and would like some advice on where to start. I've looked through the shape detection but its far too complex for what i need .. i think.. and my surfexample isn't working. I get this error: Cannot get SURF example in EMGU.CV to…
user2078674
  • 165
  • 2
  • 2
  • 14
12
votes
2 answers

What do the elements in a homography matrix mean?

I'm new to image processing, but I'm using EMGU for C# image analysis. However, I know the homography matrix isn't unique to EMGU, and so perhaps someone with knowledge of another language can explain better. Please (in as simplified as can be) can…
Mattb2291
  • 167
  • 1
  • 3
  • 8
11
votes
1 answer

Voronoi graph from set of polygons in Emgu CV (or OpenCV)

Using Emgu CV I have extracted a set of closed polygons from the contours in an image of a road network. The polygons represent road outlines. The result is shown below, plotted over an OpenStreetMaps map (the polygons in 'pixel' form from Emgu CV…
mchristos
  • 1,487
  • 1
  • 9
  • 24