Create a watcher object prepared to be used as a button using the standard neural network and watcher name for finger recognition.
Returns
(Watcher): Plain object descriptor for a watcher ready to be registered.
Example
NOTE that all of the ways to create a button specified below are equivalent.
import lampix from'@lampix/core';constcallback= ([recognizedObject]) => {if (Number(recognizedObject.classTag) ===1) {console.log('yay!'); } else {console.log('nay!'); }};// Showcasing how to do it the hard way firstconstdoingThingsTheHardWay= { name:'NeuralNetworkClassifier', shape: { type:'rectangle', data: { posX:50, posY:50, width:50 height: 50 } }, onClassification: callback, params: { neural_network_name:'fingers' }};// And the easy way afterconstdoingThingsTheEasyWay=lampix.presets.button(50,50, callback);// Specifying width and height as wellconstanotherEasyWatcher=lampix.presets.button(50,50, callback, { width:50, height:50});