Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
tracking.js with Maira Bello
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Eduardo Lundgren
July 22, 2014
Technology
130
0
Share
tracking.js with Maira Bello
Eduardo Lundgren
July 22, 2014
More Decks by Eduardo Lundgren
See All by Eduardo Lundgren
WeDeploy
eduardolundgren
0
69
Introducing Liferay Standalone Applications
eduardolundgren
3
540
Single Page Applications in Liferay
eduardolundgren
5
2.6k
Single Page Applications done right
eduardolundgren
10
800
Single Page Application
eduardolundgren
0
440
Getting Started with YUI3 and AlloyUI
eduardolundgren
0
96
Getting started with AlloyUI
eduardolundgren
0
98
Augmented Reality.js
eduardolundgren
0
170
Liferay UI revolution
eduardolundgren
0
200
Other Decks in Technology
See All in Technology
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
23k
Revisiting [CLS] and Patch Token Interaction in Vision Transformers
yu4u
0
230
試されDATA SAPPORO [LT]Claude Codeで「ゆっくりデータ分析」
ishikawa_satoru
0
400
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
240
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
78k
実践ハーネスエンジニアリング:TAKTで実現するAIエージェント制御 / Practical Harness Engineering: AI Agent Control Enabled by TAKT
nrslib
6
1.3k
え!?初参加で 300冊以上 も頒布!? これは大成功!そのはずなのに わいの財布は 赤字 の件
hellohazime
0
150
DevOpsDays Tokyo 2026 見えない開発現場を、見える投資に変える
rojoudotcom
3
200
Azure PortalなどにみるWebアクセシビリティ
tomokusaba
0
340
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
16k
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.3k
CDK Insightsで見る、AIによるCDKコード静的解析(+AI解析)
k_adachi_01
2
170
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
150
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Abbi's Birthday
coloredviolet
2
6.8k
Everyday Curiosity
cassininazir
0
190
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
670
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Between Models and Reality
mayunak
3
260
Designing Experiences People Love
moore
143
24k
Prompt Engineering for Job Search
mfonobong
0
260
The Curse of the Amulet
leimatthew05
1
11k
Transcript
Maira Bello tracking.js uma nova dimensão
Maira Bello
None
discover.liferay.com/frontinbh
Visão computacional
Detecção de faces
Reconhecimento de faces
Robôs autônomos
Realidade virtual
Realidade aumentada
Como fazer isso?
OpenCV
ARToolkit
Como fazer isso no browser?
Acessar a câmera #1
Acesso à câmera navigator.getUserMedia({ video: true }, onSuccess, onFail);
Reproduzir o vídeo #2
<video>
Callback de sucesso function onSuccess(stream) { var video = document.querySelector('video');
video.src = window.URL.createObjectURL(stream); video.onloadedmetadata = function(e) { // Pronto }; }
Obter matriz de pixels #3
<canvas>
Algoritmos de tracking #4
Resumo Permissão do usuário <video> Acessar a câmera Reproduzir vídeo
Algoritmos de tracking Obter matriz de pixels <canvas> Resultado
tracking.js
JavaScript Eduardo Lundgren
Realidade aumentada Java
Time Zeno Rocha Eduardo Lundgren Java
None
Maira Bello Pablo Carvalho Zeno Rocha Time Eduardo Lundgren Java
100% JavaScript! Open Source Sem dependências de outras bibliotecas tracking.js
Algoritmos implementados Facilmente extensível API simples e intuitiva Alta performance Testes de unidade e de performance Setup automático ~ 7 Kb
Trackers
Color Tracker
None
Demo
var tracker = new tracking.ColorTracker(‘magenta’); ! tracking.track('#video', tracker, { camera:
true }); ! tracker.on('track', function(event) { event.data.forEach(function(rect) { // Seu código aqui }); });
Object Tracker
None
Demo
var tracker = new tracking.ObjectTracker(‘face’); ! tracking.track('#video', tracker, { camera:
true }); ! tracker.on('track', function(event) { event.data.forEach(function(rect) { // Seu código aqui }); });
Custom Tracker
var MyTracker = function() { MyTracker.base(this, 'constructor'); }; ! tracking.inherits(MyTracker,
tracking.Tracker); ! MyTracker.prototype.track = function(pixels, width, height) { // Seu código aqui ! this.emit('track', { // Seu código aqui }); };
var tracker = new tracking.MyTracker(); ! tracking.track('#video', tracker, { camera:
true }); ! tracker.on('track', function(event) { event.data.forEach(function(rect) { // Seu código aqui }); });
Utilitários
Fast
None
Brief
None
Lições aprendidas
41ms por frame 24 frames por segundo Tempo real
None
Complexidade do algoritmo
Int32Array Uint16Array Float64Array Uint8ClampedArray Arrays tipados
jsperf.com/tracking-js-arrays
jsperf.com/tracking-js-arithmetic
Demo
Web Components </>
var tracker = new tracking.ColorTracker(‘magenta’); ! tracking.track('#video', tracker, { camera:
true }); ! tracker.on('track', function(event) { event.data.forEach(function(rect) { // Seu código aqui }); }); Lembra?
<video is="video-color-tracking" target="magenta" camera="true" ontrack="onResult"> </video> Usando Web Components…
Documentação
trackingjs.com
Obrigada!
[email protected]
trackingjs.com