Click here to Skip to main content
15,890,579 members
Everything / EMGUCV

EMGUCV

Emgu-CV

Great Reads

by Adam David Hill
All the juicy tricks and scandalous shortcuts which helped us ship our competition game on time
by Adam David Hill
Sensor-controlled XNA tunnel game with VR head-tracking.
by Richard J. Algarve
Emgu CV - Select ROI (Region of interest) with the mouse in images that do not have the same measurements. This tip was prepared using the framework Emgu CV and C # .NET language.
by morzel
Detecting a drone - OpenCV in .NET for beginners (Emgu CV 3.2, Visual Studio 2017)

Latest Articles

by morzel
Detecting a Drone - OpenCV in .NET for Beginners (Emgu CV 3.2, Visual Studio 2017). Part 1
by morzel
Detecting a drone - OpenCV in .NET for beginners (Emgu CV 3.2, Visual Studio 2017)
by Emiliano Musso
Develop a simple application to search into a list of images for the one containing a smaller portion of the original one, graphically showing the points of intersection between the two
by saad_lah
Complete guide for beginner to setup EmguCV project and run first program in Visual Studio

All Articles

Sort by Score

EMGUCV 

7 Jan 2013 by Adam David Hill
All the juicy tricks and scandalous shortcuts which helped us ship our competition game on time
3 Dec 2012 by Adam David Hill
Sensor-controlled XNA tunnel game with VR head-tracking.
30 Nov 2010 by C_Johnson
Hi Ahmed,I was going to try and give you are concise answer but I'm limited for time so I apologise. I've been using EMGU for several years now and I've looked into Haar Classifiers extensively. I intend to write an article at some point. There is a lot out there on Haar classifiers but a...
3 Jan 2015 by Richard J. Algarve
Emgu CV - Select ROI (Region of interest) with the mouse in images that do not have the same measurements. This tip was prepared using the framework Emgu CV and C # .NET language.
30 Aug 2017 by morzel
Detecting a drone - OpenCV in .NET for beginners (Emgu CV 3.2, Visual Studio 2017)
29 Sep 2011 by Arpita1086
I have extracted faces from the running video using emgu cv.Now I want to extract eyes and mouth from those detected faces and then do feature extraction from detected feature points of eyes and mouth.can anyone help me for this feature extraction phase? How to detect eyes in emgu cv in C#?
20 Nov 2010 by Not Active
Since this is open source why don't you 1) Ask someone in that community2) Download the code and debug it yourself
20 Nov 2010 by Not Active
This is an open source project. You will do better to post your question in that community.
8 Sep 2011 by C_Johnson
Hi,While this reply is late I thought best to include the answer in case any other fall across this question.Lets assume you have read your image in as a colour image:Image My_Image = new Image("filename_string");To access each individual pixel of My_Image you...
19 Sep 2011 by C_Johnson
Hi, This is a very common problem it is down to the correct dll's not being present in the output folder. EMGU is a wrapper for opencv which means you need the EMGU dll for the c# code (that has been written to deal with the images) and the dll from opencv. Now as Opencv is in fact c++ they...
19 Dec 2011 by Viktor Signaievskyi
The fastest way in C# to deal with pixels it to use pointer to bitmap:The code snippet is:public int DoSomeStuffWithPixels(ref Bitmap b){ BitmapData bmData = b.LockBits(new Rectangle(0, 0, b.Width, b.Height), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb); System.IntPtr...
11 Nov 2013 by SoMad
You don't mention the parameters you need to record at, specifically image resolution and frame rate. The higher you go on those settings, the more you will be taxing that poor Atom processor if you insist on doing the compression on the PC.I have worked on a product for many years where video...
18 Sep 2014 by George Jonsson
Why not start here EmguCV: Code Gallery[^]or here Support and Services[^]And to be realistic. How many users here do you think have EmguCV installed on their computers and are willing to debug your code?And if you want the code this badly you either have to write it yourself or pay...
9 Sep 2015 by Suvabrata Roy
Hi,Problem 1 :I don't know how to load images from the foldersFolderBrowserDialog fbd = new FolderBrowserDialog(); DialogResult result = fbd.ShowDialog(); string[] files = { }; if (result == System.Windows.Forms.DialogResult.OK) ...
28 May 2020 by phil.o
You only insert white because of this line:image[h, w] = new Bgr(255,255,255); If you want to add black or white, then you have to get an intermediate random number: //random pixel to set black or white color int w = random.Next() % image.Width;...
18 Aug 2020 by Sandeep Mewara
Reference: EigenObjectRecognizer Constructor (images, labels, eigenDistanceThreshold, termCrit)[^] Quote: eigenDistanceThreshold (Double) The eigen distance threshold, (0, ~1000]. The smaller the number, the more likely an examined image...
20 Nov 2010 by Abhinav S
If you have copied code from an article, post this question there, as the author of that article might be able to help you.The information provided here is not enough to give an exact answer as to why this could be happening.
23 Nov 2010 by C_Johnson
Hi,I'm afraid Abhinav is correct in the lack of information. A majority of errors are usually caused by the avi files themselves. I have come across this error before however usually it occurs at the end of avi files were someone is attempting to read past the end of the video. Naturally...
24 Nov 2010 by Arpita1086
Thanks for your solutionIt was really helpfull.I would like to ask one more question, in the detect haar cascade function the second and third argument that is:double scaleFactor, int minNeighbors. Iam not actually getting what does they signify and what are their possible values.How to...
29 Sep 2011 by Arpita1086
I am doing face detection using haar detector from emgu cv open library.Using the language C#.public Form1(){ InitializeComponent(); try { haar = new HaarCascade("C:\\Program...
3 Jan 2011 by Estys
Empty catch blocks are always wrong.Catch the error as it happens, otherwise you'll never know the real problem.Cheers
6 Jul 2011 by Sergey Alexandrovich Kryukov
I happened to give some answers based on my joystick experience recently. It is not very trivial matter.Please look at them:How to Interface Joystick to WAF[^],How to Interface Joystick[^],Creating A Joystick Event?[^].Not everything is exactly relevant to your problem but very...
19 Sep 2011 by #realJSOP
EMGU [^]On that page, you'll find a link to the api documentation AND a tutorial.
24 Mar 2012 by Wes Aday
Try changing the compile mode to x86
24 Mar 2012 by Wendy2012
I try rebuilt it using opencv 2.3.1 library and it works!Under Solution, choose Add Reference, then Add Existing Items of opencv_core231.dll and opencv_imgproc231.dll into project.Thanks everyone.
28 Apr 2012 by jfriedman
I would use two ResetEvent's it seems the semaphore is what is causing you problems. The switching is causing the deadlock and there is nothing you can do unless you add some signals to the logic.An easier approach than using signals to fix this is to utilize two ResetEvents to provide the...
23 May 2012 by Sandeep Mewara
Have a look at this article:Image Comparison using C#[^] - only difference is image location of second one which is irrelevant. Retrieve the Db image and then compare with selected image.
15 Sep 2012 by Mehdi Gholam
It's very hard to help you with the information you provided.Having said that, debug your app and look at the inner exception, it is possible that some assemblies can not be found or you have licensing problems.
17 Sep 2012 by Sergey Alexandrovich Kryukov
Look at the documentation of EMGU you have: it should tell you the target version of .NET it's using. Find out what .NET version do you need and install it. Do you use Visual Studio? What version? If you have VS 2005, you can develop only the applications targeted to .NET v.2.0, VS 2008 covers...
1 Nov 2012 by Keith Barrow
Hi, first off the image dilate and erode methods use a 3x3 grid of pixels this will effect your results, but I assume this is deliberate.I'd start off using a 3x3 white image to start with, and comment the erode, dilate, threshold and re-size operations. That way you have baseline to check the...
3 Sep 2013 by Jean A Brandelero
What you need is called OCR.There are many paid library for this, but i think this is free and may help:A C# Project in Optical Character Recognition (OCR) Using Chain Code[^]
4 Sep 2013 by V.Lorz
EMGUCV wraps most functions from the OpenCV library API so most OpenCV examples (in C/C++) are also valid for EmguCV. There're lots of samples also for the Android port (in Java/C++). With so many samples out there (e.g. this one...
15 Sep 2013 by V.Lorz
Hi,(posted as solution as it is too long for one comment)From your question tags I suppose you're using C#. I've tried this code (after the comment) and it works for me. It will have bugs and the values should surely require trimming. It uses the wrapping classes and avoids using the...
29 Nov 2013 by BillWoodruff
Before seeing your post, I'd never heard of the Emgu CV library for .NET. In less than one minute browsing their web-site I found a code example of shape detection, including the ability to recognize a triangle [^].So: why can't you use the Emgu facility to achieve your goal ?
29 Jan 2014 by loraloper_22
HiI am doing some basic face and eyes detection using haar clasifiers how ever i am stuck as the final image does not have rectangles drawn on it. When i debug my code it does not go into foreach statement.I am not really sure where i am missing the trick. grayImage =...
29 Jan 2014 by Pete O'Hanlon
If you put a breakpoint on the initial foreach, are there any values in Storefaces or StoreEyes at all? Note that when I use DetectHaarCascade, I normally just pass in the HaarCascade - I don't use the other parameters. Have you tried just using:var StoreFaces =...
18 Sep 2014 by Sergey Alexandrovich Kryukov
The short answer is: use ADO.NET:http://en.wikipedia.org/wiki/ADO.NET[^],http://msdn2.microsoft.com/en-us/library/aa286484.aspx[^].This excellent short CodeProject article can help you to get started in no time: Using ADO.NET for beginners[^].—SA
22 Sep 2014 by Shemeemsha (ഷെമീംഷ)
Try this codeif (!System.IO.File.Exists(savePath)) { pic.SaveAs(savePath); }Set your image folder path in 'savePath' variable'pic' contain the picture data
20 Nov 2014 by mikanu
Essentially, your problem is right here: pictureBox1.Image = b; pictureBox2.Image = b1; this.Refresh();These are UI interactions and the WinFroms model dictates that all UI operations must execute on the UI thread.Fortunately, fixing the code is relatively easy. You...
20 Nov 2014 by Sergey Alexandrovich Kryukov
In addition to Solution 1:Most likely, you need to use Invoke, not BeginInvoke. Some background:You cannot call anything related to UI from non-UI thread. Instead, you need to use the method Invoke or BeginInvoke of System.Windows.Threading.Dispatcher (for both Forms or WPF) or...
28 Nov 2014 by mikanu
Aside from the Invoke and BeginInvoke topics covered in the previous answer, I'd like to add another possible method of implementing the updating of the captured images on the UI.The idea is to let the capture thread capture as fast as possible and let the UI thread updated the UI only when...
26 Jul 2015 by Artem Kulikov
Hello. You should notice, that in your code - you will get only one contour.For your purpose you should fistly get all contours, and after that order them. Check this code:var allContours = new List>(); for (var contours = image.FindContours(); contours !=...
5 Aug 2015 by Abhishrek
Hello EveryoneI studied a bit and found that taking the first order derivative of the contour (for x and for y separately) can solve this problem.The first order derivative is used to find Local Maxima and Minima. On the curve points the value of the first order derivative changes from...
9 Sep 2015 by Kopika
Is there anyway to change images in a imagebox of emgucv using folderbrowser dialog box. I also need to select images from subfolders I tried this:private void btSelectFolder_Click(object sender, EventArgs e){ FolderBrowserDialog ofd = new FolderBrowserDialog(); if...
5 Oct 2015 by E.F. Nijboer
A little google will help out. StructuringElementEx doesn't exist anymore in the new version.In the new version, use something like this:Mat rect_6 = CvInvoke.GetStructuringElement(Emgu.CV.CvEnum.ElementShape.Rectangle, new Size(6, 6), new Point(3, 3));Check this link for more...
14 Nov 2015 by Krunal Rohit
Didn't you read "For those who code" ?This is not "For those who ORDER code".-KR
31 Jul 2016 by OriginalGriff
Look at the documentation: CameraCalibration.CalibrateCamera Method[^] - it takes 7 parameters, not six.You appear to be missing the termination criteria.
3 Jan 2018 by Dave Kreskowiak
You're not showing the code for this Index class. It's constructor appears to take, as it's second parameter, some object that implements the IIndexParams interface and you're trying to pass in an integer. That won't work. I can't tell you how to fix this because you haven't supplied enough...
14 Jun 2018 by OriginalGriff
So go back to the article and ask there. Don't post this under Quick Answers - if you got the code from an article, then there is a "Add a Comment or Question" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to...
5 Dec 2018 by Richard MacCutchan
Go to the emgu website and ask them.
14 Jan 2019 by Afzaal Ahmad Zeeshan
A face is detected as a rectangular area bounding the face. What you need is an edge detection algorithm, that detects the bounding areas from the edges and then you clear the internal pixels and get a mask. You can mix the face detection and edge detection algorithm to first find a bounding...
18 Apr 2020 by RickZeeland
See: Accord.NET Machine Learning Framework[^] Also see CodeProject article: Build Simple AI .NET Library - Part 1 - Basics First[^] There is more interesting information on CodeProject (not for Winforms): https://www.codeproject.com/KB/AI/[^]
28 Apr 2020 by MadMyche
You could always try the documentation at OpenCV, which has the parameters all listed for you. OpenCV: cv::face::LBPHFaceRecognizer Class Reference[^]
29 Dec 2020 by Richard MacCutchan
emgu cv record video - Google Search[^]
17 Jul 2023 by Pete O'Hanlon
OpenCV builds as either 64bit or 32bit. If you are trying to run your application on a 32bit processor, you will need to add the 32bit DLLs. This[^] details how to build the 32bit version.
29 Sep 2011 by xabixabi123
How can I do an image enhancement on these images?I am doing coding in C#, EmguCV(OpenCV wrapper)Potential Problem 1.Image is partially shaded 2.Image contains reflected image on the image 3.Image too dark or too bright The pic can be found in here How I can remove each of...
5 Jul 2010 by E.F. Nijboer
Analyze the image and define a threshold. Then the values above are made black and the other pixels white (working in b/w is much more easy). You can also define filters for removing shades, little spots and other stuff unusable as good as possible. Multiple filters maybe possible. Look the...
30 Dec 2010 by mkfrns
I want to detect eyes,mouth and nose.Is it possible in emgu CV??
3 Jan 2011 by OriginalGriff
This is an educated guess (given I have not met the EMGUCV library), but from what you say :"I have used breakpoints to detect errors, it is going to the Haar line but it not entering in capture line capture= new capture(0)."It would seem that creating a new HaarCascade does not return...
29 Sep 2011 by chuot chui
I am a newbie.I have project which need use opencvdotnet or emgucv. When i tried to debug a simple tutorial i have a problem. that is my codeusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using...
29 Sep 2011 by bijosebastian
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.Drawing;using System.Text;using System.Windows.Forms;using Emgu.CV;using Emgu.CV.Structure;using Emgu.Util;namespace CameraCapture{ ...
28 Apr 2011 by Debojyoti Majumder
When you are deploying the executable also compile the executable by linkingx64 bit library.So make sure for ASP.Net you linked with x64 bit library or not.
17 May 2011 by snehaliteng
i have solve the issue by donwloadin emgu 64 bit version and i need to insttal visual c++ runtime 64 bit
29 Sep 2011 by scocioba
Whats the best way to make a crosshair that is bounded by the size of the image box it is on top of? Its will be moved using a joystick. Its for the HUD of an ROV im working on. The crosshair needs to be able to return an x and y coordinate and its location to be determined by the joystick x and...
29 Sep 2011 by Member 7955849
Hi guys.. I want to ask something urgently..Let's says that I have a byte array from image. I am using EmguCV as my library to capture picture from my webcam. And I have wrote the code like this to capture the image in a picturebox : public Capture CamInput = new Capture(); ...
22 Aug 2011 by dontumindit
There might be some problem with type castingImage.FromStream return type is Image. try using that.Bitmap is always an Image, but not every Image is a Bitmapor u may use it in this wayFor Convert you may use it: static public Bitmap BitmapFromBitmapData(byte[]...
22 Aug 2011 by OriginalGriff
I've not used EmguCV before, but if you have to convert it to a bitmap before you can display it, that implies that the format is not one of the normally supported ones. Have you considered using your ToBitMap method instead of going via the stream? I would suspect that it is the...
22 Aug 2011 by dontumindit
MSDN saysYou must keep the stream open for the lifetime of the Bitmap.Due to a limitation of the GDI+ decoder, an System.ArgumentException is thrown if you construct a bitmap from a .png image file with a single dimension greater than 65,535 pixels.See it Here[^]
29 Sep 2011 by ready to learn
Hello, I'm new to image processing. I want to use EMGUcv but I don't know how to use it in c#. Are there any e-book,articles,... which can guide me?Thanks in advance
29 Sep 2011 by ready to learn
Hello,I'm trying to use emgucv in C#.when using the following code,I got the exception "The type initializer for 'Emgu.CV.CvInvoke' threw an exception."please help me.as I'm new in this field,If any one gives me some more information,I would be so thankful.using Emgu.CV.Structure;using...
29 Sep 2011 by DArren89
I am using EmguCV 2.3.0 and am querying frames at random intervals from a Capture to be saved to hard drive. The problem is when I call the Capture.QueryFrame() or Capture.QuerySmallFrame() it is delayed by a frame. To make this more clear: I start the program and query a frame pointed at my...
20 Sep 2011 by C_Johnson
Hi(I'm the same person who gave you this answer on Stackoverflow in case you think I'm copying :), this is just in case others stumble across this question)Well the problem you have is that your not disposing of your old capture so when you send of for another it will always return the...
29 Sep 2011 by C_Johnson
Hilease see my tutorial on setting up an EMGU it should help diagnose your problem, te error could be caused by any number of things so a little more description would be helpfulCreating Your First EMGU Image Processing Project[^]There is also the EMGU installation page...
29 Sep 2011 by devildx2050
http://www.aspdotnet-suresh.com/2011/01/how-to-insert-images-into-database-and.html[^]
2 Oct 2011 by J imran
I have a black and white picture on which I want to remove white areas that are more than 50 pixels.I found bwareaopen in MATLAB for this purpose. I am using EMGU and want equivalent in EMGU.Thank you for helping.
30 Nov 2011 by C_Johnson
Hi,Well in short NO there is not a built in function that performs the same operation as bwareaopen. You will simply have to loop through your image and look for a white pixel.When you find 1 make a blank copy or a list of points that records all pixels attached to the original that...
24 Feb 2012 by mary ann amora
Hi!I am a newbie in image processing. I have done some face and skin detection due to sample codes provided here. Now, I want to create a head detection, how do I do that? I have searched here but I can't find anything. I have read somewhere that in face detection starts with head detection....
24 Feb 2012 by Manfred Rudolf Bihy
You really meant to say face detection in your title I guess so I have good new for you. See this nice article here: Multiple face detection and recognition in real time[^].Hope that is what you are looking for.Regards,Manfred
28 Apr 2012 by Member 8299125
HelloI have wrote a C# code which calls EmguCV methods to extract feature points of images.As i want to increase speed of program, i made it multithreaded.I used a variable named NUMBER_OF_CONCURRENT_THREADS to keep number of concurrent threads which can be done simultaneously. for...
28 Apr 2012 by jfriedman
I had nothing to do so I wrote a quick example to help you utilize the AsyncResult pattern as well as locking.using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Collections;namespace...
28 Apr 2012 by jfriedman
The problem I can immediately see is that you are allowing multiple threads to invoke the same library. While I am not familiar with the library in question I would say that when you release the semaphore the unman-aged code is still executing in other threads. If the library is utilizing shared...
21 May 2012 by Wendy2012
Hi all, I have a captureButton_Click function whereby it will start capture image using webcam and stop when user click on stop button. Where should I add the modification function in or after the captureButton_Click function? Which method is more easier, array or 3*3 matrix? I just want to do...
23 May 2012 by Onigrey
Hello, I am new in C# and I need to write a program that will compare one imege with others from DB and return the most similar with percents of similarity, I found emgucv libraries and this:...
23 May 2012 by AhsanS
If you don't even know where to paste the code then it means you should first learn programming before starting it. We are here to help solve problems and not to teach.
10 Jun 2012 by Tim Corey
This site has a bunch of really good tutorials on how to use emgu cv with different cameras, including multiple cameras at once:http://fewtutorials.bravesites.com/tutorials[^]
4 Jul 2012 by mateusz.matyaszek
I get error:E/mono (14146): WARNING: The runtime version supported by this application is unavailable.E/mono (14146): Using default runtime: v2.0.50727I/monodroid-gc(14146): environment supports jni NewWeakGlobalRefW/monodroid-gc(14146): GREF GC Threshold:...
28 Aug 2012 by Member 9357064
hi, i am working on project. I am using webcam to detect faces in c#, using emgucv.Every thing is working fine,like when i run application it starts webcam then it starts detecting faces..But now i want to do is, that when it detects faces , it should blur the face only,not the whole webcam...
29 Aug 2012 by BillW33
If you are using EMGU, as it says in your tag, you can call cvSmooth. I have discussed the parameters below and shown an example of the call.Image inputImage;//Set inputImage to whatever image you want to smoothImage smoothedImage = new Image
7 Sep 2012 by Mich_90
Sombody who had deal with CvMatchShapes function, why CvMatchShapes function returns zero after matching to different shapes (contours or gray scale images)?
12 Sep 2012 by __TR__
Take a look at this article. You might find it helpfulHaar-feature Object Detection in C#[^]
13 Sep 2012 by Legor
Well i would guess that the returned value refers to the grade of match between the shapes. So if it returns zero the shapes do not match at all. This would be the expected behaviour if you provide the function two different shapes as you said.
25 Sep 2012 by Mich_90
In my project Im using EMGU librery.I need to determine the background color of the urban poster or broadsheet.As I see the background color of the poster or broadsheet is the predominant color.My question if Emgu has any function that returns(in certain existing models BGR,HSL...)...
13 Oct 2012 by prince0fpersian
hi , at first i'm sorry for my bad englishI want to find the corners of the football fieldAnd then I can use it to locate the robot in the fieldI used the HoughLines() functions , but have not answeredPlease, if you have a sample code about, put it to meThis is the code I...
26 Oct 2012 by bubifengyun
I meet the same question. I find that the program from here runs very well, but when I write the same program and download opencv_XXXX242.dll files from the latest version, it can not work. Then I delete the latest one, and add the program's file,opencv_XXXX231.dll. It run very well.
1 Nov 2012 by zaenal arifin
Hai guys..I'm a beginner in C# language..I have a project to classification fruits based on size..This is my step :1. Capture image from webcam.2. Convert image to gray scale.3. Convert image to binary image.4. Counting white pixel to getting the object size.But now, i get...
16 Jan 2013 by Member 3919500
Hello everyone i am final year student and i have a final project.i need to build authentication system for system login and use,system use two way attestation by face recognition and finger print, where a record store the finger print of a user and his face , later any attempt to login...
16 Jan 2013 by KManishS
store your image to a variable like belowmArrImgData = new byte[16800];//[14400]; grayFrame.Copy(FaceRect).Resize(120, 140, INTER.CV_INTER_LINEAR).Bytes.CopyTo(mArrImgData, 0);and then insert to database directly:msQueryString = "INSERT INTO...
25 Jan 2013 by deo cabral
im getting this error randomly when i tried to start capturing of image from my webcam...im currently try to make a simple face detection app which has a training for the faces and then saves the images to an XML file...here is the stack trace of the error at...
20 Feb 2013 by AJRay
Hi all!..I am using EmguCV's SURF detection in a web application in C#/.Net. The code is compiling well, but at runtime its throwing an exception "opencv_core249.dll" could not be found or accessed although it is present in the system. Also when i tried referencing "opencv_core249.dll" its...
1 Mar 2013 by dukenukem18
This is what i want to do :http://www.youtube.com/watch?v=0IVjxO63Fec[^]so far, i managed to do the "optical flow" part. I calculated coordinates of the feature points on the current captured video frame given their coordinates on the previous frame by using OpenCV methods :...