目录

MLDocument

Class Info

com.huawei.hms.mlsdk.document.MLDocument

Represents the document information detected in an image. Two attributes are included:
  • All text content detected in an image
  • All text blocks detected in an image, including the text content, text block bounding box, and language

Public Method Summary

Qualifier and Type

Method Name and Description

List<MLDocument.Block>

getBlocks()

Obtains all text blocks detected in an image.

String

getStringValue()

Obtains all text content detected in an image.

Public Methods

[h2]getBlocks()

Method

public List<MLDocument.Block> getBlocks()

Obtains all text blocks detected in an image, including the section, text, text block bounding box, and language.

Return

Type

Description

List<MLDocument.Block>

A list of text blocks.

[h2]getStringValue()

Method

public String getStringValue()

Obtains all text content detected in an image.

Return

Type

Description

String

Text content.