Detector.Detections

public static class Detector.Detections extends Object

Detection result object containing both detected items and the associated frame metadata.

Public Method Summary

boolean
detectorIsOperational()
Returns true if the detector is operational, false if it is not operational.
SparseArray<T>
getDetectedItems()
Returns a collection of the detected items that were identified in the frame.
Frame.Metadata
getFrameMetadata()
Returns the metadata of the associated frame in which the detection originated.

Inherited Method Summary

Public Methods

public boolean detectorIsOperational ()

Returns true if the detector is operational, false if it is not operational. In the non-operational case, the detector will return no results.

A detector may be non-operational for a while when starting an app for the first time, if a download is required to obtain the associated library and model files required to do detection.

public SparseArray<T> getDetectedItems ()

Returns a collection of the detected items that were identified in the frame.

Returns
  • mapping of int to detected object, where the int domain represents the consistent tracking ID of the associated item. As the same object is detected in consecutive frames, the detector will return the same ID for that item.

public Frame.Metadata getFrameMetadata ()

Returns the metadata of the associated frame in which the detection originated.