Tuesday, 17 February 2009

IR Dot to Dot

One of the next tasks in this iteration of the gesture application is to investigate a reliable method of using the coordinate data of more than one IR blob. Not only would this method increase the sensitive area of the Wiimote, it would also make the motion much smoother (similar to my averaging method to smooth out the accelerometer readings).”

Well, I've managed to do this now – as you will have seen from the video in the 'intro' post of the same title.

First, view the video below that shows the latest iteration of the application


For the purposes of development, I've decided to show the positioning of the infrared 'blobs' that the Wii Remote's camera tracks, along with their index numbers. These index numbers are assigned by the Wii Remote itself, along with the calculations to determine the position of each indexed blob. This in itself is actually quite interesting (believe it or not!) and is due to a limitation of Bluetooth:

...the camera is a high resolution camera and works incredibly fast (on 100 Hz). This generates a lot of data which has to be analyzed. It is way too much to send by Bluetooth to the Wii, for Bluetooth has a maximum capacity of 1 Mbit/s. Assumed that one pixels takes one byte, sending 100 images of 1024x768 pixels take 630 Mbit/s, which is way too much for Bluetooth to handle.”

Smit, J.B.. (2008). Affordable Head Tracking. University of Groningen. (chapter 2), p17.

Consider that figure of 630 Mbit/s when you can have up to 4 Wii Remotes connected to a PC (or indeed Wii) at once – that's an awful lot of bandwidth!

Instead of very long explanations, I'll reel off a list of features that the application now has, associated with infrared. (Still probably long explanations!)

1. Can use 1 to 4 infrared dots to determine the position of the Wii Remote

2. When 2 dots are detected (this is where my Bluetack comes out again to cover up all but 2 LEDs) then the distance between them in pixels (relative to the resolution of the application) is calculated. From this, it's possible to track backward and forward motion and make an approximate representation for the 3D model's movement. This is a significant step to adding the ability to recognise gestures in three-dimensions

I've limited it to using only 2 dots at the moment because then it's a simple Pythagoras calculation to get the distance between the dots. If the Wii Remote is detecting 4 blobs then it's a question of working out the greatest distance between all 4 points. This is potentially a lot of calculations that could slow the program down.

Aside from that, if the remote is really close to a cluster of LEDs at one end of the sensor-bar then it it would appear that the remote is far away due to the small distance between the LEDs. Therefore, the LEDs must be at either end of the sensor-bar.

3. If there aren't any IR sources detected by the Wii Remote then the 3D model shader changes to represent it as 'off-line'. The application stops registering movement rather than registering lots of strange directions. When the remote is moved out of range then the remote freezes in it's last position. When the remote is moved back into range then the movement from the last position continues.

Next up will be the explanation of the Levenshtein algorithm!


Anonymous said...
This comment has been removed by a blog administrator.
電信 said...
This comment has been removed by a blog administrator.
Anonymous said...
This comment has been removed by a blog administrator.