SlideShare uma empresa Scribd logo
1 de 1
Natural Feature Tracking in JavaScript
                                                                                                                    Christoph                      Oberhofer+,                                                                                             Jens     Grubert+,                  Gerhard Reitmayr                                                  +


INTRODUCTION
We present an efficient natural feature tracking pipeline solely implemented in JavaScript. It is embedded in a web technology-based Augmented Reality system running
plugin-free in web browsers. An evaluation shows that real-time frame rates on a desktop computer and interactive frame rates on a smartphones are achieved.

MOTIVATION
Portability                                                                                                                                                                                                                                                                                                                                                                              HTML5
Reliance on web technologies enables                                                                                                                                                                                                                                                                                                                                                     HTML5 provides the building blocks for realizing
platform independence.                                                                                                                                                                                                                                                                                                                                                                   plugin-free Augmented Reality on the web.
As we employ standardized web technologies our system can
                                                                                                                                                                                                                                                                                                                                                                                         HTML5 elements and related frameworks (WebGL, WebRTC)
run on most platforms that provide an HTML5 enabled browser.
                                                                                                                                                                                                                                                                                                                                                                                         enable the creation of a complete Augmented Reality pipeline
                                                                                                                                                                                                                                                                                                                                                                                         including natural feature tracking.



IMPLEMENTATION                                                                       Augmented Reality Pipeline in HTML5                                                                                                                                                                                                        Two-Stage Tracking Approach
                                                                                                                       Camera Access                                                                                                                                                                                                                    Detection
We employ the MediaStram API along
with the <video> and <canvas > elements                                                                                  <video>                                                <canvas>                                                                                                                                                                                                                       pose
                                                                                                   getUserMedia




to access the video stream of a camera.                                                                                                                                                                                                                                                             FAST [2]                                BRIEF [1]                          RANSAC
                                                                                                                                                                                                                                                                                                       multi-level
                                                                                                                                                                                                                                                                                                   keypoint detection
                                                                                                                                                                                                                                                                                                                                        keypoint description +
                                                                                                                                                                                                                                                                                                                                              matching
                                                                                                                                                                                                                                                                                                                                                                               outlier removal              estimation
A two-stage pipeline written entirely in
JavaScript efficiently computes the pose
of the camera (similar to [3]). When the                                                                                                                                                                                                                                                                                                                                                                                                                      pose
initial pose is detected it is incrementally
                                                                                  3D Rendering                                                            Computer Vision                                                                                                                                                                               Tracking
updated during the tracking stage.
                                                                                                                                                                                                                                                                                                          Image Level n                                                                            Image Level 0
                                                                                                                                                                                                                                                                                                                                                                  …
                                                                                                                                                            function initializationPhase(){
                                                                                                                                                               grabber.grab();


                                                                                                                                                                                                                                                                                                   NCC-based                                                                             NCC-based
                                                                                                                                                               imageDataContainer.updateData();



Finally, the pose is used to overlay 3D
                                                                                                                                                               fastDetector.detect(imageDataContainer, fastThreshold, fastPoints);


                                                                                                                                                                                                                                                                                                                                      pose                                                                              pose
                                                                                                                                                               fastDetector.nonmax_suppression(fastPoints, keyPoints);
                                                                                                                                                               brief.getDescriptorsForLevel(imageDataContainer, keyPoints);


                                                                                                                                                                                                                                                                                                    keypoint                                                                              keypoint
                                                                                                                                                               var correspondences = brief.match(template_keypointSet, keyPoints);
                                                                                                                                                               CVUtils.undistortPoints(correspondences.right, K, distCoeffs);



graphics with WebGL over the video.                                                                                                                                                                                                                                                                                               refinement                                                                        refinement
                                                                                                                                                               var ransac = new RANSAC(correspondences, config.detection.ransac);
                                                                                                                                                               inlierSet = ransac.execute();


                                                                                                                                                                                                                                                                                                    tracking                                                                              tracking
                                                                                                                                                               if(inlierSet == null || inlierSet.length < config.detection.ransac.minNumOfInlier){
                                                                                                                                                                      poseUpdated(TrackResult.FAILURE);
                                                                                                                                                                      return;
                                                                                                                                                                }
                                                                                                                                                               var H = CHOLESKY.computeHomography(inlierSet);
                                                                                                                                                               inlierSet = new Array();
                                                                                                                                                               ransac.computeInlierSet(inlierSet, H.toMat());
                                                                                                                                                               H = CHOLESKY.computeHomography(inlierSet);
                                                                                                                                                               computePose(H, inlierSet);
                                                                                                                                                              // Switch to tracking phase
                                                                                                                                                              poseUpdated(TrackResult.GOOD);
                                                                                                                                                              currentPhase = Phase.TRACKING;
                                                                                                                                                              document.getElementById("numFeatures").innerHTML = inlierSet.length;
                                                                                                                                                            }




