Emotion Class

  • java.lang.Object
    • com.microsoft.azure.cognitiveservices.vision.faceapi.models.Emotion

public class Emotion

Properties describing facial emotion in form of confidence ranging from 0 to 1.

Method Summary

Modifier and Type Method and Description
double anger()

Get the anger value.

double contempt()

Get the contempt value.

double disgust()

Get the disgust value.

double fear()

Get the fear value.

double happiness()

Get the happiness value.

double neutral()

Get the neutral value.

double sadness()

Get the sadness value.

double surprise()

Get the surprise value.

Emotion withAnger(double anger)

Set the anger value.

Emotion withContempt(double contempt)

Set the contempt value.

Emotion withDisgust(double disgust)

Set the disgust value.

Emotion withFear(double fear)

Set the fear value.

Emotion withHappiness(double happiness)

Set the happiness value.

Emotion withNeutral(double neutral)

Set the neutral value.

Emotion withSadness(double sadness)

Set the sadness value.

Emotion withSurprise(double surprise)

Set the surprise value.

Method Details

anger

public double anger()

Get the anger value.

Returns:

the anger value

contempt

public double contempt()

Get the contempt value.

Returns:

the contempt value

disgust

public double disgust()

Get the disgust value.

Returns:

the disgust value

fear

public double fear()

Get the fear value.

Returns:

the fear value

happiness

public double happiness()

Get the happiness value.

Returns:

the happiness value

neutral

public double neutral()

Get the neutral value.

Returns:

the neutral value

sadness

public double sadness()

Get the sadness value.

Returns:

the sadness value

surprise

public double surprise()

Get the surprise value.

Returns:

the surprise value

withAnger

public Emotion withAnger(double anger)

Set the anger value.

Parameters:

anger - the anger value to set

Returns:

the Emotion object itself.

withContempt

public Emotion withContempt(double contempt)

Set the contempt value.

Parameters:

contempt - the contempt value to set

Returns:

the Emotion object itself.

withDisgust

public Emotion withDisgust(double disgust)

Set the disgust value.

Parameters:

disgust - the disgust value to set

Returns:

the Emotion object itself.

withFear

public Emotion withFear(double fear)

Set the fear value.

Parameters:

fear - the fear value to set

Returns:

the Emotion object itself.

withHappiness

public Emotion withHappiness(double happiness)

Set the happiness value.

Parameters:

happiness - the happiness value to set

Returns:

the Emotion object itself.

withNeutral

public Emotion withNeutral(double neutral)

Set the neutral value.

Parameters:

neutral - the neutral value to set

Returns:

the Emotion object itself.

withSadness

public Emotion withSadness(double sadness)

Set the sadness value.

Parameters:

sadness - the sadness value to set

Returns:

the Emotion object itself.

withSurprise

public Emotion withSurprise(double surprise)

Set the surprise value.

Parameters:

surprise - the surprise value to set

Returns:

the Emotion object itself.

Applies to