Counts number of values in a vector that are different from the 'background'.
inked(v, bg, tol = 1/(2^32))
A vector of pixels. It will generally be either a row or column from a text canvas.
The background value.
A tolerance around the background value. Defaults to 1/(2^32).
A numeric value corresponding to the number of non-background values in v
.
Counts number of values in a vector that are different from the 'background'. Intended to be apply()ed to the rows or columns of a matrix (a color plane in a text canvas).
Not necessarily intended to be called by the end user.