MBCOcrBlock


@interface MBCOcrBlock : NSObject

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

See

MBCOcrLine
  • Ocr lines of the block

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        NSArray<MBCOcrLine *> *_Nonnull lines;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        MBCPosition *_Nonnull position;

    Swift

    var position: MBCPosition { get set }
  • Unavailable

    Please use designated initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Initializer from lines

    Declaration

    Objective-C

    - (nonnull instancetype)initWithOcrLines:
                                (nonnull NSArray<MBCOcrLine *> *)ocrLines
                                    position:(nonnull MBCPosition *)position;

    Swift

    init(ocrLines: [MBCOcrLine], position: MBCPosition)

    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