emgucv

Double click timer event

醉酒当歌 提交于 2020-01-03 17:23:07
问题 I am developing an application that maps users eye movements with the cursor movements, hence developing ahands free cursor control system. I am using Open CV library's .NET Wrapper for C# i.e. Emgu CV for development. I am stuck at a point where I want to open a file/folder such that when a cursor is placed over a file/folder for say 3 to 5 seconds, the file/folder should open up or just perform a double-click event of a conventional mouse. What could I use so as to solve this problem? 回答1:

Visual Studio C# VideoCapture

萝らか妹 提交于 2020-01-02 21:56:07
问题 A while ago I wrote some cool vision stuff in c++. Later I found out my code needs to be added into an existing executable that is written in c#. Therefor, I want to write the same vision algorithmes in c# in such a way that my code can be run as an executable. I have downloaded Emgu 3.3 and I use OpenCV 3.4 and Visual Studio 2017. C# is new for me. I did the tutorial where you make your form, give it some buttons and assign functions to the buttons. That all worked fine. Then I started to

An advice about parameters in opencv_traincascade

五迷三道 提交于 2020-01-01 19:18:09
问题 I am doing a project that consists in recognize a banana using haar features. I am using EMgucv and visual studio 2010 for that. I am using opencv_createsamples and opencv_traincascade.I have a question about parmeters. What happen if I increase those values? I set: -numPos 3800 -nunNeg 6000 -numStages 16 -minHitRate 0.999 -maxfalseAlarmRate 0.3 but I want to know What are maxWeakCount and maxdetph parameters? What means? I want and example to understand that 来源: https://stackoverflow.com

Emgu Capture plays video super fast

天涯浪子 提交于 2020-01-01 05:22:07
问题 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 void RefreshFrames(object sender, EventArgs e) { imageBox.Image = _capture.QueryFrame(); } I tried to set the FPS using the SetCaptureProperty method on the Capture object, but it still plays in super fast motion. 回答1: The Application.Idle handle is called when

It is possible to get an IntPtr from an int[] array?

前提是你 提交于 2019-12-30 17:35:27
问题 Greetings. In C#: If I have an int[] array declared like this int[] array = new array[size]; there is an way to get the IntPtr from this array? The thing is that I'm using the EmguCV framework, and there is an constructor to create an image which takes an IntPtr to the pixel data, in order to build an image from an array (int[]). Image<Gray,Int32> result = new Image<Gray,int>(bitmap.Width,bitmap.Height,stride,"**array.toPointer??**"); By the way if someone could told me how to calculate the

Navigate through hierarchy of contours found by FindContours method?

僤鯓⒐⒋嵵緔 提交于 2019-12-30 06:42:47
问题 This must be simple for C++ developers using OpenCV directly. However what I'm using is Emgu (an OpenCV wrapper for .NET) and in the latest version we have the method CvInvoke.FindContours returning void, the output result is passed by parameter reference and is of type VectorOfVectorOfPoint . Here is a simple call: //outputResult is a VectorOfVectorOfPoint CvInvoke.FindContours(inputImage, outputResult, null, RetrType.Tree, ChainApproxMethod.ChainApproxSimple); For RetrType.List mode, we can

Convert from yuv 420 to image<Bgr,byte>

帅比萌擦擦* 提交于 2019-12-30 04:59:10
问题 I have byte array with yuv420 data. byte[] yuv420;//yuv data How can I convert this to an Image<Bgr, byte> ? I found a math formula to convert to RGB and then to Image<Bgr, byte> but it is very slow. Is there a way to convert it faster? There is a class in Emgu for converting COLOR_CONVERSION(enum CV_YUV2RGB Convert YUV color to RGB) but I can not understand how use this class. Can anyone help? static Bitmap ConvertYUV2RGB(byte[] yuvFrame, byte[] rgbFrame, int width, int height) { int uIndex

OpenCV (Emgu.CV) — compositing images with alpha

早过忘川 提交于 2019-12-30 03:20:07
问题 I'm using Emgu.CV to perform some basic image manipulation and composition. My images are loaded as Image<Bgra,Byte> . Question #1: When I use the Image<,>.Add() method, the images are always blended together, regardless of the alpha value. Instead I'd like them to be composited one atop the other, and use the included alpha channel to determine how the images should be blended. So if I call image1.Add(image2) any fully opaque pixels in image2 would completely cover the pixels from image1,

Access Violation Exception mystery

落花浮王杯 提交于 2019-12-30 02:37:12
问题 I've been working with EMGU+OpenCV for quite some time and ran into this AccessViolationException mystery. First thing first, the code: class AVE_Simulation { public static int Width = 7500; public static int Height = 7500; public static Emgu.CV.Image<Rgb, float>[] Images; static void Main(string[] args) { int N = 50; int Threads = 5; Images = new Emgu.CV.Image<Rgb, float>[N]; Console.WriteLine("Start"); ParallelOptions po = new ParallelOptions(); po.MaxDegreeOfParallelism = Threads; System

OpenCV (EMGUCV wrapper) integration in Unity

匆匆过客 提交于 2019-12-28 10:06:38
问题 As you know OpenCV is very useful library that let you do amazing and powerful things in Computer vision. So I passed a good time to figure out how to use it in Unity3d, I had many problems, and searching in the Net, I have found several suggestions but not one worked for me. I’m using a Unity Pro 4.0 This version of Emgu CV (emgucv-windows-universal-gpu 2.4.9.1847) My target for unity project is: windows and not web player 回答1: This is what I did for everyone who want to use it: Install this