Extract text from images (using OCR)

Supported in: Batch

Run OCR on image files in a media set to extract text.

Expression categories: Media

Declared arguments

  • Languages to detect - Languages to detect in the input files.
    Set<Enum<Afrikaans, Albanian, Amharic, Arabic, Armenian, Assamese, Azerbaijani, Azerbaijani - Cyrilic, Basque, Belarusian, and more ...>>
  • Media reference - The column containing media references to image files in a media set.
    Expression<Media reference>
  • OCR output format - Output will be a string.
    Enum<Text, hOCR>
  • Scripts to detect - Scripts to detect in the input files.
    Set<Enum<Arabic, Armenian, Bengali, Canadian Aboriginal, Cherokee, Cyrillic, Devanagari, Ethiopic, Fraktur, Georgian, and more ...>>
  • optional Error handling - Determines the behavior of the pipeline for inputs which fail to process. Fails fast by default.
    Enum<Fail fast, NULL on error>

Output type: String

Examples

Example 1: Base case

Argument values:

  • Languages to detect: {ENG}
  • Media reference: mediaReference
  • OCR output format: {TEXT}
  • Scripts to detect: {ARABIC}
  • Error handling: FAIL_FAST
mediaReferenceOutput
{"mimeType":"image/png","reference":{"type":"mediaSetItem","mediaSetItem":{"mediaSetRid":"ri.mio.main.media-set.a", "mediaItemRid":"ri.mio.main.media-item.a"}}}This text came from the image in the media set.