imgocr {simpletex}R Documentation

Mathematical formulas and character recognition

Description

Mathematical formulas and character recognition.

Usage

imgocr(img, mode = "latex_ocr")

Arguments

img

An image file, supporting jpg, png, bmp format.

mode

Set service model. The value can be 'latex_ocr', 'latex_ocr_turbo', or 'simpletex_ocr'. The default value is 'latex_ocr'. The 'latex_ocr' and 'latex_ocr_turbo' are used for formula identification. 'latex_ocr' is better than 'latex_ocr_turbo', but 'latex_ocr_turbo' is faster. 'simpletex_ocr' is suitable for general image recognition.

Value

Text or mathematical formulas for Markdown and LaTeX.

Examples

## Not run: 
  imgocr("path/to/test.jpg")
  imgocr("path/to/test.png", mode = "latex_ocr_turbo")
  imgocr("path/to/test.bmp", mode = "simpletex_ocr")

## End(Not run)


[Package simpletex version 1.0.4 Index]