Represents an object detected by ObjectDetector
.
Nested Class Summary
class | DetectedObject.Label | Represents an image label of a detected object. |
Public Method Summary
boolean | |
Rect |
getBoundingBox()
Gets the axis-aligned bounding rectangle of the detected object.
|
List<DetectedObject.Label> |
getLabels()
Returns a list of
DetectedObject.Label
for the detected object, when classification is enabled.
|
Integer |
getTrackingId()
Gets the tracking ID of the object.
|
int |
hashCode()
Returns a hash code value for the object.
|
Inherited Method Summary
Public Methods
public boolean equals (Object o)
Indicates whether some other object is "equal to" this one.
public Rect getBoundingBox ()
Gets the axis-aligned bounding rectangle of the detected object.
public List<DetectedObject.Label> getLabels ()
Returns a list of DetectedObject.Label
for the detected object, when classification is enabled.
The labels are returned sorted by confidence in descending order.
An empty list will be returned if classification is not enabled or there isn't any label with a confidence score greater than the threshold.
public Integer getTrackingId ()
Gets the tracking ID of the object.
The ID is a non-negative number in
ObjectDetectorOptionsBase.STREAM_MODE
and null
in
ObjectDetectorOptionsBase.SINGLE_IMAGE_MODE
.
public int hashCode ()
Returns a hash code value for the object.