getBGcol | R Documentation |
Finds the most common value in a matrix and returns it.
getBGcol(cnvs)
cnvs |
A matrix representing a text canvas. |
Finds the 'background' value in a matrix, defined as the most common value in a matrix.
Not necessarily intended to be called by the end user.
A numeric value corresponding to the the most common value in cnvs
.
Dave Braze <davebraze@gmail.com>
cnvs <- system.file("extdata/story01.png", package="FDBeye") cnvs <- png::readPNG(cnvs) fcnvs <- apply(cnvs, c(1,2), sum) # flatten to a single plane for convenience getBGcol(fcnvs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.