KeyView 24.4
KeyView Filter SDK C++ Programming Guide

# ocr

Configure Optical Character Recognition (OCR) on raster image files to attempt to filter text.

This option is available only if OCR is included in your license. Setting `enable` to `false` disables it.

The default OCR settings attempt to recognize as much text as possible, prioritizing recall over processing time. If you know what you need to process, setting additional options can improve performance.

## Syntax

    Configuration& ocr(
       bool enable,
       OCROrientation orientation = OCROrientation::Any,
       OCRTextFindingMode text_finding_mode = OCRTextFindingMode::Document,
       OCRDetectAlphabet detect_alphabet = OCRDetectAlphabet::Off,
       const std::vector<std::string>& languages = {}
    );

`enable` | Enable OCR if your license and platform support it. The default is true.
`orientation` | How KeyView detects rotated text. The options for this parameter are defined in the enumeration OCROrientation. The default is OCROrientation::Any.
`text_finding_mode` | How KeyView detects text in an image. The options for this parameter are defined in the enumeration OCRTextFindingMode. For the best performance, choose the option that corresponds to the images you are processing. The default is OCRTextFindingMode::Document.
`detect_alphabet` | Whether KeyView runs alphabet detection on images. The options for this parameter are defined in the enumeration OCRDetectAlphabet The default is OCRDetectAlphabet::Off.
`languages` | A list of ISO 639-1 language codes to use for OCR. The default value is all supported languages. For a list of supported languages with ISO 639-1 language codes, see OCR Supported Languages.

Copyright 1997-2024 Open Text
Version 24.4 | Last updated September 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL KeyView 24.4

Topic Title: ocr