outline? (Array, Optional): Object with a property of points that describes the contour of the object as a polygon:

metadata? (string, Optional): Watcher specific information

onLocation (Function): Callback used only by watchers that locate first, then classify. Called with a list of located objects that with a similar structure to the one above, except classTag is not mentioned since it has not been determined at the time of this call.

params? (Object): Plain object with arbitrary props that can differ from watcher to watcher. See standard watchers​

Notes

The only required property is classTag. Certain watchers that do not support more than one object at a time (e.g NeuralNetworkClassifier), will always provide a list with one recognized object that only has the classTag property. This is by design, to ensure consistency in the data format returned by the standard watchers.

Example

{

name:'DepthClassifier',

shape:{

type:"rectangle",

data:{

posX:0,

posY:0,

width: window.innerWidth,

height: window.innerHeight

}

},

params:{

frames_until_stable:5

},

onClassification:(objects)=>draw(objects);

}

Tips

In the example above, you can use shape: lampix.helpers.rectangle(0, 0, window.innerWidth, window.innerHeight) to achieve the same result.