MBOcrBlock

Objective-C


@interface MBOcrBlock : NSObject

Swift

class MBOcrBlock : NSObject

Class representing an Ocr Block. Block consists of one or more Ocr Lines.

See

MBOcrLine
  • Ocr lines of the block

    Declaration

    Objective-C

    @property (nonatomic) NSArray<MBOcrLine *> *_Nonnull lines;

    Swift

    var lines: [MBOcrLine] { get set }
  • Position of the block on the image, in the coordinate system of the image

    Declaration

    Objective-C

    @property (nonatomic) MBPosition *_Nonnull position;

    Swift

    var position: MBPosition { get set }
  • Unavailable

    Please use designated initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Initializer from lines

    Declaration

    Objective-C

    - (nonnull instancetype)initWithOcrLines:
                                (nonnull NSArray<MBOcrLine *> *)ocrLines
                                    position:(nonnull MBPosition *)position;

    Swift

    init(ocrLines: [MBOcrLine], position: MBPosition)

    Parameters

    ocrLines

    ocr lines

    position

    position of the block on image

    Return Value

    initialized ocr block

  • Helper method which returna a simple string representation of the ocr block

    Declaration

    Objective-C

    - (nonnull NSString *)string;

    Swift

    func string() -> String

    Return Value

    ocr block converted to string