EVALUATION                                                              Detection Phase PC                                                          Detection Phase PC vs. Mobile
                                                                                                                                                                                                                                                                                                        Chrome Canary 17
                                                                                                                                                                                                                                                                                                                        Tracking Phase PC                                                              Tracking Phase PC vs. Mobile
                                                 Chrome Canary 17
                                                                                                                                                       Firefox 8 (PC)                                                                                                                                                                                                                                    Firefox 8 (PC)
                                                     Opera Next 12                                                                                                                                                                                                                                           Opera Next 12
                                              Firefox Nightly 11.0a1
System                                                     Firefox 8
                                                                                                                                                 Firefox 8 (Android)
                                                                                                                                                                                                                                                                                                    Firefox Nightly 11.0a1
                                                                                                                                                                                                                                                                                                                                                                                                    Firefox 8 (Android)
PC: Core2Duo 3GHZ, 4GB RAM                     Google Native Client                                                                                                                                                                                                                                                 Firefox 8
Mobile: Samsung Galaxy SII                          Adobe Alchemy
                                                                                                                                                        Time [ms]                            0                         100                           200     300   400      500      600                        Time [ms]         0     5    10    15   20   25      30   35   40   45   50                  Time [ms] 0        10    20    30     40    50     60     70    80      90 100
                                                      Time [ms]         0     20     40    60    80               100 120 140    160                                                                                                                                                                   keyframe         track 2       pose 2      track 1    pose 1       track 0   pose 0                  keyframe        tracking 1       pose 1       tracking 0        pose 0
                                                                                                                                                     integral                      fast                            descriptor                              match   ransac     pose
                                                        integral       fast     descriptor    match                ransac pose
                                                                                            320x240px | FAST: 250 KP | BRIEF: 128 bit | RANSAC: min 30 inlier | max 300 iterations                                                                                                                     320x240px | levels: 3 (120, 100, 70 KPs) | search radius: 2, 2, 4 px | patch size: 8x8 px            320x240px | levels: 2 (60, 40 KPs) | search radius: 2, 3 px | patch size: 8x8 px


                             In the detection phase the fastest web browser (Firefox 8) is 1.6 times faster than the slowest one (Opera 12).                                                                                                                                               In the tracking phase the fastest web browser (Chrome Canary) is 2.5 times faster than the slowest one (Firefox 8).
                             An implementation in Google Native Client is 3.7 times faster and in Adobe Alchemy still 2 times faster.                                                                                                                                                      Compared to the PC the system runs 5.5 times slower in a web browser on a smartphone.
                             Compared to the PC the system runs 6 times slower in a web browser on a smartphone.
                                                Overall the detection can be carried out with 11 frames per second (fps) on a PC but only with 2 fps on a smartphone. Once initialized the system can track with up to 50 fps on a PC and 9 fps on a smartphone.
REFERENCES       [1] M. Calonder, V. Lepetit, C. Strecha, and P. Fua. BRIEF: Binary Robust Independent Elementary Features. In ECCV 2010, pages 778-792.                                                                         +Graz
                 [2] E. Rosten and T. Drummond. Machine learning for high-speed corner detection. In ECCV 2006, pages 430-443.                                                                                                                             University of Technology, Austria |[ grubert| reitmayr]@icg.tugraz.at |ch.oberhofer@gmail.com
                 [3] D. Wagner, G. Reitmayr, A. Mulloni, T. Drummond, and D. Schmalstieg. Real-Time Detection and Tracking for
                      Augmented Reality on Mobile Phones. In IEEE TVCG, 99(1), pages 355-368, November 2010.
                                                                                                                                                                                                                                                       This work is made possible by the Austrian National Research Funding Agency FFG in the SmartReality project.

