emgucv

EmguCV Exception when published on IIS

早过忘川 提交于 2019-11-30 05:49:25
问题 My ASP.NET App works fine if I debug or run it on my local IIS. But if I publish it onto an IIS, it looks like EmguCV looses the dlls it needs. The bin folder of my VS project an the bin folder on the IIS are identical. The following exception occurs: The type initializer for 'Emgu.CV.CvInvoke' threw an exception. StackTrace: at Emgu.CV.CvInvoke.cvCreateImageHeader(Size size, IPL_DEPTH depth, Int32 channels) at Emgu.CV.Image 2.AllocateData(Int32 rows, Int32 cols, Int32 numberOfChannels) at

How to draw histogram using EmguCV and C#

£可爱£侵袭症+ 提交于 2019-11-30 05:20:38
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. The following code will segment the RED GREEN and BLUE Histogram data and put them in an array of floats for whatever use you want. float[] BlueHist; float[] GreenHist; float[] RedHist; Image<Bgr, Byte> img = new Image<Bgr, byte>("ImageFileName"); DenseHistogram Histo = new DenseHistogram(255, new RangeF(0, 255)); Image<Gray, Byte> img2Blue = img[0]; Image<Gray, Byte>

emgu finding image a in image b [duplicate]

删除回忆录丶 提交于 2019-11-30 05:09:16
This question already has an answer here: opencv finding image cordinates on another image 3 answers 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 work? Anyway, this is what i would like to do: Find image A in image B. Image A is a simple square which always has the same grey 1 pixel border and always the same size (i believe) but the inner colour could be black or one of about 7 other colours

Detecting truck wheels

假如想象 提交于 2019-11-29 21:28:38
I am currently working on a project which we have a set of photos of trucks going by a camera. I need to detect what type of truck it is (how many wheels it has). So I am using EMGU to try to detect this. Problem I have is I cannot seem to be able to detect the wheels using EMGU's HoughCircle detection, it doesn't detect all the wheels and will also detect random circles in the foliage. So I don't know what I should try next, I tried implementing SURF algo to match wheels between them but this does not seem to work either since they aren't exactly the same, is there a way I could implement a

EmguCV - Face Recognition - 'Object reference not set' exception when using training set from Microsoft Access Database

给你一囗甜甜゛ 提交于 2019-11-29 12:21:01
I've been developing a face recognition application using EmguCV (C#). I got the whole thing working okay if I store the face images (training set) in simple windows folder. But, after I tried to migrate the face images to be stored in a Microsoft Access database, an 'object reference not set to an instance of an object' exception message often occurs (not always, but most of the time) when the application tries to recognize a face from the video feed. Funny thing is, the recognition actually still works okay if the exception happens to not occur. Here is the snippet of the code of my program,

Using EigenObjectRecognizer

一世执手 提交于 2019-11-29 10:42:47
I am trying to do some facial recognition using EmguCV. I was wondering if I can use EigenObjectRecognizer for this task? Can someone can explain me how to use it? Because if there is a no no-match photo, it also returns a value. Here is an example: Image<Gray, Byte>[] trainingImages = new Image<Gray,Byte>[5]; trainingImages[0] = new Image<Gray, byte>("brad.jpg"); trainingImages[1] = new Image<Gray, byte>("david.jpg"); trainingImages[2] = new Image<Gray, byte>("foof.jpg"); trainingImages[3] = new Image<Gray, byte>("irfan.jpg"); trainingImages[4] = new Image<Gray, byte>("joel.jpg"); String[]

Emgu CV 3 findContours and hierarchy parameter of type Vec4i equivalent?

早过忘川 提交于 2019-11-29 02:36:47
I'm attempting to translate the following OpenCV C++ code into Emgu CV 3: std::vector<std::vector<cv::Point> > contours; std::vector<cv::Vec4i> v4iHierarchy; cv::findContours(imgThreshCopy, contours, v4iHierarchy, cv::RETR_TREE, cv::CHAIN_APPROX_SIMPLE); I can find some Emgu CV 3 examples that use null for the 3rd parameter to findContours, for example doing it that way here would be a Visual Basic translation: Dim contours As New VectorOfVectorOfPoint() CvInvoke.FindContours(imgThreshCopy, contours, Nothing, RetrType.Tree, ChainApproxMethod.ChainApproxSimple) Which works if the hierarchy

Emgu CV get all frames from video file

こ雲淡風輕ζ 提交于 2019-11-28 23:56:47
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 for example to Image<Bgr, Byte>[] ) I need all the frames to do some more processing (to be more specific: key frame extraction for video summarization). Thanks a lot for your help. Chris See my answer here for reference Emgu Capture plays video super fast But this should do as you ask I've used a list to store the images you can use an array but you

Using Kinect with Emgu CV

こ雲淡風輕ζ 提交于 2019-11-28 22:08:07
With EmguCV, to capture an image from a web-cam we use : Capture cap = new Capture(0); Image < Bgr, byte > nextFrame = cap.QueryFrame(); ... ... But I don't know how to capture images from my Kinect, I have tried kinectCapture class but it didn't work with me. Thanks acandaldev Basically , you need to capture and Image from the ColorStream and convert to a EmguCV Image class : Conversion to EmguCV Image from Windows BitMap (Kinect ColorStream): You have a Windows Bitmap variable, where holds Kinect Frame. Bitmap bmap = new Bitmap(weightFrame,HeightFrame,System.Drawing.Imaging.PixelFormat

Detecting truck wheels

烂漫一生 提交于 2019-11-28 19:00:10
问题 I am currently working on a project which we have a set of photos of trucks going by a camera. I need to detect what type of truck it is (how many wheels it has). So I am using EMGU to try to detect this. Problem I have is I cannot seem to be able to detect the wheels using EMGU's HoughCircle detection, it doesn't detect all the wheels and will also detect random circles in the foliage. So I don't know what I should try next, I tried implementing SURF algo to match wheels between them but