Code Monkey home page Code Monkey logo

js-handtracking's Introduction

JavaScript library for hand tracking applications featuring:

  • Skin detection
  • Erode / Dilate operations
  • Contour extraction
  • Contour optimization
  • Convex Hull calculation
  • Convexity Defects calculation

Demo

Basic Demo, webcam basic demo

Fast Demo, erode and dilate operations are disabled

Video

js-handtracking

Usage

Create one HT.Tracker object:

var tracker = new HT.Tracker();

Call detect function:

var candidate = tracker.detect(imageData);

imageData argument must be a valid ImageData canvas object.

candidate result (if any) will be a HT.Candidate object with the following properties:

  • contour: Optimized contour as a plain array of two dimensional vectors
  • hull: Convex hull as a plain array of two dimensional vectors
  • defects: Convexity defects as a plain array of objects

defects objects have the following properties:

  • start: Start point of hull segment as a two dimensional vector
  • end: End point of hull segment as a two dimensional vector
  • depthPoint: Deeper defect point as a two dimensional vector
  • depth: Minimum distance from hull segment to deeper defect point

Skin detection

The library converts RGB images to HSV one. V and H channels are used to characterize the colors range for skin detection:

v >= 15 and v <= 250

h >= 3 and h <= 33

Note that source alpha channel is ignored.

js-handtracking's People

Contributors

jcmellado avatar

Watchers

James Cloos avatar Joe Young 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.