MovementBasedSegmenter
const initializeMBS = () => {};const initializeMBS = () => {
const mbsElement = document.getElementsByClassName('mbs')[0];
const mbsBounds = mbsElement.getBoundingClientRect();
};const initializeMBS = () => {
const mbsElement = document.getElementsByClassName('mbs')[0];
const mbsBounds = mbsElement.getBoundingClientRect();
const onClassification = (classifiedObjects) => classifiedObjects.forEach((classifiedObject) => {
handleObjectClassified(classifiedObject, '#FFFFFF');
});
const onLocation = (locatedObjects) => {
// This step fires before onClassification!
console.log(locatedObjects);
};
const mbsFruitsWatcher = {
name: 'MovementBasedSegmenter',
shape: lampix.helpers.rectangle(
mbsBounds.left,
mbsBounds.top,
mbsBounds.width,
mbsBounds.height
),
params: {
neural_network_name: 'fruits'
},
onLocation,
onClassification
};
};Last updated
Was this helpful?