Skip to main content

Class: DetectedObject

Defined in: src/world/objects/DetectedObject.ts:8

Represents a single detected object in the XR environment and holds metadata about the object's properties. Note: 3D object position is stored in the position property of Three.Object3D.

Extends

Indexable

[key: string]: any

Allows for additional, dynamic properties to be added to the object, as defined in the schema in ObjectsOptions.

Constructors

Constructor

new DetectedObject(label, image, boundingBox, additionalData): DetectedObject

Defined in: src/world/objects/DetectedObject.ts:42

Parameters

label

string

The semantic label of the object.

image

The base64 encoded cropped image of the object.

null | string

boundingBox

Box2

The 2D bounding box.

additionalData

A key-value map of additional properties from the detector. This includes any object proparties that is requested through the schema but is not assigned a class property by default (e.g., color, size).

Returns

DetectedObject

Overrides

THREE.Object3D.constructor

Properties

detection2DBoundingBox

detection2DBoundingBox: Box2

Defined in: src/world/objects/DetectedObject.ts:25

The 2D bounding box of the detected object in normalized screen coordinates. Values are between 0 and 1. Centerpoint of this bounding is used for backproject to obtain 3D object position (i.e., this.position).


image

image: null | string

Defined in: src/world/objects/DetectedObject.ts:18

The cropped part of the image that contains the object, as a base64 Data URL.


label

label: string

Defined in: src/world/objects/DetectedObject.ts:12

A semantic label for the object (e.g., 'chair', 'table').