Skip to main content

ARDK for Android/com.nianticlabs.ardk.objectdetection

Package-level declarations

Types​

NameSummary
DetectedObject[androidJvm]
class DetectedObject(val trackingId: Int, val classId: Int, val probability: Float, val left: Float, val right: Float, val top: Float, val bottom: Float)
Represents a single detected object.
ObjectDetectionConfig[androidJvm]
class ObjectDetectionConfig(val frameRate: Int, val framesUntilSeen: Int, val framesUntilDiscarded: Int)
Wrapper for the native ARDK_ObjectDetection_Configuration type.
ObjectDetectionImageParams[androidJvm]
data class ObjectDetectionImageParams(val sourceFrameSize: Size, val modelFrameSize: Size)
Container for information about the camera image input that generated an awareness image, along with the model input size.
ObjectDetectionMetadata[androidJvm]
data class ObjectDetectionMetadata(val awarenessParams: AwarenessImageParams, val imageParams: ObjectDetectionImageParams)
ObjectDetectionResult[androidJvm]
class ObjectDetectionResult(val awarenessParams: AwarenessImageParams, val numDetections: Int, val numClasses: Int, val boundingBoxLocations: FloatArray?, val probabilities: FloatArray?, val trackingIds: IntArray?, val imageParams: ObjectDetectionImageParams)
Wrapper for the native object detection result buffer.
ObjectDetectionSession[androidJvm]
class ObjectDetectionSession : SessionBase<ObjectDetectionSession>
Creates and manages an instance of the Object Detection ARDK feature.

Functions​

NameSummary
height[androidJvm]
fun DetectedObject.height(): Float
Returns the height of this DetectedObject's bounding box.
toDetectedObjects[androidJvm]
fun ObjectDetectionResult.toDetectedObjects(confidenceThreshold: Float = 0.4f): List<DetectedObject>
Converts this ObjectDetectionResult into a list of strongly typed DetectedObject instances.
transformed[androidJvm]
fun DetectedObject.transformed(display: Matrix?, reprojection: Matrix? = null, containerSize: Size, viewportSize: Size): DetectedObject
Transforms this DetectedObject's bounding box from model space into viewport space, using optional reprojection and display matrices.
width[androidJvm]
fun DetectedObject.width(): Float
Returns the width of this DetectedObject's bounding box.