aforge

C# image processing on Kinect video using AForge

浪子不回头ぞ 提交于 2019-12-05 22:55:02
My goal : use Kinect video to do shape recognition (large rectangle on the picture), draw rectangle on the picture to highlights the results and display. The techno I use : C# code, AForge and more specifically its shape checker http://www.aforgenet.com/articles/shape_checker/ How the magic should work : Every time a frame is ready I get the frame data as bytes array and transform it to bitmap to allow me to analyze it Apply the shape recognition algorithm Render the result... My problem : The whole process works so far but when I try to render the result in a WPF Image it lags terribly... (1

AForge.Video.FFMPEG used in C#

和自甴很熟 提交于 2019-12-05 22:35:47
问题 I use Visual C# 2008 and want to write AVI file from bmp sequences. I found AForge.Video.VWF but it's just for "vmw3" or "DIB " codecs and I want to use AForge.Video.FFMPEG but it got error. For example I just code : using System; using System.Collections.Generic; using System.Linq; using System.Text; using AForge.Video.FFMPEG; namespace ConsoleApplication4 { class Program { static void Main(string[] args) { VideoFileWriter vfw = new VideoFileWriter(); } } } But I got this

License Plate recognition using AForge.Net

天涯浪子 提交于 2019-12-04 15:11:27
问题 i am currently doing a project for "Automatic Number Plate Detection and Recognition" and i am using AForge.Net ;i have used a simple algo; though it is not very efficient but it will fulfills my requirements. i have calculated height,width and height to width(height/width) ratio of more than 40 car's numberplate; i searched for the rectangles in the image which lie in the range of height, width and height to width ratio; now with this i am able to detect the number plate for most of the

Frame-by-frame MJPEG streaming with C#/ASP.NET MVC

扶醉桌前 提交于 2019-12-04 09:03:10
I have been trying to setup a MJPEG stream in ASP.NET. I want to retrieve a MJEPG stream from a URL, and send every frame that I get to every connected client. Examples that I have been able to find only read from a set file, instead of a continues stream from URL, and send the entire file through MultiStreamContent . Since I retrieve frame-by-frame, I cannot do this. I would like to know if it is possible to do what I want with ASP.NET MVC. I'm currently using AForge video to retrieve the MJPEG stream from a link. My code for the controller class: using System.Net.Http; using System.Web.Http;

Sound volume on defined frequency (C#)

只愿长相守 提交于 2019-12-04 06:41:49
问题 I do not understand why the volume defined frequency is not as expected. I send sounds to my microphone with a few specified frequencies in turn. I then do FFT of my microphone buffer. On exit of FFT, I have an array of complex numbers. To know the volume of sound on the defined frequency, I look at my array, the number of element in this array I get this way: MyFrequency = n*SamplingRate/SizeOfArray. Next, I get the magnitude of complex number (sqrt(Re^2+Im^2) If I'm right, this shows me the

Converting a Grayscale image to black&white using Aforge.Net

て烟熏妆下的殇ゞ 提交于 2019-12-04 03:56:19
问题 I am quite new to Aforge.Net and I am looking for a way to convert a greyscale image to black and white. I couldnt really find any support on it? I managed to convert a normal image to a GrayScale bye applying a Grayscale filter. but i couldnt find anything regarding the black and white converion Can someone give me a hand with it please. 回答1: Use the Threshold Class to convert the image to black and white. // create filter Threshold filter = new Threshold( 100 ); // apply the filter filter

How to convert pixel formats? From 32bppRGB to 16bpp grayscale in C#

本小妞迷上赌 提交于 2019-12-04 03:31:46
问题 I need to do some thresholding for my image. The threshold filter function just accepts 8-16bpp grayscale . My bitmap picture has the 32bppRGB pixelformat. Please suggest some code for the same. (I also want to know if it is possible without pixel by pixel operations) p.s. I am using the Aforge.NET for thresholding. Thanks -Sagar 回答1: Easiest way: public static Bitmap MakeGrayscale(Bitmap original) { //make an empty bitmap the same size as original Bitmap newBitmap = new Bitmap(original.Width

Get Webcam stream using Aforge.NET in C# and WPF

不问归期 提交于 2019-12-03 12:18:23
I want to capture a webcam feed using my camera. For that I am using the 2 references: AForge.Video.dll and AForge.Video.DirectShow.dll . Here's a snippet I found: public FilterInfoCollection CamsCollection; public VideoCaptureDevice Cam = null; void Cam_NewFrame(object sender, NewFrameEventArgs eventArgs) { frameholder.Source = (Bitmap)eventArgs.Frame.Clone(); /* ^ * Here it cannot convert implicitly from System.Drawing.Bitmap to * System.Windows.Media.ImageSource */ } private void startcam_Click(object sender, RoutedEventArgs e) { CamsCollection = new FilterInfoCollection(FilterCategory

Matlab vs Aforge vs OpenCV

对着背影说爱祢 提交于 2019-12-03 11:48:56
问题 I am about to start a project in visual image-processing and have no had experience with Matlab, Aforge, OpenCV and was wondering if anyone had any experiences with these different software packages. I was also wondering which of the three packages were most efficient I assume OpenCV but has anyone had any experience? Thanks Jamie. 回答1: The question you need to ask yourself is which is more important - your time or the computer's time. If your task is really simple, you may be able to code it

How to find the best parameters for a Genetic Algorithm?

南笙酒味 提交于 2019-12-03 08:35:44
Some Genetic Algorithm frameworks, such as http://www.aforgenet.com/ requires many parameters, such as mutation rate, population size, etc There is universal best numbers for such parameters? I believe that it depends on the problem (fitness function delay, mutation delay, recombination delay, evolution rate, etc). My first thought was to use a GA to configure another GA. Any better ideas? The one time I programmed a genetic algorithm I included those values in the values to mutate, basically like you said using a GA to configure itself. It worked surprisingly well, especially since I've found