Learn R Programming

simpletex (version 1.0.4)

imgocr: Mathematical formulas and character recognition

Description

Mathematical formulas and character recognition.

Usage

imgocr(img, mode = "latex_ocr")

Value

Text or mathematical formulas for Markdown and LaTeX.

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.

Examples

Run this code
if (FALSE) {
  imgocr("path/to/test.jpg")
  imgocr("path/to/test.png", mode = "latex_ocr_turbo")
  imgocr("path/to/test.bmp", mode = "simpletex_ocr")
}

Run the code above in your browser using DataLab