MLKitTextRecognitionCommon Framework 參考資料

MLKTextLine


@interface MLKTextLine : NSObject

圖片中可識別的文字行,其中包含元素陣列。

  • 所辨識文字行的字串表示法。

    聲明

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull text;
  • 組成線條的文字元素陣列。

    聲明

    Objective-C

    @property (nonatomic, readonly) NSArray<MLKTextElement *> *_Nonnull elements;
  • 此矩形內含在預設座標空間中,與圖片相關的文字線。

    聲明

    Objective-C

    @property (nonatomic, readonly) CGRect frame;
  • 文字行中可辨識的語言陣列。如果系統無法辨識語言,陣列會留空。

    聲明

    Objective-C

    @property (nonatomic, readonly) NSArray<MLKTextRecognizedLanguage *> *_Nonnull recognizedLanguages;
  • 文字線條的四個角點,從左上角開始 (相對於預設座標空間中的圖片)。NSValue 物件為 CGPoint

    聲明

    Objective-C

    @property (nonatomic, readonly) NSArray<NSValue *> *_Nonnull cornerPoints;
  • 無法使用,

    聲明

    Objective-C

    - (nonnull instancetype)init;