inked: Counts 'inked' values in a vector.

View source: R/textCanvas.R

inkedR Documentation

Counts 'inked' values in a vector.

Description

Counts number of values in a vector that are different from the 'background'.

Usage

inked(v, bg, tol = 1/(2^32))

Arguments

v

A vector of pixels. It will generally be either a row or column from a text canvas.

bg

The background value.

tol

A tolerance around the background value. Defaults to 1/(2^32).

Details

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.

Value

A numeric value corresponding to the number of non-background values in v.

Author(s)

Dave Braze <davebraze@gmail.com>


davebraze/FDBeye documentation built on April 28, 2022, 1:20 a.m.