Virtual Dart An Augmented Reality Game on Mobile
Virtual Dart – An Augmented Reality Game on Mobile Device Supervised by Prof. Michael R. Lyu LYU 0604 Lai Chung Sum (04523002) Siu Ho Tung (04559983)
Outline • • Background Information & Objective Summary of Works Done in Semester 1 Works in Semester 2 Game Flow Programming Tricks Difficulties Conclusion Q&A 2
Objectives • Demonstrate how a game can “recognize” its external environment for Augmented Reality • Develop a mobile game, Virtual Dart, which illustrates the proposed methodology 3
Definition Augmented Reality is. . . • a combination of real world and computer generated data • the use of video and which is augmented by addition of computer graphics 4
Background Information Programming Target Mobile Phone Sybmian C++ Nokia N 90 (S 60 2 rd Edition FP 3) C# Nokia N 80 (S 60 3 rd Edition) (Nokia 6600) 5
Summary of Works Done in Semester 1 Feature Selection Feature Recognition Motion Tracking on the featue 6
Summary of Works Done in Semester 1 Virtual Dart Program Core 1. 2. 3. 4. 5. Implementation of Feature Selection Algorithm Implementation of Initial Feature Recognition Algorithm Implementation of Enhanced Feature Recognition Algorithm Modification of m. VOTE Motion Tracking Engine Implementation of mobile game, Virtual Dart, in prototype form Studied Materials 1. 2. 3. 4. Existing m. VOTE Engine & its related papers Symbian C++ & Nokia S 60 3 rd edition programming guides Corner Detection Algorithms such as FAST Corner Detector and Harris Corner Detector Block Matching technique 7
Problem Discovered in Semester 1 Problem Enhanced Feature Recognition Algorithm takes more than 30 seconds to recognize the saved features Cause 1. Nokia N 80 has only limited computational power Solution Design a new and specific algorithm (To be discussed later) 2. The algorithm maybe too general to recognize features 8
What does the program need to recognize? Goal: Use the simplest method to build the recognizer Bar Code Recognition LED Recognition Common in indoor environment + Can emit light 9
How to locate LED? 1. Filter for LED 2. Find LED Filter out the surrounding environment 1. Locate a block which contains LED 2. If the block contains more than a threshold of nonblack pixels 10
LED Recognizer – Filter Use Green / Red LED as target object Goal: Separate the target object from its surrounding environment 11
LED Recognizer – Filter Set aconstraint Add lower bound to other for Green color channels channel of the pixel Result image of G > 230 and B < 204 12
LED Recognizer – Filter Extension • Use similar technique to build a filter for Fluorescent Light, Light Bulb 13
LED Recognizer – Version 1 Check every block in the screen Prevent block overlapping 14
Limitations of LED Recognizer – Version 1 Problem 1. Slow 2. Target object at the corner of the block 3. Select more than one blocks for same object 15
LED Recognizer – Version 2 Search the center region of the block only Distance check Stop after finding 2 feature blocks 16
Comparison of 2 versions of LED Recognizer Version 1 Version 2 17
LED Recognizer – Final Version LED Recognizer – Version 2 Simplify by Reduce the number of tracking point to 1 + Remove Distance Check Remove Block Overlapping Check Stop After Finding First Feature Final Version of LED Recognizer 18
Motion Tracking by m. VOTE Engine Problem The motion tracking of the LED would be lost very easily Cause Solution Areas around the LED are flat regions. m. VOTE Engine cannot work well in flat region 1. Detect if the motion tracking of the LED is lost or not 2. Relocate the LED if the motion tracking is lost 19
Virtual Dart Modeling Dart Throwing Preview Scene 20
Virtual Dart Modeling 0. 279 Meter 39 pixels X 1. 6 + 0. 279 = 1. 879 m 4 pixels. Meter 0. 0286 1. 6 m 1. 6 - 0. 0286 = 1. 5714 m 21
Game Flow 22
Programming Tricks A lot of Square Root calculation in Projectile Motion Found a fast Square Root calculation by John Carmack Newton Approximation Method 23
Programming Tricks 24
Difficulties Colors in images captured change in different platforms Unclear explanations from Nokia S 60 documentations Insufficient support from emulator Build 3 D model of dart images “Active Object” in Symbian platform 25
Conclusion • Successfully recognized Green / Red LED for Augmented Reality • Developed a mobile game with Augmented Reality – Virtual Dart 26
Virtual Dart End 27
LED Recognizer – Filter Before Filtering After Filtering 28
LED Recognizer – Filter Before Filtering After Filtering 29
LED Recognizer – Filter • Use similar technique to build filter for Red LED • Set lower bound for Red color channel and upper bound for Blue color channel 30
Projectile Motion 31
Programming Tricks float { Cos(int a. Angle) switch(a. Angle) { case(0): case(1): case(2): case(3): . . . case(12): case(13): case(14): case(15): default: } return 1. 0; 0. 99984769516; 0. 99939082702; 0. 99862953475; break; return return 0. 97814760073; 0. 97437006479; 0. 97029572628; 0. 96592582629; 1. 0; break; break; } 32
- Slides: 32