emgucv

Get Depth at Color position, Kinect SDK

强颜欢笑 提交于 2019-12-21 06:20:46
问题 I am looking for way to (as quick as possible) get the corresponding depth to a color pixel from the Kinect camera. I have found the MapDepthFrameToColorFrame function. But that only gives me the color at a certain depth position, I want the opposite. The reason I want this is that I will be able to click on a position at the RGB image and get the position to that pixel. Is there a way to do this faster than looping through all results from MapDepthFrameToColorFrame? 回答1: The problem here is

EmguCV Out of memory exception in x86 release mode only-Sharpening Images

孤人 提交于 2019-12-20 06:29:36
问题 Im trying to increase the sharpness of an image using EmguCV Image<Bgr, Byte> myImage = new Image<Bgr, Byte>(new Bitmap(pictureBox1.Image)); float[,] matrixKernel = new float[3, 3] { { 0,-1, 0 }, {-1, 5,-1 }, { 0,-1, 0 } }; ConvolutionKernelF matrix = new ConvolutionKernelF(matrixKernel); Image<Bgr, float> result = myImage.Convolution(matrix); Image<Bgr, Byte> BGRResult = result.ConvertScale<byte>(1, 0); e.Result = BGRResult.ToBitmap(); myImage.Dispose(); result.Dispose(); BGRResult.Dispose()

Emgu CV - Combining greyscale images into single Bgr image

时光毁灭记忆、已成空白 提交于 2019-12-20 04:11:19
问题 I'm trying to convert a greyscale image to a Hsv image, but with the S and V channels set to a preset value. The following code works but takes ~400ms to execute. public void ToHueImage(this Image<Gray, double> image, Image<Hsv, double> output) { for (int i = 0; i < image.Width; i++) { for (int j = 0; j < image.Height; j++) { output.Data[j, i, 0] = image.Data[j, i, 0]; output.Data[j, i, 1] = 255; output.Data[j, i, 2] = 255; } } } } I would like to be able to assign a single greyscale image

Fourier transform of an image in EmguCV

有些话、适合烂在心里 提交于 2019-12-20 03:51:05
问题 Can anyone tell me if there is an inbuilt function present in emgucv 2.3 for finding out fourier transform of images ? Thanks in advance 回答1: From my answer Fourier Transform + emgucv The function you are after is CvInvoke.cvDFT it is technically calling the opencv method but it should be what your after Here is the code that splits the Imaginary and Real parts from cvDFT: Image<Gray, float> image = new Image<Gray, float>(open.FileName); IntPtr complexImage = CvInvoke.cvCreateImage(image.Size

EmguCV - how to specify jpeg quality when saving image?

廉价感情. 提交于 2019-12-19 19:55:24
问题 I save jpeg image using the following C# EmguCV code: Emgu.CV.Image<Gray, byte> image ... image.Save("imageName.jpg"); But image is stored in extremally low quality (1 color square per 8x8 pixels). When I save bmp all are ok: Emgu.CV.Image<Gray, byte> image ... image.Save("imageName.bmp"); How to increase jpeg quality when using Emgu.Cv.Image.Save or should I call other function? Why is default quality so low? Tried to ask on EmguCV forum, but it is unreachable. 回答1: EMGU only has image.Save

OpenCV Unmanaged DLLs not found asp.net

一个人想着一个人 提交于 2019-12-19 19:14:10
问题 We are building a web application (C# .NET) that uses unmanaged libraries in the form of the Emgu opencv wrapper. We are forcing the build to be in 32-bit (x86), and we are using the 32-bit version of Emgu. All this works nice on local builds, but when being published to our webserver the openCV Dll(s) fail to load: System.DllNotFoundException Unable to load DLL 'opencv_core240': The specified module could not be found. (Exception from HRESULT: 0x8007007E) System.TypeInitializationException:

OpenCV Unmanaged DLLs not found asp.net

吃可爱长大的小学妹 提交于 2019-12-19 19:13:17
问题 We are building a web application (C# .NET) that uses unmanaged libraries in the form of the Emgu opencv wrapper. We are forcing the build to be in 32-bit (x86), and we are using the 32-bit version of Emgu. All this works nice on local builds, but when being published to our webserver the openCV Dll(s) fail to load: System.DllNotFoundException Unable to load DLL 'opencv_core240': The specified module could not be found. (Exception from HRESULT: 0x8007007E) System.TypeInitializationException:

How to cut a sub-part of an image using Emgu CV (or OpenCV)?

梦想的初衷 提交于 2019-12-19 18:55:11
问题 I want to cut a sub-purt of an image (or crop it) using Emgu CV (or OpenCV) and calculate average color of that part; looking for changes. Thanks 回答1: Set the ROI (Region of Interest) of the image you are working with this will mean any calculation is only done over this area. image.ROI = new Rectangle(x,Y,Width,Height); Calculate the Average of the ROI where "TYPE" is image dependant Bgr for colour Gray for Grayscale TYPE average = image.GetAverage(image); When youve finished reset your

Capturing a Multicast UDP Video stream using OpenCV

风流意气都作罢 提交于 2019-12-19 10:33:12
问题 I have a multi-cast UDP Video stream that I need my OPenCV (Emgu ) 2.4.x app to capture and process ("client"). On the client, I can capture the stream using VLC (udp://xx.yy.zz.aaa:1234, However the my app fails to capture this udp stream. My code is quite simple ( Capture cap = new Capture ("udp://@212.1.1.1:1234"); p.s. I have tried with and 2/o the @ also tried rtp on that address. No luck :-/ Does OpenCV directly allow "capture" of UDP streams? or do I need to run VLC on the client to re

How to create Emgu Image from System.Drawing.Image?

独自空忆成欢 提交于 2019-12-19 10:16:17
问题 I have a source that gives me a jpeg in memory stream (Bytes). I can convert it to System.Drawing.Image but I don't know how to convert it to Emgu Image. Maybe a direct conversion to Emgu Image is possible ? I'm working in C# under VS2010. Thanks. SW 回答1: You can first convert System.Drawing.Image object to a Bitmap and then create an Emgu.CV.Image with that bitmap. The code is as follows: System.Drawing.Image image; Bitmap bmpImage = new Bitmap(image); Emgu.CV.Image = new Emgu.CV.Image<Bgr,