This function implements a static background subtraction method in which background model is
set to first frame. This static background model is then subtracted from all subsequent frames
to obtain the forground images.
Usage
staticdiff(b, thresh)
Arguments
b
3-D matrix containing grayscaled video frames.
thresh
threshold required to obtain foreground images. Its value can lie between 30-40
or more depending upon the accuracy required.
Value
A 3-D matrix of frames containing foreground obtained after background subtraction is
applied(binary images).
# NOT RUN {# }# NOT RUN {videoURL <- system.file("extdata","daria_skip.avi",package = "Rbgs")
frames <- readvideoframe(videoURL,1,9)
bground<-staticdiff(frames,35)
# }