目录

MLDocument

Class Info

com.huawei.hms.mlsdk.document.MLDocument

表示图像检测出的文档信息。包含两个属性:
  • 图像中检测到的所有文本内容。
  • 图像中检测到的所有文本区块,包含文本内容、文本区块边界和语种等信息。

Public Method Summary

Qualifier and Type

Method Name and Description

List<MLDocument.Block>

getBlocks()

获取图像中检测到的所有文本区块。

String

getStringValue()

获取图像中检测到的所有文本内容。

Public Methods

[h2]getBlocks()

Method

public List<MLDocument.Block> getBlocks()

获取图像中检测到的所有文本区块,包含段落、文字、区块边界和语种等信息。

Return

Type

Description

List<MLDocument.Block>

返回文本区块列表。

[h2]getStringValue()

Method

public String getStringValue()

获取图像中检测到的所有文本内容。

Return

Type

Description

String

返回文本内容。