This function performs background subtraction on input grayscale frames using adaptive median
background subtraction algorithm.The algorithm depends upon the number of previous frames taken
into consideration.
Usage
admedian(b, nf, thresh)
Arguments
b
3-D matrix containing grayscaled video frames.
nf
Number of previous frames to be taken into consideration.
thresh
threshold required to obtain foreground images. its value can be around 10 to 30 depending
upon the accuracy of the result.
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,15)
bground<-admedian(frames,3,25)
# }# NOT RUN {# }