emgucv

emgucv 在工具中 ImageBox

丶灬走出姿态 提交于 2019-12-27 02:53:21
1. 安装emgu 2. 新建winform程序 3. 在 "引用" 中添加 Emgucv相应的动态库 4. 点击软件顶部点击: 工具 -> 选择工具箱项 -> .net framework组件 , 然后点击 "浏览", 在emgucv安装目录下的bin文件夹中, 选择 Emgu.CV.UI.dll, 出现 " HistogramBox " 并勾选 , 点击 "确定" 即可 5. 在 "工具箱 "中 查找 imagebox 控件 来源: CSDN 作者: chen1231985111 链接: https://blog.csdn.net/chen1231985111/article/details/103708818

EmguCV - Create image from unmanaged data

拜拜、爱过 提交于 2019-12-25 12:13:06
问题 I'm using EmguCV and i've got a byte type Grayscale Matrix with the size of 640x480 and Every element of the matrix is either 255 or 0. Now I need to make an Image from this. The best constructor I found looked like this: Image<Gray,byte>(int width, int height, int stride, IntPtr scan0) I got the first, second and fourth parameters from the matrix and I sent 640 for the stride. But it gives me an Access violation exception: Attempted to read or write protected memory. This is often an

EmguCV - Create image from unmanaged data

余生长醉 提交于 2019-12-25 12:11:37
问题 I'm using EmguCV and i've got a byte type Grayscale Matrix with the size of 640x480 and Every element of the matrix is either 255 or 0. Now I need to make an Image from this. The best constructor I found looked like this: Image<Gray,byte>(int width, int height, int stride, IntPtr scan0) I got the first, second and fourth parameters from the matrix and I sent 640 for the stride. But it gives me an Access violation exception: Attempted to read or write protected memory. This is often an

Error:The type initializer for 'Emgu.CV.CvInvoke' threw an exception

落花浮王杯 提交于 2019-12-25 11:06:08
问题 I have this code in my project: MCvFont font = new MCvFont(FONT.CV_FONT_HERSHEY_SCRIPT_SIMPLEX, 0.2d, 0.2d); When program runs, It gives an exception: The type initializer for 'Emgu.CV.CvInvoke' threw an exception. So please help me with on this issue. 回答1: Usually these kind of "Emgu.CV.CvInvoke" exception will throw if there are some problems with your Emgucv Dll's. Check these following thing's: Open Your Project & Verify whether all the Project-> Reference's are made correctly.e.g Emgu.CV

OpenCv:u!=0 Exception while reading frames from video file

六眼飞鱼酱① 提交于 2019-12-25 09:26:28
问题 I'm trying to get frames from a video file but while reading frames, OpenCv:u!=0 exception is being thrown. I'm using Emgu.Cv dll. I have written the code as follows: private void GetVideoFrames(String Filename) { try { captureFrame = new Capture(Filename); bool Reading = true; while (Reading) { using (frame = captureFrame.QueryFrame().ToImage<Bgr, Byte>()) { if if (frame != null) { imageBox1.Image = frame; frameCount++; } else { Reading = false; } } } } Could anyone please provide some help.

Cannot get SURF example in EMGU.CV to work?

痞子三分冷 提交于 2019-12-25 06:44:53
问题 I am trying to detect a pattern shown in two images. Hence I have been trying to use the SURF algorithim found in emgu.CV, but the "SURFFeature" example that is given gives me the following error: An unhandled exception of type 'Emgu.CV.Util.CvException' occurred in Emgu.CV.dll Additional information: OpenCV: norm == NORM_L1 || norm == NORM_L2 || norm == NORM_HAMMING Any ideas how to fix this? When I try the "Hello World" example and the face detection example, both seem to work fine. Thanks

Find interest point in surf Detector Algorithm

百般思念 提交于 2019-12-25 02:29:53
问题 I have tried hard But i am not able that how to find single point of interest in SURF Algorithm in Emgu CV. I wrote code for SURF. and I have problems that some times it goes in if statement near my numberd section "1" and some times it does not based on different images. why is that so? on the basis of that homography is calculated to not null. than I become able to draw circle or lines. which also have problem. circle or rectangle is drawn at 0,0 point on the image. Please help me. I will

Fourier Transform in EmguCV 3.4.1

断了今生、忘了曾经 提交于 2019-12-24 16:12:13
问题 The following code doesn't compile in EmguCV 3.4.1. Image<Gray, float> image = new Image<Gray, float>(path); IntPtr complexImage = CvInvoke.cvCreateImage(image.Size, Emgu.CV.CvEnum.IplDepth.IplDepth32F, 2); CvInvoke.cvSetZero(complexImage); // Initialize all elements to Zero CvInvoke.cvSetImageCOI(complexImage, 1); CvInvoke.cvCopy(image, complexImage, IntPtr.Zero); CvInvoke.cvSetImageCOI(complexImage, 0); Matrix<float> dft = new Matrix<float>(image.Rows, image.Cols, 2); CvInvoke.cvDFT

Is Picture-in-Picture possible using OpenCV?

懵懂的女人 提交于 2019-12-24 14:46:25
问题 I would like to add a smaller image on top of a larger image (eventually for PiP on a video feed). I can do it by iterating through the relevant data property in the large image and add the pixels from the small image. But is there a simpler and neater way? I'm using EMGU. My idea was to define an ROI in the large image of the same size as the small image. Set the Large image equal to the small image and then simply remove the ROI. Ie in pseudo code: Large.ROI = rectangle defined by small

EmguCV ImageGrabbed Event WPF App

流过昼夜 提交于 2019-12-24 10:46:18
问题 I have problems with the following code namespace MyApp { public partial class PhotoWindow : Window { private Capture _capture; public PhotoWindow () { InitializeComponent(); _capture = new Capture(); if (_capture != null) { //<Image> in XAML CaptureSource.Width = 150; CaptureSource.Height = 180; _capture.ImageGrabbed += ProcessFrame; _capture.Start(); } Activated += (s, e) => _capture.Start(); Closing += (s, e) => { if (_capture == null) return; _capture.Stop(); _capture.Dispose(); }; }