background_subtraction <- function(image, background) {
if (!all.equal(dim(image), dim(background))) {
stop("The video and the background image do not have the same dimensions.")
}
abs(image - background)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.