getMargins: Find the margins in a text canvas

Description Usage Arguments Details Value Author(s) Examples

View source: R/textCanvas.R

Description

None yet

Usage

1
getMargins(canvas)

Arguments

canvas

A N dimensional matrix (product of png::readPNG()) corresponding to bitmap image.

Details

None yet

Value

A named 4 vector containing top, right, bottom and left margins

Author(s)

Dave Braze <[email protected]>

Examples

1
2
3
4
5
6
    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

    ## get margins
    getMargins(fcnvs)

davebraze/FDBeye documentation built on Nov. 21, 2017, 11:23 a.m.