ImageAnalysisResult Class

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

Implements

public final class ImageAnalysisResult
implements JsonSerializable<ImageAnalysisResult>

Represents the outcome of an Image Analysis operation.

Method Summary

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

Reads an instance of ImageAnalysisResult from the JsonReader.

CaptionResult getCaption()

Get the caption property: The generated phrase that describes the content of the analyzed image.

DenseCaptionsResult getDenseCaptions()

Get the denseCaptions property: The up to 10 generated phrases, the first describing the content of the whole image, and the others describing the content of different regions of the image.

ImageMetadata getMetadata()

Get the metadata property: Metadata associated with the analyzed image.

String getModelVersion()

Get the modelVersion property: The cloud AI model used for the analysis.

ObjectsResult getObjects()

Get the objects property: A list of detected physical objects in the analyzed image, and their location.

PeopleResult getPeople()

Get the people property: A list of detected people in the analyzed image, and their location.

ReadResult getRead()

Get the read property: The extracted printed and hand-written text in the analyze image.

SmartCropsResult getSmartCrops()

Get the smartCrops property: A list of crop regions at the desired as aspect ratios (if provided) that can be used as image thumbnails.

TagsResult getTags()

Get the tags property: A list of content tags in the analyzed image.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static ImageAnalysisResult fromJson(JsonReader jsonReader)

Reads an instance of ImageAnalysisResult from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getCaption

public CaptionResult getCaption()

Get the caption property: The generated phrase that describes the content of the analyzed image.

Returns:

the caption value.

getDenseCaptions

public DenseCaptionsResult getDenseCaptions()

Get the denseCaptions property: The up to 10 generated phrases, the first describing the content of the whole image, and the others describing the content of different regions of the image.

Returns:

the denseCaptions value.

getMetadata

public ImageMetadata getMetadata()

Get the metadata property: Metadata associated with the analyzed image.

Returns:

the metadata value.

getModelVersion

public String getModelVersion()

Get the modelVersion property: The cloud AI model used for the analysis.

Returns:

the modelVersion value.

getObjects

public ObjectsResult getObjects()

Get the objects property: A list of detected physical objects in the analyzed image, and their location.

Returns:

the objects value.

getPeople

public PeopleResult getPeople()

Get the people property: A list of detected people in the analyzed image, and their location.

Returns:

the people value.

getRead

public ReadResult getRead()

Get the read property: The extracted printed and hand-written text in the analyze image. Also knows as OCR.

Returns:

the read value.

getSmartCrops

public SmartCropsResult getSmartCrops()

Get the smartCrops property: A list of crop regions at the desired as aspect ratios (if provided) that can be used as image thumbnails. These regions preserve as much content as possible from the analyzed image, with priority given to detected faces.

Returns:

the smartCrops value.

getTags

public TagsResult getTags()

Get the tags property: A list of content tags in the analyzed image.

Returns:

the tags value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to