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
7
votes
4 answers

How to draw histogram using EmguCV and C#

I need to draw two types of histogram, namely monodimensional and tridimensional. I'm a newbie to EMGU and all of the samples I found on the net are in C++ or C. Are there any samples using C# and Emgucv? Thanks for helping.
7
votes
2 answers

Emgu Capture plays video super fast

When I am playing back a video using Emgu, it plays back way faster than it should. Here is the relevant code. public Form1() { InitializeComponent(); _capture = new Capture("test.avi"); Application.Idle += RefreshFrames; } protected…
a432511
  • 1,907
  • 4
  • 26
  • 48
7
votes
3 answers

Fill the holes in emgu cv

How can I fill the holes in binary image in emgu cv? In Aforge.net it's easy, use Fillholes class.
Reza Liaghat
  • 313
  • 4
  • 7
  • 15
7
votes
1 answer

How to perform image lighting correction with OpenCV?

I have an image which I grab using a camera. Sometimes, the lighting is uneven in them image. There are some dark shades. This causes incorrect optimal thresholding in EMGU as well as Aforge to process the image for OCR. This is the image: This is…
Roshan
  • 149
  • 1
  • 9
7
votes
1 answer

Alternative to taking rapid screenshots of a window

I have a utility I'm testing with a few other people, that takes screenshots of another window and then uses OpenCV to find smaller images within that screenshot. That's working without a problem, however, I'm trying to make it more efficient, and…
MrDKOz
  • 207
  • 2
  • 11
7
votes
0 answers

What is the difference between Retrieve vs QueryFrame, EmguCV

Hi, I'm using EmguCV 3.1 for C# and I'd like to know where is the difference between Capture.Retrieve and Capture.QueryFrame? And why are there two methods to get the same image (since emgu is only a wrapper for opencv and in opencv VideoCapture has…
Ryugeist
  • 103
  • 9
7
votes
1 answer

Emgu (OpenCV for C#) - building a disparity map using cvStereoRectify

I've been using the great Emgu C# wrapper for OpenCV to collect images from a home built stereo rig. Two webcams bolted down to a piece of wood, 35cm apart to hopefully let me produce depth maps in the 10-20m range. I've set them up to be as…
timemirror
  • 586
  • 4
  • 11
7
votes
2 answers

Emgu CV - memory-leaks (memory consumption)

I am using EmguCV, the OpenCV wrapper for .NET. I am disposing all created objects but my app is still using more and more memory (in release configuration too). I have debugged my app using .NET Memory profiler and get this…
Martin Pilch
  • 3,245
  • 3
  • 38
  • 61
7
votes
1 answer

Finding contour points in emgucv

I am working with emguCV for finding contours essential points then saving this point in a file and user redraw this shape in future. so, my goal is this image: example my solution is this: 1. import image to picturebox 2. edge detection with canny…
tamson
  • 71
  • 1
  • 1
  • 2
7
votes
2 answers

Converting WriteableBitmap to Bitmap for use in EmguCV

In my code, I'm receiving WriteableBitmaps from a byte array (in turn from a Kinect) and I'd like to turn them into bitmaps for use with EmguCV. Currently this is the code I have: // Copy the pixel data from the image to a temporary…
Gaessaki
  • 836
  • 1
  • 8
  • 16
7
votes
1 answer

Fastest way to get number of white pixels in a binary image using OpenCV

What is the fastest way to get number of white pixels in a binary picture using OpenCV? Is there something faster than using two for loops and accessing the image pixel by pixel?
xx77aBs
  • 4,678
  • 9
  • 53
  • 77
7
votes
4 answers

Upper Body Skeleton Detection

For an educational project we are currently working on a basic motion and gesture detection system. Our main goal is to detect a human body on a camera stream. Using this information we want to detect a basic skeleton of the body to do a further…
Danielku15
  • 1,490
  • 1
  • 13
  • 29
7
votes
1 answer

Drawing match pairs in image-calculated by KNN and the potential bug in Features2DToolbox.DrawMatches

I wrote a code that it finds the K closest matches by KNN algorithm. After getting the matMatch and matchIndices I tried to draw the match pairs between two consequence frames. I feed matMask and matchIndices into function…
farzin parsa
  • 537
  • 2
  • 9
  • 33
7
votes
2 answers

Parts Recognition / Classification with OpenCV

I am just starting to explore OpenCV and the EmguCV .NET wrappers for it and need some general direction from folks who understand the big picture of its capabilities and perhaps those who have tackled a task similar to what I need to accomplish. I…
Matt Redmond
  • 726
  • 7
  • 12
7
votes
7 answers

Unable to load DLL 'opencv_core242': The specified module could not be found. Emgu CV

I'm trying to start using emgu CV open CV for C#. But I'm having trouble making it work. I'm following this guide to make simple program using emgu CV Link but I get following error: (any idea what I'm doing wrong?) …
Laci
  • 85
  • 1
  • 1
  • 5