How to use Math.NET Neodym Signal Processing Library to Filter Frequencies? - filtering

I have streaming continuous data that I need to filter by frequency. I have high-level knowledge of FFT and frequency filtering, but no real practical knowledge.
After searching for a suitable library to aid me, I came across Math.NET's Neodym Signal Processing Library (https://mathnetneodym.codeplex.com/releases/view/91769)
I downloaded it, upgraded it to VS2010 and used the SignalGenerator class to generate various sine wave of various frequencies. It worked great.
Now, I need to know how to filter dynamic data. This StackOverflow question seems to come the closest to mine, and is a good start:
Filtering continuous data, how to get rid of transients?
There is a .chm file in the downloaded project, but it seems to just be the API documentation. I need some high-level help just pointing me in the right direction to use the library.
Can anybody provide a good resource to refer to so I can use this library for my purpose?
Thank you!
John
UPDATE
I'm pretty sure I use the OnlineFilter.CreateBandpass static function with the mode ImpulseResponse.Infinite... but I'll post whatever I find out.

Related

How to generate 3D point cloud data file from multiple images of the object?

Are there any tools or algorithm in Matlab or OpenCv, which will take multiple images of any object as input (from different location around the object) and produce the 3D coordinate of the object in the world.
Like Naveh said, in OpenCV the building blocks are there, but putting it together is something you would have to do.
That being said, people have generated a number of SfM tools in both C++ and Matlab. Depending on your goals there are a number of prepackaged things you can look at:
-There is a SfM Matlab Toolbox here, I have not personally used it but I've seen it a number of times.
-If you are just looking for a black-box solution, check out Visual SfM, it is a GUI-fied version of a common SfM workflow.
-A while ago I put together a guide for installing the Visual SfM components individually on Fedora, if you wanted to dig into them. I'm not sure how relevant it is now but it might help.
Regardless, you should certainly educate yourself on the processes involved in creating 3D structure from imagery. It is a complicated process with many details which need to be understood.
What you are asking for is a fully fledged structure from motion algorithm. I don't think such a thing exists in MATLAB or OpenCV right off the shelf. However, the building blocks required for such an algorithm are there.
I suggest you do some background reading to better understand what specific algorithm will suit your needs. A good place to start is in Richard Szeliski's textbook, chapter 7. A free draft is available here. This book is recommended both in general as a good computer vision textbook, and specifically as well for your question, in which Szeliski himself is quite an expert.

FFT using Apple's Accelerate Framework

I'm trying to use apple's Accelerate Framework to setup FFT, windowing, overlapping and downsampling with input taken from the device's microphone. I've been looking all over for some sample code/application on how to use it, but I didn't quite figure out how to implement something like this in an actual project. Could you help point me in the right direction? Thanks
UPDATE
Here is the code I've managed to put together so far from various sources, including some other questions answered here. What it's missing is a downsampling function and the overlapping. In Apple's documentation, I found the following function vDSP_zrdesamp for desampling but i'm having trouble implementing it.
The real problem is trying to put this in an actual project. I've tried modifying this github project but I didn't manage to fit it in, so any help would be more than welcome. The actual FFT (which I need to modify) takes places in the RIOInterface class, in the audio callback function.
Please note that the project I mention on github does not belong to me, but it does not have a licence that forbids me to modify it for my own purposes. Also, this project is for testing only until I reach a more stable algorithm.

Easy and straight-forward FFT of MP3 file