Mais conteúdo relacionado

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Natural Feature Tracking in JavaScript

  • 1. Natural Feature Tracking in JavaScript Christoph Oberhofer+, Jens Grubert+, Gerhard Reitmayr + INTRODUCTION We present an efficient natural feature tracking pipeline solely implemented in JavaScript. It is embedded in a web technology-based Augmented Reality system running plugin-free in web browsers. An evaluation shows that real-time frame rates on a desktop computer and interactive frame rates on a smartphones are achieved. MOTIVATION Portability HTML5 Reliance on web technologies enables HTML5 provides the building blocks for realizing platform independence. plugin-free Augmented Reality on the web. As we employ standardized web technologies our system can HTML5 elements and related frameworks (WebGL, WebRTC) run on most platforms that provide an HTML5 enabled browser. enable the creation of a complete Augmented Reality pipeline including natural feature tracking. IMPLEMENTATION Augmented Reality Pipeline in HTML5 Two-Stage Tracking Approach Camera Access Detection We employ the MediaStram API along with the <video> and <canvas > elements <video> <canvas> pose getUserMedia to access the video stream of a camera. FAST [2] BRIEF [1] RANSAC multi-level keypoint detection keypoint description + matching outlier removal estimation A two-stage pipeline written entirely in JavaScript efficiently computes the pose of the camera (similar to [3]). When the pose initial pose is detected it is incrementally 3D Rendering Computer Vision Tracking updated during the tracking stage. Image Level n Image Level 0 … function initializationPhase(){ grabber.grab(); NCC-based NCC-based imageDataContainer.updateData(); Finally, the pose is used to overlay 3D fastDetector.detect(imageDataContainer, fastThreshold, fastPoints); pose pose fastDetector.nonmax_suppression(fastPoints, keyPoints); brief.getDescriptorsForLevel(imageDataContainer, keyPoints); keypoint keypoint var correspondences = brief.match(template_keypointSet, keyPoints); CVUtils.undistortPoints(correspondences.right, K, distCoeffs); graphics with WebGL over the video. refinement refinement var ransac = new RANSAC(correspondences, config.detection.ransac); inlierSet = ransac.execute(); tracking tracking if(inlierSet == null || inlierSet.length < config.detection.ransac.minNumOfInlier){ poseUpdated(TrackResult.FAILURE); return; } var H = CHOLESKY.computeHomography(inlierSet); inlierSet = new Array(); ransac.computeInlierSet(inlierSet, H.toMat()); H = CHOLESKY.computeHomography(inlierSet); computePose(H, inlierSet); // Switch to tracking phase poseUpdated(TrackResult.GOOD); currentPhase = Phase.TRACKING; document.getElementById("numFeatures").innerHTML = inlierSet.length; } EVALUATION Detection Phase PC Detection Phase PC vs. Mobile Chrome Canary 17 Tracking Phase PC Tracking Phase PC vs. Mobile Chrome Canary 17 Firefox 8 (PC) Firefox 8 (PC) Opera Next 12 Opera Next 12 Firefox Nightly 11.0a1 System Firefox 8 Firefox 8 (Android) Firefox Nightly 11.0a1 Firefox 8 (Android) PC: Core2Duo 3GHZ, 4GB RAM Google Native Client Firefox 8 Mobile: Samsung Galaxy SII Adobe Alchemy Time [ms] 0 100 200 300 400 500 600 Time [ms] 0 5 10 15 20 25 30 35 40 45 50 Time [ms] 0 10 20 30 40 50 60 70 80 90 100 Time [ms] 0 20 40 60 80 100 120 140 160 keyframe track 2 pose 2 track 1 pose 1 track 0 pose 0 keyframe tracking 1 pose 1 tracking 0 pose 0 integral fast descriptor match ransac pose integral fast descriptor match ransac pose 320x240px | FAST: 250 KP | BRIEF: 128 bit | RANSAC: min 30 inlier | max 300 iterations 320x240px | levels: 3 (120, 100, 70 KPs) | search radius: 2, 2, 4 px | patch size: 8x8 px 320x240px | levels: 2 (60, 40 KPs) | search radius: 2, 3 px | patch size: 8x8 px In the detection phase the fastest web browser (Firefox 8) is 1.6 times faster than the slowest one (Opera 12). In the tracking phase the fastest web browser (Chrome Canary) is 2.5 times faster than the slowest one (Firefox 8). An implementation in Google Native Client is 3.7 times faster and in Adobe Alchemy still 2 times faster. Compared to the PC the system runs 5.5 times slower in a web browser on a smartphone. Compared to the PC the system runs 6 times slower in a web browser on a smartphone. Overall the detection can be carried out with 11 frames per second (fps) on a PC but only with 2 fps on a smartphone. Once initialized the system can track with up to 50 fps on a PC and 9 fps on a smartphone. REFERENCES [1] M. Calonder, V. Lepetit, C. Strecha, and P. Fua. BRIEF: Binary Robust Independent Elementary Features. In ECCV 2010, pages 778-792. +Graz [2] E. Rosten and T. Drummond. Machine learning for high-speed corner detection. In ECCV 2006, pages 430-443. University of Technology, Austria |[ grubert| reitmayr]@icg.tugraz.at |ch.oberhofer@gmail.com [3] D. Wagner, G. Reitmayr, A. Mulloni, T. Drummond, and D. Schmalstieg. Real-Time Detection and Tracking for Augmented Reality on Mobile Phones. In IEEE TVCG, 99(1), pages 355-368, November 2010. This work is made possible by the Austrian National Research Funding Agency FFG in the SmartReality project.