eduardolundgren / eduardolundgren/tracking-elements
How to destroy object?
- Dominant language
- JavaScript
- Stars
- 72
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
This tracking is totally awesome and I like it.
I have made some initialization just like the example, as follow:
`var tracker = new tracking.ObjectTracker('face');
tracker.setInitialScale(4);
tracker.setStepSize(2);
tracker.setEdgesDensity(0.1);
tracking.track('#video', tracker, { camera: true });
tracker.on('track', function(event) {
context.clearRect(0, 0, canvas.width, canvas.height);
event.data.forEach(function(rect) {
context.strokeStyle = '#a64ceb';
context.strokeRect(rect.x, rect.y, rect.width, rect.height);
context.font = '11px Helvetica';
context.fillStyle = "#fff";
context.fillText('x: ' + rect.x + 'px', rect.x + rect.width + 5, rect.y + 11);
context.fillText('y: ' + rect.y + 'px', rect.x + rect.width + 5, rect.y + 22);
});
});`
But I do not know how to destroy the object so the web app will free some memory used.
Thank you so much.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.