OCR: Optical Character Recognition with tesseract

Description Usage Arguments Author(s) Examples

View source: R/OCR.R

Description

OCR and OCR_data are wrappers for ocr and ocr_data of tesseract package. You need to install tesseract package to use these functions.

Usage

1
2
3
OCR(imorpx, engine = tesseract::tesseract("eng"), HOCR = FALSE)

OCR_data(imorpx, engine = tesseract::tesseract("eng"))

Arguments

imorpx

a grayscale image of class cimg or a pixel set

engine

a tesseract engine. See the reference manual of tesseract for detail.

HOCR

if TRUE return results as HOCR xml instead of plain text

Author(s)

Shota Ochi

Examples

1
2
3
4
5
6
hello <- DenoiseDCT(papers, 0.01) %>% ThresholdAdaptive(., 0.1, range = c(0,1))
if (requireNamespace("tesseract", quietly = TRUE))
{
  OCR(hello) %>% cat
  OCR_data(hello)
}

imagerExtra documentation built on May 2, 2019, 1:44 p.m.