MBIOcrEngineOptions


@interface MBIOcrEngineOptions : MBIBaseOcrEngineOptions <NSCopying>

Options used for OCR process. These options enable you to customize how some OCR parsers work. For example, you can set character whitelists, character height, supported fonts etc.

  • Creates MBIOcrEngineOptions with default settings.

    Declaration

    Objective-C

    - (nonnull instancetype)init;

    Swift

    init()
  • Type of document scanned.

    Default: MBIBlinkOCRDocumentType

    Declaration

    Objective-C

    @property (nonatomic) MBIDocumentType documentType;

    Swift

    var documentType: MBIDocumentType { get set }
  • Minimal height of the line of text given in pixels. All chars smaller than this value will be ignored.

    Setting the minimal line height can reduce the noise in OCR results.

    Default: 10

    Declaration

    Objective-C

    @property (nonatomic) NSInteger minimalLineHeight;

    Swift

    var minimalLineHeight: Int { get set }
  • Maximal height of the line of text given in pixels.

    Setting the maximal line height can reduce the noise in OCR results.

    Default: 200

    Declaration

    Objective-C

    @property (nonatomic) NSInteger maximalLineHeight;

    Swift

    var maximalLineHeight: Int { get set }
  • Specifies if the image processing is performed on image

    By default it’s set to true. Disable it only if you perform your own image processing.

    Default: YES

    Declaration

    Objective-C

    @property (nonatomic) BOOL imageProcessingEnabled;

    Swift

    var imageProcessingEnabled: Bool { get set }
  • Whitelist of characters used in the OCR process. The set must contain MBIOcrCharKey objects.

    Default: all chars with all fonts.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSSet<MBIOcrCharKey *> *_Nonnull charWhitelist;

    Swift

    var charWhitelist: Set<MBIOcrCharKey> { get set }