
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.
admedian(b, nf, thresh)
3-D matrix containing grayscaled video frames.
Number of previous frames to be taken into consideration.
threshold required to obtain foreground images. its value can be around 10 to 30 depending upon the accuracy of the result.
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 {
# }
Run the code above in your browser using DataLab