blob_detection <- function(bw_image, min_size = 0, max_size = Inf) {
cc <- .Call("ccl", bw_image, PACKAGE = "videotrackR")
tab <- data.frame(which(cc > 0, arr.ind=T),
group = cc[which(cc > 0)])
idx <- which(table(tab$group) <= max_size & table(tab$group) >= min_size)
tab[tab$group %in% idx, ]
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.