MBPOcrBlock

Objective-C


@interface MBPOcrBlock : NSObject

Swift

class MBPOcrBlock : NSObject

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

See

MBPOcrLine
  • Ocr lines of the block

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic) MBPPosition *_Nonnull position;

    Swift

    var position: MBPPosition { get set }
  • Unavailable

    Please use designated initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Initializer from lines

    Declaration

    Objective-C

    - (nonnull instancetype)initWithOcrLines:
                                (nonnull NSArray<MBPOcrLine *> *)ocrLines
                                    position:(nonnull MBPPosition *)position;

    Swift

    init(ocrLines: [MBPOcrLine], position: MBPPosition)

    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