HairProperties Class

  • java.lang.Object
    • com.azure.ai.vision.face.models.HairProperties

Implements

public final class HairProperties
implements JsonSerializable<HairProperties>

Properties describing hair attributes.

Method Summary

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

Reads an instance of HairProperties from the JsonReader.

double getBald()

Get the bald property: A number describing confidence level of whether the person is bald.

List<HairColor> getHairColor()

Get the hairColor property: An array of candidate colors and confidence level in the presence of each.

boolean isInvisible()

Get the invisible property: A boolean value describing whether the hair is visible in the image.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static HairProperties fromJson(JsonReader jsonReader)

Reads an instance of HairProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getBald

public double getBald()

Get the bald property: A number describing confidence level of whether the person is bald.

Returns:

the bald value.

getHairColor

public List<HairColor> getHairColor()

Get the hairColor property: An array of candidate colors and confidence level in the presence of each.

Returns:

the hairColor value.

isInvisible

public boolean isInvisible()

Get the invisible property: A boolean value describing whether the hair is visible in the image.

Returns:

the invisible value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to