Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 

README.md

Signal Filter

Signal Filter is a Processing library for noisy signal filtering. It provides a convenient way to get rid of the noise in raw signals (like blob tracking coordinates for example).

Signal Filter is built upon the OneEuroFilter by Géry Casiez. It uses the Java implementation by Stéphane Conversy.

Please report bugs and submit feature requests on the issues page.

About

“The 1€ filter (“one Euro filter”) is a simple algorithm to filter noisy signals for high precision and responsiveness. It uses a first order low-pass filter with an adaptive cutoff frequency: at low speeds, a low cutoff stabilizes the signal by reducing jitter, but as speed increases, the cutoff is increased to reduce lag.” [Casiez 2012]

This library provides convenience functions to deal with the most common scenarios: single signal, coordinates (as PVector or individual floats), multiple channels. Look at the examples and the documentation for more information.

To learn more about the 1€ Filter algorithm, read the CHI 2012 paper (PDF) by Géry Casiez.

You can also try the online demo of the 1€ filter for a comparison with other filters.

Download

Installation

Unzip and put the extracted SignalFilter folder into the libraries folder of your Processing sketch folder. Reference and examples are included in the SignalFilter folder.

Usage

Import the library, create your filter, and apply it to your signal. Easy! Optionnally, you can get more control over the parameters (recommended). Look at the examples for instructions.

// Add the library to the sketch
import signal.library.*;

// -----------------------------------------------------
// Create the filter
   SignalFilter myFilter;
// -----------------------------------------------------

// Variables for the dummy & filtered signal
float sourceSignal;
float noisySignal;
float filteredSignal;

void setup() {

  // -----------------------------------------------------
  // Initialize the filter
     myFilter = new SignalFilter(this);
  // -----------------------------------------------------

}

void draw()
{

  // Generate a dummy signal
  sourceSignal = sin(frameCount / 1000.0);

  // Add random noise to our dummy signal
  noisySignal = sourceSignal + random(-0.05, 0.05);

  // -----------------------------------------------------
  // Filter the signal
     filteredSignal = myFilter.filterUnitFloat( noisySignal );
  // -----------------------------------------------------

  // Display the results in the console
  println("");
  println("Source   = " + sourceSignal);
  println("Noisy    = " + noisySignal);
  println("Filtered = " + filteredSignal);

}

Examples

Snapshots

Snapshots

Snapshots

Tested

Processing Versions:

  • 3.5.3
  • 3.4
  • 2.0.1
  • 2.0
  • 2.0b9
  • 2.0b8
  • 2.0b7
  • 1.5.1

Dependencies

None.

To Do

Questions?

Wanna chat? Ping me on Twitter. For bug reports, please use the issues page.

License

This README file was last updated on 2019-03-04

About

A signal filtering library for Processing

Resources

Releases

No releases published
You can’t perform that action at this time.