emgucv

How to draw histogram using EmguCV and C#

╄→гoц情女王★ 提交于 2019-12-18 11:43:04
问题 I need to draw two types of histogram, namely monodimensional and tridimensional. I'm a newbie to EMGU and all of the samples I found on the net are in C++ or C. Are there any samples using C# and Emgucv? Thanks for helping. 回答1: The following code will segment the RED GREEN and BLUE Histogram data and put them in an array of floats for whatever use you want. float[] BlueHist; float[] GreenHist; float[] RedHist; Image<Bgr, Byte> img = new Image<Bgr, byte>("ImageFileName"); DenseHistogram

System.TypeInitializationException using Emgu.CV in C#

不想你离开。 提交于 2019-12-18 09:36:32
问题 At this point I have a function which calls for an image from my camera interface. This image is then saved to hard drive and also displayed in the Windows Forms GUI. The function inside the camera interface which returns the image is as follows: height and width are both integers that are part of the camera interface class. In this case they were set to 800x600. public Image<Bgr,byte> QueryFrame() { Image<Bgr, byte> temp; lock (key) { using (Capture cap = new Capture()) { cap

Finding contour points in emgucv

北慕城南 提交于 2019-12-18 06:27:33
问题 I am working with emguCV for finding contours essential points then saving this point in a file and user redraw this shape in future. so, my goal is this image: example my solution is this: 1. import image to picturebox 2. edge detection with canny algorithm 3. finding contours and save points I found a lot of points with below codes but i can't drawing first shape with this point! using Emgu.CV; using Emgu.Util; private void button1_Click(object sender, EventArgs e) { Bitmap bmp = new Bitmap

Finding contour points in emgucv

北城以北 提交于 2019-12-18 06:27:17
问题 I am working with emguCV for finding contours essential points then saving this point in a file and user redraw this shape in future. so, my goal is this image: example my solution is this: 1. import image to picturebox 2. edge detection with canny algorithm 3. finding contours and save points I found a lot of points with below codes but i can't drawing first shape with this point! using Emgu.CV; using Emgu.Util; private void button1_Click(object sender, EventArgs e) { Bitmap bmp = new Bitmap

Finding contour points in emgucv

删除回忆录丶 提交于 2019-12-18 06:27:11
问题 I am working with emguCV for finding contours essential points then saving this point in a file and user redraw this shape in future. so, my goal is this image: example my solution is this: 1. import image to picturebox 2. edge detection with canny algorithm 3. finding contours and save points I found a lot of points with below codes but i can't drawing first shape with this point! using Emgu.CV; using Emgu.Util; private void button1_Click(object sender, EventArgs e) { Bitmap bmp = new Bitmap

Emgu CV get all frames from video file

烂漫一生 提交于 2019-12-18 02:49:32
问题 I would like to ask you to help me with getting all the frames from video file using Emgu CV. I know I can use Capture class and its QueryFrame() method, but this only returns one frame. What is the easiest way to get all the frames? (and save it for example to Image<Bgr, Byte>[] ) I need all the frames to do some more processing (to be more specific: key frame extraction for video summarization). Thanks a lot for your help. 回答1: See my answer here for reference Emgu Capture plays video super

How do I equalize contrast & brightness of images using opencv?

拟墨画扇 提交于 2019-12-17 23:44:14
问题 I've got an image that I've scanned, but the white paper is not white on the screen. Is there a way to equalize the contract/brightness to make the background whiter? Update I've tried the suggested Image._EqualizeHist function from EmguCv: string file = @"IMG_20120512_055533.jpg"; Image<Bgr, byte> originalColour = new Image<Bgr, byte>(file); Image<Bgr, byte> improved = originalColour.Clone(); improved._EqualizeHist(); But get an even worse result (also when first gray scaled): Am I missing

how to get video from ip camera using emgucv

依然范特西╮ 提交于 2019-12-17 20:59:16
问题 Summary: I'm trying to get video from IP camera in emgu, I could display video in the browser from an ip like "http://169.254.255.253". Question: How could I display this from emgu? 回答1: Capture _Capture = new Emgu.CV.CvInvoke.cvCreateFileCapture("http://username:pass@cam_address/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=30&.mjpg"); I didn't test but may be this code snippet or approach can help you. For OpenCV example you can examine this page: OpenCV with Network Cameras And you

Type initialization exception

邮差的信 提交于 2019-12-17 19:34:09
问题 I created imageHolder class: public class ImageHolder : Image<Bgr, Byte> { private String imagePath; public ImageHolder(String path):base(path) { this.imagePath = path; } public String imgPathProperty { get { return imagePath; } set { imagePath = value; } } } I create instance of the class and initialize it,like this: private ImageHolder originalImageHolder; originalImageHolder = new ImageHolder(openFileDialog.FileName); In runtime i get this exception: The type initializer for 'Emgu.CV

How to create Haar Cascade (.xml file) to use in OpenCV?

依然范特西╮ 提交于 2019-12-17 10:14:55
问题 If you are familiar with OpenCV library, you know what Haar Cascade image object detection is. By image object detection I mean, like human face detection or something else. I have some Haar Cascade XMLs for face detection, but I don't know how to create my own. I want to create Haar Cascade XMLs to detect simple bright circle light sources (i.e. flashing infrared light from TV remote control). So, how do I create a Haar Cascade (.xml file) to use in OpenCV? 回答1: I think this might be helpful