WabbelLab 1.4 (Copyright 2004, Hans Kopp)   

* Introduction 

WabbelLab is a game were one has to move a ball through a maze. 
There are holes distributed over the maze and the main challenge 
is to avoid these holes. It's a software implementation of a game 
that is also available in wood with a metal ball.
 
* Usage 

The goal of the game is to move the ball to the target (green circle) 
without hitting any holes. 

You can move the ball both with the camera (motion tracking) 
or with the cursor keys. 

There's only one level available. 

** Motion Tracking 

One needs to have a basic understanding of the inner workings of the 
motion tracking in order to understand its behavior and limitations:  

When the motion tracking is started, the camera takes one reference picture 
of the scene currently visible to the camera. After this the camera is 
continously taking pictures and compares them with the reference picture 
to find out by which value the pictures are translated from the reference 
picture. The resulting displacement can be used to determine the value 
by which the camera is tilted in x- and y-direction. 

To play the game you need to start the application and point the 
camera to a scene that provides a good contrast. Then invoke 
'Start Tracking' from the menu or press key '2'. If you now tilt 
the phone the ball will move. 

You should consider the following things when using the motion tracking: 
 
1. The image visible to the camera needs to be constant - e.g. you 
   cannot use the motion tracking while walking.
2. The image should provide a good contrast and should contain 
   bigger objects. E.g. a sheet of paper of a dark floor is well 
   suited. The algorithm works with quite a lot of scenes, but with 
   some it has some problems. When the camera scene is not good 
   for tracking the ball will be accelerated sometimes in a rather 
   random fashion. Use the 'Tracking Arrow' and the 'Tracking Image'
   settings to find out if the scene is good. 
3. Move the phone only by rotating it around axes parallel to the 
   screen. 
4. Push Button '2' or call 'Start Tracking' to reinitialize the 
   motion tracking. (It will take a new reference picture). 

** Calibration 

The cameras of most Nokia Series 60 phones yield pictures that 
are much darker in the corners than in the middle. You'll see
this in the preview window of the camera application included
in every phone. 

For the motion tracker these dark corners are a real problem 
that's why I equalize the images before using them for the 
motion tracking. Since every phone has a different intensity 
distribution the camera needs to be calibrated for the motion 
tracking. 

After installation the motion tracking algorithm is calibrated 
for the camera of my phone. This calibration might not work well 
for other cameras. 

It is possible to calibrate the camera for any other phone. This 
should improve the quality (realiability) of the tracking. 

To calibrate, stop the game and select 'Calibrate Camera' from
the menu. Take several pictures of a uniformly colored area. 
Light white areas are preferred. Take some of the pictures 
upside down or with the camera rotated. This is needed to get 
rid of the any non-uniformity in the image. After you took 
several images, invoke 'Finish' from the menu - done! 

Before pressing 'Finish' you see the images like they are used 
for motion tracking without equalizing, after pressing 
'Finish' you see the equalized images. 

The results of the calibration are saved in a file on drive C (about 5K). 

* Settings 

When you stop the game you can access the settings screen over the menu. 

The following settings are available: 
 - Engine 
   - Frame Duration: duration of a frame in milliseconds 
     Note that small value can cause a failure of the application.
   - Button Accel: Acceleration of the ball due to a cursor key press. 
   - Tracking Accel: Acceleration of the ball due to a tilt of the 
     camera. Smaller values will make the game easier. 
 - Tracking 
   - Normalize Image: Detail of the tracking algorithm - changing 
     this value might have an influence on the quality of the tracking. 
   - High Precision at 0: If 'On' the precision of the tracking 
     is increased around the origin. That is, the application becomes 
     very sensive when the tilt is small. 
   - Subsampling: removes the noise from the camera images before tracking 
     (seems to have little effect and costs performace) 
   - Search Quality: Defines how hard the exact tracking deviation is 
     searched - with low settings tracking might not behave well no 
     some scenes 
   - Ignore Corners: Ignores the corners of the cameras images. The corners
     usually have the highest intensity errors and thus cause the most 
     tracking problems - activate this setting if the tracking on your 
     phone is rather bad. (The proper solution for this problem is adding 
     a application for the calibration of the camera - but currently
     I don't find time to write such a app) 
 - Render 
   - Tracking Arrow: Displays a rose line in the background that moves 
     according to the current tilt - useful to find the neutral position
     of the phone and to identifies failures of the tracking algo. 
   - Tracking Image: Displays the camera image in the upper right 
     corner. 
   - Info String: Displays frame rate and number of camera images 
     taken per second. 
   - 3D Test: see yourself - just an experiment
   - Textured Ball: Texture the ball 

It has been tested only with the Nokia 3650. I have reports that it
works with Nokia 7650 but not with Nokia 6600. (The application expects 
for both devices a color depth of 12 bits, this is the likely 
reason why it does not work with 64K color screens). 

Homepage of WabbelLab: http://people.freenet.de/hskopp/wabbellab.html
Contact: hskopp@hotmail.com 

The program is distributed under the GNU general public license. 

			    NO WARRANTY

BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
