Table of Contents

Class FirFilter

Namespace
Bonsai.Dsp
Assembly
Bonsai.Dsp.dll

Represents an operator that convolves the input signal with a finite-impulse response filter kernel.

public class FirFilter : Transform<Mat, Mat>
Inheritance
FirFilter
Inherited Members

Remarks

This operator is implemented using cross-correlation. If kernels are symmetric, there is no difference between correlation and convolution. When using asymmetric kernels, note the kernel needs to be flipped to obtain a true convolution.

Properties

Anchor

Gets or sets the anchor of the kernel that indicates the relative position of a filtered point within the kernel.

public int Anchor { get; set; }

Property Value

int

Kernel

Gets or sets the convolution kernel for the FIR filter.

[TypeConverter(typeof(UnidimensionalArrayConverter))]
public float[] Kernel { get; set; }

Property Value

float[]

Methods

Process(IObservable<Mat>)

Convolves the input signal with a finite-impulse response filter kernel.

public override IObservable<Mat> Process(IObservable<Mat> source)

Parameters

source IObservable<Mat>

A sequence of Mat objects representing the waveform of the signal to filter.

Returns

IObservable<Mat>

A sequence of Mat objects representing the waveform of the filtered signal.

Process(IObservable<Point2f>)

Convolves the input position signal with a finite-impulse response filter kernel.

public IObservable<Point2f> Process(IObservable<Point2f> source)

Parameters

source IObservable<Point2f>

A sequence of 2D points representing the position signal to filter.

Returns

IObservable<Point2f>

A sequence of 2D points representing the filtered position signal.

Process(IObservable<double>)

Convolves the input signal with a finite-impulse response filter kernel.

public IObservable<double> Process(IObservable<double> source)

Parameters

source IObservable<double>

A sequence of floating-point numbers representing the waveform of the signal to filter.

Returns

IObservable<double>

A sequence of floating-point numbers representing the waveform of the filtered signal.