emgucv

How to get the average intensity value of the red color area in C# using EMGU CV library?

你离开我真会死。 提交于 2019-12-11 23:16:21
问题 Here I used this: pictureBox1.Image = My_Image.ToBitmap(); byte Red_val = My_Image.Data[0, 0, 2]; MessageBox.Show(Red_val.ToString()); Does this give the average intensity of the red area? How do I get the average intensity value? 回答1: Your second line: byte Red_val = My_Image.Data[0, 0, 2]; Will give you the Red Value of the Pixel on the 0th Row and 0th Column. If you want the average Red of the whole picture you should iterate through the Rows and Columns of it and sum up the Channel Data.

Why does RetrieveBgrFrame() return null?

半腔热情 提交于 2019-12-11 20:25:12
问题 object reference not set to an instance of an object My problem is that I try to use CV on a videofile (to simulate a camera) and I can't handle the frames, because RetrieveBgrFrame() doesn't return an image. Instead it gives the above error. My code is: http://pastebin.com/DNEVwij8 Please tell me if you need additional details. 回答1: Your problem is that the field capture is null, because it is never initialized. The code should be as follows: public partial class Form1 : Form { private Image

Building EmguCV on OSX Snow Leopard

为君一笑 提交于 2019-12-11 16:26:30
问题 I would really appreciate your help with an installation error. I've been trying to figure this out for days and can't find the answer online. Also, I need to use the EMGUCV wrapper for my work, and cannot use OpenCVsharp or other .net wrappers for opencv. I am using OSX 10.6.8, I have installed mono/cmake and have followed the instructions in the wiki for the trunk version. I execute the following command, but the package fails to configure. I don't know how to interpret the output. Have

EMGUCV fastest set pixel

限于喜欢 提交于 2019-12-11 15:06:53
问题 I Need fastest way to iterate an EmguCV bitmap matrix and set pixel. i found this after google but it takes about 3 sec for 700x500 image: Documents says that access (get) data matrix is just o(1) but its not clearly declare about set data. for(int i = 0; i < img.Rows ; i++) for(int j = 0; j < img.Cols; j++){ img.Data[x,y,0] = 255; img.Data[x,y,1] = 255; img.Data[x,y,2] = 255; } Thanks in advance. 回答1: The getter for Emgu.CV.Image<> 's Data property returns a reference to the three-dimension

How to Declare Matrix array in Emgu CV?

一笑奈何 提交于 2019-12-11 13:53:49
问题 I am new in Emgu CV . I need a matrix array to store pixel values of gray images. Is it possible to declare a matrix array . I code like this for matrix array But is gives "Error" public Matrix<Double>[] Myimgmatrix = new Matrix<Double>[5](100,80); Error:"Method name expected" Any one Please Help. 回答1: Do it like that: private Matrix<Double>[] Myimgmatrix = new Matrix<Double>[5]; And then, on your class constructor, initialize every matrix on the array individually: for(int i = 0; i <

The type initializer for 'Emgu.CV.CvInvoke' threw an exception for Win8 64bit, VS2012

筅森魡賤 提交于 2019-12-11 13:14:37
问题 I am trying to use EmguCV to make a website in Visual Studio. Getting an error The type initializer for 'Emgu.CV.CvInvoke' threw an exception with the Inner Exception An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B). Following are the details of my setup: Windows 8 64-bit VS2012 Emgu library 2.3 for Windows x64 Most of the help I saw in forums was for a project, but in case it matters, this is a website. I have already copied all DLLs into '

Morphological Operations On Image

こ雲淡風輕ζ 提交于 2019-12-11 12:14:39
问题 I am currently doing a project in which I am trying to identify humans based on hands vascular pattern in C# using Emgu CV. The gray-scale image of the hand was first processed using the Adaptive Threshold function. Now I want to create a mask of the image using the morphological operations. The purpose is to remove the noise from the image. This is the adaptive-thresholded image: Kindly guide me which function should I use and how to use. 回答1: The code here is in C++. It shouldn't be

Predator TLK Algorithm in C#

前提是你 提交于 2019-12-11 10:55:59
问题 I've been looking for any updates regarding the robust Predator tracking algorithm that trains itself over time automatically for those who are unfamiliar you can check this I'm not sure if anyone was able to port it on C# since he originally developed it on matlab here's the latest thing I came up to TLD in OpenCV I'm looking for a C# port if anybody successfully made it possible Thanks in advance! 来源: https://stackoverflow.com/questions/29436719/predator-tlk-algorithm-in-c-sharp

Access to Hough Transform accumulator

大兔子大兔子 提交于 2019-12-11 10:34:07
问题 I'm trying to use the Hough Transform from EmguCV 3.0 to detect lines, but then, I'm only interested by some line "angles". Basically, I just want to see almost 90/270º and 0/180º lines (with a margin of a few degrees). And of course, I just want those who reach a certain treshold. I was thinking finding those lines using the accumulator and only looking at some angles values (85 to 95º for instance)... but no way to access to this accumulator :/ Is there some smart way to do it? Or should I

cvMatchShapes returns me result which is out of logic

谁都会走 提交于 2019-12-11 09:35:00
问题 I'm a newer in computer vision field. I found some code examples in EmguCV(.NET wrapper for OpenCV) which I`m trying to use. Currently I'm working on triangle traffic sign recognition and I'm using cvMatchShapes function. The function returns "zero" in ideal case, it means that the shapes are the same and the number is close to zero if shapes are similar. The problem is that in my case function returns me result which is out of logic. when function compares triangle with the circle, it