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

Conversion to grayscale using emguCV in C#

I am new to EmguCV. I want to convert an rgb image into gray scale. For the conversion I have used the code Image grayImage = ColordImage.Convert(); Now when i compile this code in C# it gives no error,but when i run it then…
Amal
  • 1,395
  • 3
  • 9
  • 9
11
votes
1 answer

Is it possible to find the edge of a "spotty" region in emgucv?

I have an image that looks like this: and I want to find the edges of the dark part so like this (the red lines are what I am looking for): I have tried a few approaches and none have worked so I am hoping there is an emgu guru out there willing…
kmp
  • 10,535
  • 11
  • 75
  • 125
10
votes
1 answer

Correct way to extract Translation from Essential Matrix through SVD

I calibrated my camera and found the intrinsic parameters(K). Also I have calculated the Fundamental Matrix (F). Now E= K_T* F * K . So far so good. Now we pass the Essential Matrix(E) to the SVD to use the decomposition values (U,W,V) to extract…
farzin parsa
  • 537
  • 2
  • 9
  • 33
9
votes
1 answer

EMGU CV SURF image match

I have been working with the SURF feature detection example from the EMGU CV library. So far it's working amazingly; I can detect matching objects between 2 given images but I have run into a problem in regards to when the images do not match. I…
user1246856
  • 97
  • 1
  • 1
  • 5
9
votes
3 answers

Emgu.CV 4.2.0 image conversion methods not available

I have a .Net Standard 2.0 project with latest version of Emgu.CV - 4.2.0.3636 installed via Nuget package. I also have System.Drawing.Common package which brings support for bitmaps. I need a possibility to convert Mat into Bitmap and to create…
9
votes
1 answer

Matching image and determine best match using SURF

I have been trying to use the EMGU Example SURFFeature to determine if an image is in a collection of images. But I am having problems understanding how to determine if a match was found. .........Original image ..............................Scene_1…
Hagbart Celine
  • 470
  • 1
  • 9
  • 26
9
votes
2 answers

C#, Emgu webcam - choose capture size

I'm using the Emgu library for integrating the open CV webcam features in C#. I use this code for choosing the capture device and setting its size: camera = new Capture(0); camera.SetCaptureProperty(CAP_PROP.CV_CAP_PROP_FRAME_WIDTH,…
jimutt
  • 667
  • 2
  • 13
  • 29
8
votes
2 answers

Emgu CV get all frames from video file

I would like to ask you to help me with getting all the frames from video file using Emgu CV. I know I can use Capture class and its QueryFrame() method, but this only returns one frame. What is the easiest way to get all the frames? (and save it…
tom
  • 311
  • 3
  • 4
  • 13
8
votes
2 answers

Extract transform and rotation matrices from homography?

I have 2 consecutive images from a camera and I want to estimate the change in camera pose: I calculate the optical flow: Const MAXFEATURES As Integer = 100 imgA = New Image(Of [Structure].Bgr, Byte)("pic1.bmp") imgB = New Image(Of [Structure].Bgr,…
smirkingman
  • 6,167
  • 4
  • 34
  • 47
8
votes
1 answer

Advantage of using a CUDA Stream

I am trying to understand where a Stream might help me with processing multiple Regions of Interest on a video frame. If using NPP functions that support a stream, is this a case where one would launch as many streams as there are ROIs? Possibly…
AeroClassics
  • 1,074
  • 9
  • 19
8
votes
1 answer

Emgu CV does not detect CUDA

I have GeForce GTX 960 with installed 353.90 NVidia driver and 7.5.18 CUDA driver. I'm using the latest version of Emgu CV, but it doesn't detect CUDA on the system (even in Emgu samples), Emgu.CV.Cuda.CudaInvoke.HasCuda is always false. At the same…
JustLogin
  • 1,822
  • 5
  • 28
  • 50
8
votes
6 answers

EmguCV cvextern System.DllNotFoundException

I am trying to run the example of LicensePlateRecognition in EmguCV 3.1. But I always get the error System.DllNotFoundException and the message is that "cvextern.dll cannot be loaded". I am running Windows 7 with Visual Studio 2013 (the computer is…
LLS
  • 2,128
  • 2
  • 23
  • 36
8
votes
3 answers

how to convert mat to image

I need to convert a Mat to an Image in Emgu CV. Trying to cast a Mat to an image produces an exception: Cannot implicitly convert type 'Emgu.CV.Mat' to 'Emgu.CV.Image Image imgeOrigenal; Capture capWebcam = null; imgeOrigenal =…
Ehsan Jeihani
  • 1,238
  • 2
  • 14
  • 23
8
votes
4 answers

OpenCV (Emgu.CV) -- compositing images with alpha

I'm using Emgu.CV to perform some basic image manipulation and composition. My images are loaded as Image. Question #1: When I use the Image<,>.Add() method, the images are always blended together, regardless of the alpha value. Instead…
roufamatic
  • 18,187
  • 7
  • 57
  • 86
7
votes
2 answers

Motion Tracking vs Blob Tracking

Hi all I have a simple question that I have been struggling with....what is the difference, if any, between motion component (blob?) tracking and blob tracking? As defined by OpenCV. Does one cover the other? or are they entirely different…
Mikos
  • 8,455
  • 10
  • 41
  • 72