See also: 3D tracking using 2 Wiimotes
The basic idea is that, in contrast with normal usage, the Wiimote functions as a fixed camera tracking a moving light source, rather than as a moving mouse-like device tracking a fixed light source (the fixed light source that comes with the Wiimote is called the "sensor bar", which is attached to your TV). A stereo image from two Wiimotes would even enable 3D tracking. It is possible to use four Wiimotes simultaneously, and maybe more.
Connecting the Wiimote to a PC
I connected the Wiimote to a Linux PC by means of a Bluetooth USB dongle. I enabled the USB and Bluetooth kernel options in the Linux 2.6 kernel, and it worked without problems. As there is no standard for Bluetooth USB dongles, you should ensure the particular dongle you want to use is supported by Linux. A lot of dongles are supported though. I use a Conceptronic CBT200U2A.
The Wiimote speaks the HID (Human Interface Device) protocol, also used for Bluetooth keyboards, mice, etc. I used the CWiid library to talk to the remote. CWiid has an easy C interface for writing your own Wiimote software.
Positioning the Wiimote
The Wiimote can be placed next to the computer screen, but I think that having the tracking center correspond to the center of the screen will be significantly more user-friendly. You control the user interface by hovering your hands above or in front of the keyboard. Switching between keyboard and tracker control should be even easier than switching between keyboard and mouse.
The Wiimote could be attached to the top of the computer screen pointing downwards. You'd need something like a regular webcam holder, though the Wiimote is both larger and heavier than a typical webcam. One might also use a regular tripod, placed behind the screen (this would work better for TFT screens). An alternative is to hang it from the ceiling. Another is to have the Wiimote stand upright below the screen, and use a near horizontal mirror, either placed just above the Wii or attached to the top of the screen, to make the Wii see your hands properly.
I used a small 5x10 cm mirror attached to a piece of metal wire, held into place by a stack of books. This mirror configuration manages to track your hands in a 20cm or so radius right below and in front of the wiimote. The result looks something like this:
Wiimote technical considerations I found the following:
With a very simple algorithm I managed to get position resolutions up to 1/100 pixel (that's something like 1/100 mm at the use distance!) and distance resolutions (based on size) of 1/10 mm and smaller. This is enough to track the 3D position of a light source without having to revert to stereo interpretation and other fancy techniques.
The camera I'm using produces significant noise when there are low light levels, because it amplifies the signal. This happens in typical cases when tracking light sources. This means that the 1/100 pixel accuracy cannot be achieved, and with the noise we're at something like 1/10 or 1/20 pixel, which is still pretty good.
Tracking two light sources Tracking two light sources with the camera also turned out to be fairly easy too. An algorithm first determines the orientation of the outlying pixels in the scene (outlying wrt the light center), which is used to estimate the dividing line between the two assumed light sources. The radius and position of each source can be computed in a way similar to the single light source case.
The availability of two 3D positions can be used to determine 5 DOF or 6DOF of certain trackable objects (5DOF: stylus with two leds; 6DOF: flat surface, as long as oriented towards camera).
Basically there are two ways to obtain a trackable marker spot: one is to have a light source (lamp or LED) placed on the location to be tracked, the other is to place reflective material on the location and shine on it with a bright lamp or LED array. Here is a preliminary comparison of the two techniques:
| Aspect | Light source on target | Reflective material on target |
| Visibility of light source | The light source is allowed to emit some visible light (but not too much). We can use incandescent bulbs or LEDs. | The light source must not emit any visible light, to prevent annoyance. This means we have to use LEDs. |
| Portability | Light source must be as small as possible, and power source should be small and close to the light source. | Reflective material can be made very lightweight and non-intrusive. |
| Angle of light emission | Problematic. LEDs typically have narrow angle, and most light sources distribute their light unevenly. A lens or diffuser may help. | Well suited. A "white" reflector can be made to reflect light at 180 degrees or even 360 degrees (such as white tape wrapped around a finger) |
| Size of marker spot | Can be made very small. Small LEDs or lamps make very small and bright light sources | Likely cannot be made very small. |
Light source considerations
We consider two types of light sources here: IR LEDs and incandescent light bulbs.
Most IR LEDs have similarly high light yield and emit at a wavelength of 840-940 nm. Most have a narrow angle of emittance. Voltage drop is typically around 1.4 volts. LEDs need to be connected to the power source in series with a resistor of around 100 ohm to stabilise the current. This means the supply voltage will have to be at least twice the LED voltage drop. So, to use them as on-target light sources, you will need at least two or three AAA batteries or a 9V battery.
Incandescent light bulbs have their peak of emittance around 1000 nm. In fact, they are better IR light sources than they are visible-light sources. For our experiments, a small lamp (possibly covered by a cheap IR filter) may be a good choice for on-target light sources. Suitable low-voltage lamps are available and can be connected directly to a single AAA battery.
The light sources can be made nearly invisible too, by wrapping a piece of black camera (negative or slide) film around them. The film acts as a cheap IR filter (see for example this graph). I tried covering the lights with some film, and the light becomes much dimmer to the eye (though not quite invisible), while the Wiimote performance did not seem to degrade.
I played around with this glove, and it seems to work pretty well, if you manage to place the Wiimote so that it is at close distance (50cm or less) and it sees your hands from above. The Wiimote cannot handle the light bulbs when it sees them from the top rather than the side. The top of the bulb (which is a sort of cone shape) acts as a kind of lens, which is not suitable for the Wiimote at this brightness and distance (you get multiple small light sources). LEDs may have a similar problem, since the distribution of light emitted from the top is not always very regular, that is, even within the specified angle of emittance. One problem with this glove is that the thumb cannot be detected properly because the light shines sideways rather than upwards, and is often obscured when moving your hands into specific positions. A finger tracker without the thumb may work well, though.
The result looks like this:
With help of the diffuser, this LED version of the dataglove works better than the lamp version, as I found the Wiimote can track it to larger distances.
In contrast to finger-mounted light sources, the stylus can be rotated in any orientation over a large angle with only small movements of the fingers that hold it. When light sources are mounted on one or two fingers, rotation of the wrist is required to produce some of the rotations, making the required hand movement larger and more tiring.
The stylus can be tracked reasonably well, when it is held in one hand, with the orientation of the hand itself being fixed, and only the fingers manipulating the stylus's orientation. The camera position can then be chosen so that the hand does not obscure the stylus. One major problem with the stylus is that it is easy to accidentally obscure one light source by the stylus itself. This happens inadvertently and seems difficult to prevent.
I used the latter configuration to obtain a useable head-tracked input method. The basic idea is that a person has a natural tendency to move his head in such a way as to look "around" the model as desired. The model can be rotated as would be expected from those corresponding head movements by means of the single-light-source head tracker, with some assumptions. This can be used as a sort of model rotation input method, however, the head movements required to rotate the model would be quite large. I used this basic method, only with the speed of the rotation being amplified a number of times. This retains enough naturalness to be intuitive, and it enables very small head movements to be used to rotate the model.
See the head tracker in action!