SceneUnderstandingModule

The SceneUnderstandingModule provides access to details about recognition of real objects captured by the camera

Example

//==============================================================================
// The following example demonstrates how to search the camera view for a
// specific real-world object and display a digital object as a result.
//
// Project setup:
// - Insert a plane
//==============================================================================

// Load in the required modules
const Scene = require('Scene');
const SceneUnderstanding = require('SceneUnderstanding');

// Locate the plane in the Scene
const plane = Scene.root.find('plane0');

// Store a reference to the object we want to recognize in the camera view
const chair = SceneUnderstanding.SceneCategories.CHAIR;

// Store a boolean signal reference that will return true when the object is
// found and false otherwise
const foundChair = SceneUnderstanding.category(chair).found;

// Bind the reverse of the foundChair signal to the hidden property of the
// plane, the reverse is used so the plane is shown when the chair is detected
plane.hidden = foundChair.not();

Properties

This module exposes no properties.

Methods

MethodDescription

category

category(category: SceneCategories): SceneCategory

Returns a SceneCategory object capable of identifying if the scene captured by the camera is that category.

Classes

ClassDescription

SceneCategory

The SceneCategory class encapsulates details of recognized real-world objects

Enums

EnumDescription

SceneCategories

The SceneCategories enum lists possible objects that can be recognized in a scene by the SceneUnderstanding module