Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Augmented Reality.js
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Eduardo Lundgren
November 20, 2013
Technology
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Augmented Reality.js
Eduardo Lundgren
November 20, 2013
Transcript
80 slides
augmented reality.js JS.everywhere, 2013 Friday, October 25, 13
@eduardolundgren Friday, October 25, 13
I’m from brazil Friday, October 25, 13
Friday, October 25, 13
I — JavaScript Friday, October 25, 13
jQuery jQueryUI YUI3 Liferay tracking.js AlloyUI jQuery Simulate nodegh Friday,
October 25, 13
jQuery jQueryUI YUI3 Liferay tracking.js AlloyUI jQuery Simulate nodegh Friday,
October 25, 13
jQuery jQueryUI YUI3 Liferay tracking.js AlloyUI jQuery Simulate nodegh Friday,
October 25, 13
jQuery jQueryUI YUI3 Liferay tracking.js AlloyUI jQuery Simulate nodegh Friday,
October 25, 13
jQuery jQueryUI YUI3 Liferay tracking.js AlloyUI jQuery Simulate nodegh Friday,
October 25, 13
jQuery jQueryUI YUI3 Liferay tracking.js AlloyUI jQuery Simulate nodegh Friday,
October 25, 13
jQuery jQueryUI YUI3 Liferay tracking.js AlloyUI jQuery Simulate nodegh Friday,
October 25, 13
jQuery jQueryUI YUI3 Liferay tracking.js AlloyUI jQuery Simulate nodegh Friday,
October 25, 13
jQuery jQueryUI YUI3 Liferay tracking.js AlloyUI jQuery Simulate nodegh Friday,
October 25, 13
today we’re going to talk about augmented reality... Friday, October
25, 13
Friday, October 25, 13
...and how to integrate different HTML5 APIs Friday, October 25,
13
augmented reality is everywhere Friday, October 25, 13
first head-mounted display Friday, October 25, 13
google glass Friday, October 25, 13
what is augmented reality? Friday, October 25, 13
terminator Friday, October 25, 13
terminator Friday, October 25, 13
what is visual tracking? Friday, October 25, 13
visual tracking Friday, October 25, 13
how can you do it using JavaScript? Friday, October 25,
13
1. capture webcam Friday, October 25, 13
Friday, October 25, 13
dev.w3.org/2011/webrtc/editor/webrtc.html Friday, October 25, 13
Friday, October 25, 13
navigator.getUserMedia({ video: true, audio: true }, onSuccess, onFail); STEP 1
Access user's camera Friday, October 25, 13
2. play the captured video Friday, October 25, 13
Friday, October 25, 13
STEP 2 Play webcam's content into a video element function
onSuccess(stream) { var video = document.querySelector('video'); video.src = window.URL.createObjectURL(stream); video.onloadedmetadata = function(e) { // Ready }; } Friday, October 25, 13
3. track a pattern of pixels Friday, October 25, 13
Friday, October 25, 13
Friday, October 25, 13
Friday, October 25, 13
javascript typed arrays Friday, October 25, 13
“Study the past if you would define the future” -
Confucius Friday, October 25, 13
fiducial markers Friday, October 25, 13
hitl.washington.edu/artoolkit Friday, October 25, 13
github.com/kig/JSARToolKit Friday, October 25, 13
soundstep.com/blog/experiments/jstracking/ Friday, October 25, 13
soundstep.com/blog/experiments/jstracking/ Friday, October 25, 13
bit.ly/XR0aGH Friday, October 25, 13
bit.ly/XR0aGH Friday, October 25, 13
what was the problem? Friday, October 25, 13
trackingjs.com Friday, October 25, 13
eduardo.io/3F0d360z2q1P Friday, October 25, 13
tracking.js features Friday, October 25, 13
Friday, October 25, 13
Friday, October 25, 13
eduardo.io/23033L0Q1i3z Friday, October 25, 13
eduardo.io/23033L0Q1i3z Friday, October 25, 13
STEP 1 COLOR TRACKING Import tracking.js core <script src="tracking.js"></script> Import
tracking.js color module <script src="tracker/color.js"></script> Friday, October 25, 13
STEP 2 COLOR TRACKING Gets user's camera and renders it
var videoCamera = new tracking .VideoCamera() .render(); Friday, October 25, 13
STEP 3 COLOR TRACKING Register tracking for yellow color videoCamera.track({
type: 'color', color: 'yellow', onFound: function() {}, onNotFound: function() {} }); Friday, October 25, 13
STEP 4 COLOR TRACKING Paint all detected pixels onFound: function(track)
{ var pixels = track.pixels, ctx = videoCamera.canvas.context; for (var i = 0, len = pixels.length; i < len; i += 2) { ctx.fillStyle = "rgb(255,0,255)"; ctx.fillRect(pixels[i], pixels[i+1], 2, 2); } ctx.fillStyle = "rgb(0,0,0)"; ctx.fillRect(track.x, track.y, 5, 5); } Friday, October 25, 13
Friday, October 25, 13
eduardo.io/233C2J0Q3z0U Friday, October 25, 13
eduardo.io/233C2J0Q3z0U Friday, October 25, 13
STEP 1 FACE DETECTION Register human tracking for frontal face
videoCamera.track({ type: 'human', data: 'frontal_face', onFound: function() {}, onNotFound: function() {} }); Friday, October 25, 13
STEP 2 FACE DETECTION Paint all detected faces rectangles onFound:
function(track) { for (var i = 0, len = track.length; i < len; i++) { var rect = track[i]; ctx.strokeStyle = "rgb(0,255,0)"; ctx.strokeRect( rect.x, rect.y, rect.size, rect.size); } } Friday, October 25, 13
real world examples Friday, October 25, 13
github.com/auduno/headtrackr Friday, October 25, 13
webdesign.maratz.com/lab/responsivetypography Friday, October 25, 13
webdesign.maratz.com/lab/responsivetypography Friday, October 25, 13
auduno.github.io/headtrackr/examples/targets.html Friday, October 25, 13
auduno.github.io/headtrackr/examples/targets.html Friday, October 25, 13
alexhancock.github.io/street-facing Friday, October 25, 13
alexhancock.github.io/street-facing Friday, October 25, 13
markerless tracking Friday, October 25, 13
unifeye viewer Friday, October 25, 13
github.com/eduardolundgren/tracking.js Friday, October 25, 13
let’s see in action? Friday, October 25, 13
popularity Friday, October 25, 13
638 cities Friday, October 25, 13
445 tweets Friday, October 25, 13
thank you :) @eduardolundgren Friday, October 25, 13
More Decks by Eduardo Lundgren
See All by Eduardo Lundgren
WeDeploy
eduardolundgren
0
96
Introducing Liferay Standalone Applications
eduardolundgren
3
570
Single Page Applications in Liferay
eduardolundgren
5
2.6k
Single Page Applications done right
eduardolundgren
10
830
tracking.js with Maira Bello
eduardolundgren
0
150
Single Page Application
eduardolundgren
0
460
Getting Started with YUI3 and AlloyUI
eduardolundgren
0
120
Getting started with AlloyUI
eduardolundgren
0
120
Liferay UI revolution
eduardolundgren
0
220
Other Decks in Technology
See All in Technology
変更差分を読むために環境を整備しよう
pipepasta
1
320
BALLAS Technology Deck
ballas_inc
0
620
人間+AIを「チーム」としてプロセスを再設計する
littlehands
4
2.8k
_マネジメントする人される人ナイト_2026__良いチームを作っていきたい_お気持ち_.pdf
xkxaxkx
0
490
生成AI時代のIAMのマニアックな話
takuros
6
3.2k
Gov-JAWS#9 統合監視機能のマネージドサービス化+AIによる障害時自動調査
fj_yoshimura_kosuke
0
110
会社説明資料_最新版
demaecan
0
32k
[NW-JAWS DAY]「うちのAWS、インターネット出られないんで」― AWS外の自社サービスをPrivateLinkでシュッと公開する方法
ykimi
2
450
Quick Automate | 目指せ Quick マスター 12
inariku
PRO
1
110
IP重複は"ランディングVPC"で受け止める ― PrivateLink と Transit Gatewayによるマルチテナント接続基盤の設計
hatahata021
2
160
Go初心者のクラウドエンジニアが、デプロイを通して旨味を知っていく話
ryudai
1
220
AWS Emulator を評価する: 手元で動く AWS の API の仕組み、始め方、確かめ方
inariku
PRO
1
610
Featured
See All Featured
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
660
Un-Boring Meetings
codingconduct
0
500
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
330
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
570
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Evolving SEO for Evolving Search Engines
ryanjones
0
360
sira's awesome portfolio website redesign presentation
elsirapls
0
510
Technical Leadership for Architectural Decision Making
baasie
4
650
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
570
We Are The Robots
honzajavorek
0
440
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
750
Design in an AI World
tapps
1
390