GetCharWidth: Utlities for Computing Typical Character Height and Width on...

GetCharWidthR Documentation

Utlities for Computing Typical Character Height and Width on this Page

Description

These functions provide a simple way to calculate the typical height and width of the characters recognized on the current page.

Usage

GetCharWidth(bbox, fun = median, onlyAlphaNumeric = TRUE, ...)
GetCharHeight(bbox, fun = median, onlyAlphaNumeric = TRUE, ...)

Arguments

bbox

the matrix/data.frame of bounding boxes of the elements on the page.

fun

a function to compute the "typical" value, e.g., the median or mean. It is called with a numeric vector.

onlyAlphaNumeric

a logical value to control whether we only consider "regular" characters and not diacritics and other characters that the OCR may have inferred.

...

additional arguments passed to the call to fun.

Value

a scalar numeric value

Author(s)

Duncan Temple Lang

See Also

GetBoxes, tesseract


duncantl/Rtesseract documentation built on March 25, 2022, 5:50 a.m.