MBOcrEngineOptions


@interface MBOcrEngineOptions : MBBaseOcrEngineOptions <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 MBOcrEngineOptions with default settings.

    Declaration

    Objective-C

    - (nonnull instancetype)init;

    Swift

    init()
  • Type of document scanned.

    Default: PPBlinkOCRDocumentType

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) PPDocumentType documentType;

    Swift

    var documentType: PPDocumentType { 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 (assign, readwrite, nonatomic) NSUInteger minimalLineHeight;

    Swift

    var minimalLineHeight: UInt { 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 (assign, readwrite, nonatomic) NSUInteger maximalLineHeight;

    Swift

    var maximalLineHeight: UInt { 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 (assign, readwrite, nonatomic) BOOL imageProcessingEnabled;

    Swift

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

    Default: all chars with all fonts.

    Declaration

    Objective-C

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

    Swift

    var charWhitelist: Set<MBOcrCharKey> { get set }