다음을 통해 공유


DetectedPerson Class

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

Implements

public final class DetectedPerson
implements JsonSerializable<DetectedPerson>

Represents a person detected in an image.

Method Summary

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

Reads an instance of DetectedPerson from the JsonReader.

ImageBoundingBox getBoundingBox()

Get the boundingBox property: A rectangular boundary where the person was detected.

double getConfidence()

Get the confidence property: A score, in the range of 0 to 1 (inclusive), representing the confidence that this detection was accurate.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static DetectedPerson fromJson(JsonReader jsonReader)

Reads an instance of DetectedPerson from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DetectedPerson 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.

getBoundingBox

public ImageBoundingBox getBoundingBox()

Get the boundingBox property: A rectangular boundary where the person was detected.

Returns:

the boundingBox value.

getConfidence

public double getConfidence()

Get the confidence property: A score, in the range of 0 to 1 (inclusive), representing the confidence that this detection was accurate. Higher values indicating higher confidence.

Returns:

the confidence value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to