Learn R Programming

Rbgs (version 0.2)

varbgs: Variance based background subtraction algorithm

Description

This function calculates the variance of previous nf number of frames and obtains the foreground by subtracting the variance obtained from the current frame.

Usage

varbgs(b, nf, thresh)

Arguments

b

3-D matrix containing grayscaled video frames.

nf

number of frames to be considered to construct background model. Its value has to be greater greater than 1. Smaller value gives better results.

thresh

threshold required to obtain foreground images.Its value can be around 220.

Value

A 3-D matrix of frames containing foreground obtained after background subtraction is applied(binary images).