C# Class HandInput.Util.Background

A background model.
Mostra file Open project: ushadow/handinput Class Usage Examples

Public Methods

Method Description
AccumulateBackground ( Single>.Image image ) : void

Learns the background statisitics for one more frame.

Background ( int width, int height ) : System
BackgroundDiff ( Single>.Image image, Byte>.Image mask ) : void

Segments an input image into foreground and background.

CreateModelsFromStats ( ) : void

Creates a statistical model of the background if the model is not created.

ToString ( ) : String

Private Methods

Method Description
SetHighThreshold ( float scale ) : void

Sets the high threshold of the background model for each pixel. Any value above that threashold for a particular pixel is considered foreground. High threshold = average value + average absolute difference * scale

SetLowThreshold ( float scale ) : void

Sets the low threshold of the background model for each pixel. Any value below that threashold for a particular pixel is considered foreground. Low threshold = average value - average absolute difference * scale

Method Details

AccumulateBackground() public method

Learns the background statisitics for one more frame.
public AccumulateBackground ( Single>.Image image ) : void
image Single>.Image Image to be accumulated for learning background statistics.
return void

Background() public method

public Background ( int width, int height ) : System
width int
height int
return System

BackgroundDiff() public method

Segments an input image into foreground and background.
public BackgroundDiff ( Single>.Image image, Byte>.Image mask ) : void
image Single>.Image image of which the background needs to be subtracted.
mask Byte>.Image a value of 255 in the mask means the pixel is foreground, and a /// value of 0 means the corresponding pixel is background.
return void

CreateModelsFromStats() public method

Creates a statistical model of the background if the model is not created.
public CreateModelsFromStats ( ) : void
return void

ToString() public method

public ToString ( ) : String
return String