Partilhar via


DetectedTextLine Class

  • java.lang.Object
    • com.azure.ai.vision.imageanalysis.models.DetectedTextLine

Implements

public final class DetectedTextLine
implements JsonSerializable<DetectedTextLine>

Represents a single line of text in the image.

Method Summary

Modifier and Type Method and Description
static DetectedTextLine fromJson(JsonReader jsonReader)

Reads an instance of DetectedTextLine from the JsonReader.

List<ImagePoint> getBoundingPolygon()

Get the boundingPolygon property: A bounding polygon around the text line.

String getText()

Get the text property: Text content of the detected text line.

List<DetectedTextWord> getWords()

Get the words property: A list of words in this line.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static DetectedTextLine fromJson(JsonReader jsonReader)

Reads an instance of DetectedTextLine from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DetectedTextLine if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getBoundingPolygon

public List getBoundingPolygon()

Get the boundingPolygon property: A bounding polygon around the text line. At the moment only quadrilaterals are supported (represented by 4 image points).

Returns:

the boundingPolygon value.

getText

public String getText()

Get the text property: Text content of the detected text line.

Returns:

the text value.

getWords

public List getWords()

Get the words property: A list of words in this line.

Returns:

the words value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to