I have a MP3 file and need to constantly detect and show Hz value of this playing MP3 file. A bit of googling shows that I have 2 opportunities: use FFT or use Apple Accelerate framework. Unfortunately I haven't found any easy to use sample of neither. All samples, like AurioTouch etc, need tons of code to get simple number for sample buffer. Is there any easy example for pitch detection for iOS?
For example I've found https://github.com/clindsey/pkmFFT, but it's missing some files that its' author has removed. Anything working like that?
I'm afraid not. Working with sound is generally hard, and Core Audio makes no exception. Now to the matter at hand.
FFT is an algorithm for transforming input from time domain to frequency domain. Is not necessarily linked with sound processing, you can use it for other things other than sound as well.
Accelerate is an Apple provided framework, which among many other things offer an FFT implementation. So, you actually don't have two options there, just one and its implementation.
Now, depending on what you want to do(e.g. if you favour speed over accuracy, robustness over simplicity etc) and the type of waveform you have(simple, complex, human speech, music), FFT may be not enough on its own or not even the right choice for your task. There are other options, auto-correlation, zero-crossing, cepstral analysis, maximum likelihood to mention some. But none are trivial, except for zero-crossing, which also gives you the poorest results and will fail to work with complex waveforms.
Here is a good place to start:
http://blog.bjornroche.com/2012/07/frequency-detection-using-fft-aka-pitch.html
There are also other question on SO.
However, as indicated by other answers, this is not something that can just be "magically" done. Even if you license code from someone (eg, iZotope, and z-plane both make excellent code for doing what you want to do), you still need to understand what's going on to get data in and out of their libraries.
If you need fast pitch detection go with http://www.schmittmachine.com/dywapitchtrack.html
You'll find a IOS sample code inside.
If you need FFT you should use Apple Accelerate framework.
Hope this help

MATLAB code for object detection using a webcam?

I am using an Arduino to control a car and I want to make it autonomous by using a webcam to see the object I want and make the car move to this location. I need several things:
MATLAB code
Interface between MATLAB and Arduino
How do I connect between them (software, not hardware)
I need any tutorial to learn or any instructions to make my project. I see many people have done this before, but unfortunately they did not mention how to start these kind of projects.
This question is fairly broad, so I apologize in advance for my somewhat general response.
The easiest way to interface a webcam with MATLAB is to make use of the Image Acquisition Toolbox. This link provides documentation detailing how to do this.
There is a good chance that you'll also want to make use of the Image Processing toolbox in MATLAB to be able to process the acquired images to determine where to go. See this doc. Though, after you've determined more specifically how you plan to process these images, there are probably numerous algorithms that you could find online that would not explicitly require this toolbox.
As far as interfacing with Arduino is concerned, there is a support package from the MathWorks that allows you to interface MATLAB code and Simulink models with Arduino. See this link
The only other general suggestion that I have is to consider using Simulink for this project rather than MATLAB. I feel that the model based approach of Simulink is a much better fit when designing control systems.
I hope that this helps you get things started.

BPMB visualization

We need to visualize BP (business process) into BPMN, but NOT by hands using modeler. We need to do it automatically in crm-web-based system written on PHP. I have input data (etc. array, xml, not care...(but not BPEL)), then I need to process it into nice BPMN graph (using SVG).
We have first nice-looking realization of it. We use matrix to draw: several times goes through matrix and optimize graph each time, no no, it working fast, but it not agile, hard to rebuilt, upgrade, add new features... We made this algorithm by ourselves (I mean we didn't find it in google or books). Problem is that we couldn't find any algorithms in the internet. I suppose we don't know correct keywords to do it. Every try returned us to BPEL vis. from BPMN, "Data flow vis." returned modelers...
Please help us to find some algorithms, or give correct keywords to find out information.
Think you're probably looking for "graph layout algorithms". The only library I'm aware of that can (I think) generate BPMN directly is the yFiles library from yWorks. It's not free. They do however offer a free application using the library that does auto-layout. Perhaps you could do some prototyping with that.
If that's not applicable, there are several other options. I'm not aware any of these can generate BPMN symbols directly; you'd have to construct the symbols. However all will auto-layout graphs according to various algorithms. Also all open source/free.
graphviz. Written in C. Quite old now but well used, stable and scalable.
tulip. Newer than graphviz. Haven't used it but heard good things about flexibility and scalability.
see also this post for javascript based options.
There are many more, just google for graph layout algorithms / libraries.
hth.