Table of Contents

Class BackgroundSubtraction

Namespace
Bonsai.Vision
Assembly
Bonsai.Vision.dll

Represents an operator that performs image segmentation of every frame in the sequence using an online estimation of the background.

public class BackgroundSubtraction : Transform<IplImage, IplImage>
Inheritance
BackgroundSubtraction
Inherited Members

Properties

AdaptationRate

Gets or sets a value determining how fast the online estimation of the background is adapted.

[Range(0, 1)]
[Precision(2, 0.01)]
public double AdaptationRate { get; set; }

Property Value

double

BackgroundFrames

Gets or sets the number of frames to use for initial background estimation.

public int BackgroundFrames { get; set; }

Property Value

int

SubtractionMethod

Gets or sets a value specifying the subtraction method used to isolate foreground pixels.

public SubtractionMethod SubtractionMethod { get; set; }

Property Value

SubtractionMethod

ThresholdType

Gets or sets a value specifying the type of threshold to apply to individual pixels.

[TypeConverter(typeof(BackgroundSubtraction.ThresholdTypeConverter))]
public ThresholdTypes ThresholdType { get; set; }

Property Value

ThresholdTypes

ThresholdValue

Gets or sets the threshold value used to test whether individual pixels are foreground or background.

[Range(0, 255)]
[Precision(0, 1)]
public double ThresholdValue { get; set; }

Property Value

double

Methods

Process(IObservable<IplImage>)

Performs image segmentation of every frame in an observable sequence using an online estimation of the background.

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

Parameters

source IObservable<IplImage>

The sequence of frames on which to perform image segmentation.

Returns

IObservable<IplImage>

The sequence of images which have been segmented into foreground and background pixels.