readBoxFile: Read a box file generated by tesseract

readBoxFileR Documentation

Read a box file generated by tesseract

Description

This is a simple function that reads the results of calling tesseract ... makebox. The result is a data frame, importantly, with a class TesseractBoxdata. This allows us to display the results via a method.

Usage

readBoxFile(file, imgDim = integer(), ...)

Arguments

file

the name of the file containing the box data

imgDim

the dimension(s) of the image. If this is just one element, it is the number of rows.

...

additional arguments passed to read.table

Value

This returns a data frame with the class TesseractBoxdata. The 5 columns are left, bottom, right, top of each box and text contains the value. This allows us to easily plot the results.

Author(s)

Duncan Temple Lang

References

Tesseract documentation.

Examples

bb = readBoxFile(system.file("trainingSample", "eng.tables.exp0.box", package = "Rtesseract"))
plot(bb)

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