ImageLabel

public class ImageLabel extends Object

Represents an image label detected by ImageLabeler.

Public Method Summary

boolean
equals(Object o)
Indicates whether some other object is "equal to" this one.
float
getConfidence()
Gets the confidence of this label.
int
getIndex()
Gets the index of this label.
String
getText()
Gets the text of this label.
int
hashCode()
Returns a hash code value for the object.
String

Inherited Method Summary

Public Methods

public boolean equals (Object o)

Indicates whether some other object is "equal to" this one.

public float getConfidence ()

Gets the confidence of this label.

The range of this confidence depends on the classifier model used, but by convention it should be [0.0f, 1.0f].

For an ImageLabeler created with ImageLabelerOptions, the range is [0.0f, 1.0f].

public int getIndex ()

Gets the index of this label.

The index maps to the detected label in the entire label map of the corresponding model.

Indexes can be used as unique identifiers to match detected labels instead of super long label names.

public String getText ()

Gets the text of this label.

The text returned here depends on the classifier model used.

public int hashCode ()

Returns a hash code value for the object.

public String toString ()