Giter VIP home page Giter VIP logo

jstracking's Introduction

jstracking

The jstracking library is created based on tracking.js library, which is a JavaScript library bringing different computer vision algorithms and techniques into the browser environment.

While, the original tracking.js library is not written in CommonJS or ES6 modules, which leads to difficulty in using the library in modern ES6 and Node.js development. The jstracking library solves the problem by rewriting the tracking.js library in CommonJS modules, so it is totally npm compatible, and can also be used by Node.js programs. Additionally, all of the tracking.js APIs are kept, so it's very simple to upgrade any code using tracking.js: just replace tracking(-min).js file.

Install

Install via npm, or download as a zip:

npm install jstracking

Usage

If tracking(-min).js is embedded in HTML, the usage of jstracking is the same as that of tracking.js.

For ES6 or CommonJS modules, an example of usage is shown below.

import tracking from 'jstracking';  // ES6
// Or
// const tracking = require('jstracking');  // CommonJS

const tracker = new tracking.ObjectTracker('face');
tracker.setInitialScale(4);
tracker.setStepSize(2);
tracker.setEdgesDensity(0.1);

tracking.track('#video', tracker, {
    camera: true,
    fps: 10,
    scaled: true
});

tracker.on('track', event => {
    // handle event...
});

APIs

The tracking.js library APIs are all kept, so you can refer to documentation of tracking.js for details.

New Features

  • Written in CommonJS modules.
  • Auto-scaling option to boost performance, especially for large videos/images.
  • FPS option to set tracking count in one second.

License

The MIT License
Copyright (c) 2017 Joshua Tang

jstracking's People

Contributors

chunxutang avatar joshuatang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.