This function uses previous frames to construct a background model in eigen space. This eigen background model is then subtracted from current frame to obtain the foreground images.
eigenbgs(b, nf, thresh)
3-D matrix containing grayscaled video frames.
Number of previous frames to be considered. Its value has to be greater than 1.
threshold required to obtain foreground images.value of thresh can be set to 10 - 15 approximately.
A 3-D matrix of frames containing foreground obtained after background subtraction is applied(binary images).