public static class

Detector.Detections

extends Object
java.lang.Object
   ↳ com.google.android.gms.vision.Detector.Detections<T>

Class Overview

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

Summary

Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Object

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.

Returns
boolean

public SparseArray<T> getDetectedItems ()

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

Returns
SparseArray<T> 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.

Returns
Frame.Metadata