emgucv

How to blur part of an Image using EmguCV?

假如想象 提交于 2019-12-08 05:26:49
问题 We have a large number of Images taken from a car for a project. To satisfy privacy norms, we need to detect faces & License Plates and then blur those areas. I came to know of the Emgucv project, and the tutorial given at http://www.emgu.com/wiki/index.php/License_Plate_Recognition_in_CSharp has been very useful to detect Licensplates. Is there a way of blurring this region using Emgu itself? 回答1: I don't believe that there is something built-in like what you are looking for. What you will

Gaussian Noise in emgucv

久未见 提交于 2019-12-07 20:40:08
问题 How can I add gaussian noise ( with a particular mean and variance ) to an image using emgucv ? 回答1: I'm not sure quite what your asking as a Gaussian filter tends to be there to remove noise. To use a custom kernel you can use the following code. If you wish to add noise with a set mean and variance then you may have to resort to looping through the my_image.Data property and add it that way. Here is the code for using a custom Kernel if it's not quite what your after let me know and I'll

How to calculate the correlation between two images in EMGU?

泪湿孤枕 提交于 2019-12-07 19:16:05
问题 I have two images (let's assume they have the same size), i want to calculate the correlation between the two images Using EMGU and C#. I didn't found any function that does it and implemented the correlation calculation by myself.. but i'd rather use built in function. Is such function exist ? Thanks. 回答1: I think Image<>.MatchTemplate() is what you're looking for. 来源: https://stackoverflow.com/questions/12211619/how-to-calculate-the-correlation-between-two-images-in-emgu

How do I compute DFT and its reverse with EMGU?

自闭症网瘾萝莉.ら 提交于 2019-12-07 17:26:56
问题 How can I compute the DFT of an image (using EMGU), display it and then compute the reverse to get back to the original? I'm going to answer my own question here since it took me a while to figure out. 回答1: To test that it works here's an image and here's the expected result after applying DFT. And without further ado here's the code: // Load image Image<Gray, float> image = new Image<Gray, float>(@"C:\Users\me\Desktop\lines.png"); // Transform 1 channel grayscale image into 2 channel image

Connect to IP Camera Using Emgu CV's Capture = New Capture()

爱⌒轻易说出口 提交于 2019-12-07 15:43:35
Using Visual Basic 2008 and Emgu CV, I can capture the stream of a webcam on my PC. What I want to do is connect to an IP camera, knowing its URL, using Capture = New Capture(). Here is the code I have: Imports Emgu.CV Imports Emgu.CV.Util Imports Emgu.CV.Structure Public Class Form1 Dim capturez As Capture = New Capture("rtsp://[IP Address]/mpeg4/media.amp") Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim imagez As Image(Of Bgr, Byte) = capturez.QueryFrame() PictureBox1.Image = imagez.ToBitmap() End Sub End Class I get the following

Fourier Transform + emgucv

倾然丶 夕夏残阳落幕 提交于 2019-12-07 15:05:14
问题 Can anybody tell me what is the problem in this code... Basically I am trying to compute the dft of the image and show it as an image on my screen. Image<Gray, float> GreyOriginalImage = new Image<Gray, float>(strFileName); Matrix<float> imageMat = new Matrix<float>( CvInvoke.cvGetOptimalDFTSize( GreyOriginalImage.Rows ) , CvInvoke.cvGetOptimalDFTSize( GreyOriginalImage.Cols ) ); GreyOriginalImage.CopyTo( imageMat.GetSubRect( GreyOriginalImage.ROI ) ); CvInvoke.cvDFT( imageMat , imageMat ,

How to detect black Bullets in Image?

喜夏-厌秋 提交于 2019-12-07 08:18:29
Given the following image, How can I detect black bullets (90 bullet) in this image using C#, EmguCV or AForge? I tried to use GetPixel(x,y) method but it checks only pixel by pixel, it is very slow and I need to detect the bullets not pixels. Algorithm/Idea 1 You can divide your image in squares as shown in this sample: With this logic you only have to check every 20th pixel. As soon as you know where the first dot is, you will know that every other dot have to be in the same horizontal line (in your provided sample). A sample algorithm would look similar to this (please note that it need

How to Convert Emgu.Cv.Image<Gray,byte> to System.Image

為{幸葍}努か 提交于 2019-12-07 05:29:39
问题 I was new to Emgu Cv and i was wondering if someone could let me know how i change Emgu.Cv.Image to System.Image?If there is a need for further explanation, let me know and i will do it.The language i am using is C#. 回答1: You can just use the ToImage() method to get a System.Drawing.Bitmap (which is a derived class of System.Drawing.Image ), so something like this // create an Emgu image of 400x200 filled with Blue color Image<Bgr, Byte> img = new Image<Bgr, byte>(400, 200, new Bgr(255, 0, 0)

Calculating distance using a single camera

[亡魂溺海] 提交于 2019-12-07 05:20:43
问题 I would like to calculate distance to certain objects in the scene, I know that I can only calculate relative distance when using a single camera but I know the coordinates of some objects in the scene so in theory it should be possible to calculate actual distance. According to the opencv mailing list archives, http://tech.groups.yahoo.com/group/OpenCV/message/73541 cvFindExtrinsicCameraParams2 is the function to use, but I can't find information on how to use it? PS. Assuming camera is

Unable to load DLL 'opencv_core242': The specified module could not be found. Emgu CV

这一生的挚爱 提交于 2019-12-07 01:00:57
问题 I'm trying to start using emgu CV open CV for C#. But I'm having trouble making it work. I'm following this guide to make simple program using emgu CV Link but I get following error: (any idea what I'm doing wrong?) System.TypeInitializationException was unhandled Message=The type initializer for 'Emgu.CV.CvInvoke' threw an exception. Source=Emgu.CV TypeName=Emgu.CV.CvInvoke StackTrace: at Emgu.CV.Image`2..ctor(String fileName) in c:\Emgu\emgucv-windows-x86-gpu 2.4.2.1777\Emgu.CV\Image.cs