{"_id":"headtrackr","_rev":"8-97ba358accf277efe7ff0c0ef1f6ab90","name":"headtrackr","description":"headtracking via webcam and WebRTC/getUserMedia","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"headtrackr","description":"headtracking via webcam and WebRTC/getUserMedia","tags":["webcam","headtracking"],"version":"0.0.1","author":{"name":"Audun Mathias Øygard"},"repository":{"type":"git","url":"https://github.com/auduno/headtrackr.git"},"bugs":"https://github.com/auduno/headtrackr/issues","main":"headtrackr.js","readme":"headtrackr\n==========\n\n**headtrackr** is a javascript library for real-time *face tracking* and *head tracking*, tracking the position of a users head in relation to the computer screen, via a web camera and the [webRTC](http://www.webrtc.org/)/[getUserMedia](http://dev.w3.org/2011/webrtc/editor/getusermedia.html) standard.\n\nFor a demonstration see [this video](https://vimeo.com/44049736) or try out some of the examples with a laptop that has a camera and a browser that has camera webRTC/getUserMedia support (for instance [Opera 12](http://www.opera.com/browser/)). For an overview of browsers supporting the getUserMedia standard see [http://caniuse.com/stream](http://caniuse.com/stream).\n\n[Reference](http://auduno.github.com/headtrackr/documentation/reference.html) - [Overview](http://auduno.tumblr.com/post/25125149521/head-tracking-with-webrtc)\n\n### Examples ###\n\n[![facetracking](http://auduno.github.com/headtrackr/examples/media/facetracking_thumbnail.png)](http://auduno.github.com/headtrackr/examples/facetracking.html)\n[![sprites](http://auduno.github.com/headtrackr/examples/media/sprites_thumbnail.png)](http://auduno.github.com/headtrackr/examples/sprites_canvas.html)\n[![facekat](http://auduno.github.com/headtrackr/examples/media/facekat_thumbnail.png)](http://www.shinydemos.com/facekat/)\n[![targets](http://auduno.github.com/headtrackr/examples/media/targets_thumbnail.png)](http://auduno.github.com/headtrackr/examples/targets.html)\n\n### Usage ###\n\nDownload the minified library [headtrackr.js](https://github.com/auduno/headtrackr/raw/master/headtrackr.js) and include it in your webpage.\n\n```html\n<script src=\"js/headtrackr.js\"></script>\n```\n\nThe following code initiates the headtrackr with a video element which will be used for the mediastream, and a canvas element we will copy the videoframes to.\n\n```html\n<canvas id=\"inputCanvas\" width=\"320\" height=\"240\" style=\"display:none\"></canvas>\n<video id=\"inputVideo\" autoplay loop></video>\n<script type=\"text/javascript\">\n  var videoInput = document.getElementById('inputVideo');\n  var canvasInput = document.getElementById('inputCanvas');\n  \n  var htracker = new headtrackr.Tracker();\n  htracker.init(videoInput, canvasInput);\n  htracker.start();\n</script>\n```\n\nWhen the headtracker is started, this will now regularly generate the events *headtrackingEvent* and *facetrackingEvent* on the document. The event *headtrackingEvent* has the attributes *x*, *y*, *z*, which tells us the estimated position of the users head in relation to the center of the screen, in centimeters. The event *facetrackingEvent* has the attributes *x*, *y*, *width*, *height* and *angle*, which tell us the estimated position and size of the face on the video.\n\nYou can now either create an eventlistener to handle these events somehow, or, if you're using [three.js](https://github.com/mrdoob/three.js/), try to use one of the pre-packaged controllers in this library to create pseudo-3D, aka [head-coupled perspective](http://en.wikipedia.org/wiki/Head-coupled_perspective) effects.\n\nTo get some more idea about usage look at the source code for the examples above, [this overview](http://auduno.tumblr.com/post/25125149521/head-tracking-with-webrtc), or [the reference](http://auduno.github.com/headtrackr/documentation/reference.html).\n\n### Projects that have used headtrackr ###\n\n[![movembergames](http://auduno.github.com/headtrackr/examples/media/movembergames_thumbnail.png)](http://movembergames.com)\n[![street-facing](http://auduno.github.com/headtrackr/examples/media/street-facing_thumbnail.jpg)](https://github.com/alexhancock/street-facing)\n\n## Building from source\n\nMake sure you have grunt installed\n\n```npm install -g grunt```\n\nAnd build\n\n```grunt```\n\n\n\n### License ###\n\nHeadtrackr.js is distributed under the [MIT License](http://www.opensource.org/licenses/MIT), and includes some code bits (courtesy [Liu Liu](https://github.com/liuliu) and Benjamin Jung) that are under the [BSD-3 License](http://www.opensource.org/licenses/BSD-3-Clause) and the [MIT License](http://www.opensource.org/licenses/MIT) respectively.","_id":"headtrackr@0.0.1","dist":{"shasum":"2b98962eed45c3505e413671f7f43359e4fa67cb","tarball":"https://registry.npmjs.org/headtrackr/-/headtrackr-0.0.1.tgz","integrity":"sha512-M6K4402KLyp6UxnmOhVXKox9kcZy0JafEqexeoXCppP99OD69Fg8k0Mwa6BaELu+/ZxLfGOn1dDy1Iz14ADyUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEtTHMFci68Ux5nZbVsCKcLe1y1+IAg5DP3KwXlNwTm0AiA4yodWACc3PT0Qz8QT+jR7P8COYz5rAg638P330V6pZQ=="}]},"maintainers":[{"name":"eckoit","email":"ryan.ramage@gmail.com"}],"directories":{}}},"readme":"headtrackr\n==========\n\n**headtrackr** is a javascript library for real-time *face tracking* and *head tracking*, tracking the position of a users head in relation to the computer screen, via a web camera and the [webRTC](http://www.webrtc.org/)/[getUserMedia](http://dev.w3.org/2011/webrtc/editor/getusermedia.html) standard.\n\nFor a demonstration see [this video](https://vimeo.com/44049736) or try out some of the examples with a laptop that has a camera and a browser that has camera webRTC/getUserMedia support (for instance [Opera 12](http://www.opera.com/browser/)). For an overview of browsers supporting the getUserMedia standard see [http://caniuse.com/stream](http://caniuse.com/stream).\n\n[Reference](http://auduno.github.com/headtrackr/documentation/reference.html) - [Overview](http://auduno.tumblr.com/post/25125149521/head-tracking-with-webrtc)\n\n### Examples ###\n\n[![facetracking](http://auduno.github.com/headtrackr/examples/media/facetracking_thumbnail.png)](http://auduno.github.com/headtrackr/examples/facetracking.html)\n[![sprites](http://auduno.github.com/headtrackr/examples/media/sprites_thumbnail.png)](http://auduno.github.com/headtrackr/examples/sprites_canvas.html)\n[![facekat](http://auduno.github.com/headtrackr/examples/media/facekat_thumbnail.png)](http://www.shinydemos.com/facekat/)\n[![targets](http://auduno.github.com/headtrackr/examples/media/targets_thumbnail.png)](http://auduno.github.com/headtrackr/examples/targets.html)\n\n### Usage ###\n\nDownload the minified library [headtrackr.js](https://github.com/auduno/headtrackr/raw/master/headtrackr.js) and include it in your webpage.\n\n```html\n<script src=\"js/headtrackr.js\"></script>\n```\n\nThe following code initiates the headtrackr with a video element which will be used for the mediastream, and a canvas element we will copy the videoframes to.\n\n```html\n<canvas id=\"inputCanvas\" width=\"320\" height=\"240\" style=\"display:none\"></canvas>\n<video id=\"inputVideo\" autoplay loop></video>\n<script type=\"text/javascript\">\n  var videoInput = document.getElementById('inputVideo');\n  var canvasInput = document.getElementById('inputCanvas');\n  \n  var htracker = new headtrackr.Tracker();\n  htracker.init(videoInput, canvasInput);\n  htracker.start();\n</script>\n```\n\nWhen the headtracker is started, this will now regularly generate the events *headtrackingEvent* and *facetrackingEvent* on the document. The event *headtrackingEvent* has the attributes *x*, *y*, *z*, which tells us the estimated position of the users head in relation to the center of the screen, in centimeters. The event *facetrackingEvent* has the attributes *x*, *y*, *width*, *height* and *angle*, which tell us the estimated position and size of the face on the video.\n\nYou can now either create an eventlistener to handle these events somehow, or, if you're using [three.js](https://github.com/mrdoob/three.js/), try to use one of the pre-packaged controllers in this library to create pseudo-3D, aka [head-coupled perspective](http://en.wikipedia.org/wiki/Head-coupled_perspective) effects.\n\nTo get some more idea about usage look at the source code for the examples above, [this overview](http://auduno.tumblr.com/post/25125149521/head-tracking-with-webrtc), or [the reference](http://auduno.github.com/headtrackr/documentation/reference.html).\n\n### Projects that have used headtrackr ###\n\n[![movembergames](http://auduno.github.com/headtrackr/examples/media/movembergames_thumbnail.png)](http://movembergames.com)\n[![street-facing](http://auduno.github.com/headtrackr/examples/media/street-facing_thumbnail.jpg)](https://github.com/alexhancock/street-facing)\n\n## Building from source\n\nMake sure you have grunt installed\n\n```npm install -g grunt```\n\nAnd build\n\n```grunt```\n\n\n\n### License ###\n\nHeadtrackr.js is distributed under the [MIT License](http://www.opensource.org/licenses/MIT), and includes some code bits (courtesy [Liu Liu](https://github.com/liuliu) and Benjamin Jung) that are under the [BSD-3 License](http://www.opensource.org/licenses/BSD-3-Clause) and the [MIT License](http://www.opensource.org/licenses/MIT) respectively.","maintainers":[{"name":"eckoit","email":"ryan.ramage@gmail.com"}],"time":{"modified":"2022-06-18T19:45:01.259Z","created":"2013-01-26T00:52:41.900Z","0.0.1":"2013-01-26T00:52:43.306Z"},"author":{"name":"Audun Mathias Øygard"},"repository":{"type":"git","url":"https://github.com/auduno/headtrackr.git"},"users":{"latrokles":true,"lagora":true,"ycjcl868":true}}