@cloud-annotations/object-tracking

0.0.5 • Public • Published

Object Tracking JavaScript SDK

Simple object tracking in js

Installation

npm install @cloud-annotations/object-tracking

Usage

import objectTracker from '@cloud-annotations/object-tracking'

const frame1 = document.getElementById('img1')
const frame2 = document.getElementById('img2')
const frame3 = document.getElementById('img3')
//    ...
const frameN = document.getElementById('imgN')

const tracker = objectTracker.init(frame1, [x, y, width, height])
const box2 = await tracker.next(frame2)
const box3 = await tracker.next(frame3)
//    ...
const boxN = await tracker.next(frameN)

// box =>
[x, y, width, height]

Usage via Script Tag

<script src="https://cdn.jsdelivr.net/npm/@cloud-annotations/object-tracking"></script>

Package Sidebar

Install

npm i @cloud-annotations/object-tracking

Weekly Downloads

2

Version

0.0.5

License

MIT

Unpacked Size

1.77 MB

Total Files

7

Last publish

Collaborators

  • bourdakos1