Archive for the ‘Final Year Project’ Category

Almost…

Wednesday, June 2nd, 2010

Well tomorrow is the day of my final presentation and I’ve just finished preparing everything in preperation.

I just thought I should share my Max5 patch, purely because it’s such a beast!

As you can see in the last image, despite the fact that the WiiMote can only see 2 points of light, it was able to work out the position of the other 2 based on what it knows about the relationship between their distances before they left the field of view.

As always, I have included a grab of the unlocked patch, just so you can see how difficult it is to keep track of all the patch lines!

Fingers crossed!

Creating my Glasses and Creating Success

Thursday, March 18th, 2010

Finally, my bits and pieces from China have arrived! Recently, I have been doing all of my shopping on eBay, buying things from China. If you can stand the wait, then it pays off because it’s so much cheaper!

My next task is to try and assemble my bag o’ parts into a standalone pair of specs. Because I don’t have the knowledge and experience to create a face-tracking application, I have to use 4 IR LEDs on a pair of glasses whilst being ‘watched’ by a Wiimote. I have:

  • 4x 3mm 940nM IR LEDs
  • 1x 3mm red LED (as a power indicator)
  • 1x SPDT PCB-mounted switch
  • 1x 23AE battery and battery holder
  • 1 pair of stylish black and orange glasses with non-indexed lenses

The positioning of the 4 IR LEDs is very important as they must be equidistant and must all lie along a single plane in order to allow me to triangulate the distance accurately.

As you can see from the photo, I have already attached the battery and battery holder to the glasses using cable ties. The next job is to mark out the positioning of the IR LEDs and the switch and solder the whole shabang together with a resistor in the mix to keep things dissipated correctly. Thanks to http://led.linear1.org/led.wiz, I am able to work out that I need a single 220Ω resistor.

In other news, I have now mixed my Wiimote patch and my 3D cube patch to create a cube that revolves with motion input from the Wiimote (apologies for the poor quality!):

So I am now well on my way to creating a usable, workable system…

Beaten To It…My 3DTV Experience

Wednesday, March 17th, 2010

Well well well, I appear to have been beaten to it! I always said that 3DTV will never catch on because of:

  • The stupid glasses that you have to wear whether you want to watch sport, films or even the adverts
  • The lack of parallax in current systems for more than one viewer at a time
  • The fact that the edge of the screen is still the edge

I recently visited the NEC in Birmingham for ‘Focus On Imaging’, an annual photographic showcase of the latest innovations in photography and digital imaging. As I walked past the Panasonic stand, I was offered to view their newest 3DTV, the appropriately-named TC-P50VT20.

I had to wear these stupid glasses that were both heavy and uncomfortable (and battery-powered!) to watch two 3-minute 3D films.

http://www.panasonic.com/3d/

The image that the system gave was quite impressive, but if I moved ever so slightly to try and trigger parallax, the effect was ruined. After the films had shown and everyone had left, I took my chance to talk to the girl from Panasonic about the system. The method used was quite crude and I don’t think it will catch on. The screen would show alternating images for the right and then the left eye at 120Hz and each time, send out an infrared signal to the glasses, which would use LCD technology to cover the appropriate eye. This is just a LED/LCD version of one of the oldest 3D techniques.

I quizzed the girl on the lack of 3DTV standards and the response I got was: “We’re hoping to set the standard…” – WRONG! That’s not how standards are set! Go back 2 years and we can see 2 companies trying to ‘set the standard’ in the form of Blu-Ray and HD-DVD. Roll back 30 years and we see a similar story with Betamax and VHS. Now imagine the same scenario with more than 5 or 6 media giants trying to set the standard. Nothing good will happen and it will inevitably be the system with the most money to back it up winning, rather than the best or the most efficient.

One company that has solved 2 out of my 3 gripes (which is twice as much as any other company!) is Holografika, who have created a 3DTV that features parallax AND you don’t have to wear a pair of glasses to watch it. The price for this privilege? £26,265! The other downside? you have to have 4 video sources, typically 4x DVI-I or DVI-D signals.

The hardest problem to solve is the border problem. It really annoys me when 3DTVs are shown with things ‘coming out’ of them:

http://www.inition.co.uk/inition/images/product_stereovis_magnetic.jpg

Until someone solves all 3 of these things, the 3DTV will never reach its full potential. We will all end up looking like complete idiots, sitting in our under-furnished white-walled homes wearing heavy, bulky glasses that cause headaches watching giraffes on a TV that ISN’T 3D…

http://www.panasonic.com/3d/

I close my case…

The Final Trigonometrical Equations (Hopefully!)

Monday, March 8th, 2010

Well well well! I am still going with my trig work, but the more I equate, the easier it becomes. The first set of functions described what to do with the values and this set calculates how to get said values.

The equation I spent the entire afternoon working on takes a distance between 2 points seen by the Wiimote and uses triangulation to calculate the distance of the sensor bar from the Wiimote. Unfortunatley, because the distance between the points is measured in pixels and the distance between the sensor bar and the Wiimote is measured in ‘real’ units (i.e. cenitmetres or inches) there is a conversion or ‘scale’ factor to be taken into account.

…and after all these scribbles, the final equation is as follows:

$$d = {s \over 2 tan \langle{{s \over 2}\times \langle{{\langle{Horiz FOV \over 1024}\rangle + \langle{Vert FOV \over 768}\rangle} \over 4}\rangle}\rangle}$$

Where:
d = distance between Wiimote and sensor bar
s = distance between the 2 points as seen by the Wiimote (pixels)
Horiz FOV = Horizontal field-of-view of the Wiimote, roughly equal to 41° (to be measured)
Vert FOV = Vertical field-of-view of the Wiimote, roughly equal to 31° (to be measured)

The problem, as I mentioned is that the scale of the model has not been set, and d may need to be multiplied by a certain number to make the numbers work, but nevertheless the relationship between d and s should work out to be correct.

Yet more maths to follow!

Wiimote + Arduino + IR LEDs + Max5 = Success!

Thursday, March 4th, 2010

After a lot of fiddling about on Max5 and testing different hardware, I have had a breakthrough! I have now successfully got a Wiimote to not only ‘see’ and follow 4 IR LEDs, but also return the values into Max5!

Below is a crude(!) video taken on my old-as iPhone 3G, showing the tracking as I move the Wiimote around:

The next step in my development is to use triangulation to determine the distance between the Wiimote and the LEDs, in such a way that I can change the configuration depending on the fixed distance between the LEDs.

If i were just moving the Wiimote along a single axis towards the LEDs, then the calculations would be very simple, but nothing in my life is that simple! Not only is the positional and spacial relationship between the 2 objects 3-dimensional, but the rotation (pitch, roll and yaw) of the LEDs (or in this case, the Wiimote) is also 3-dimensional and it is here that lies the problem.

If the 4 light sources are close together, there could be 2 possible senarios:

  • The LEDs are far away
  • The LED array has been tilted so that the angle of incidence is very small

A successful and stable solution for this has not yet been created. Until now…maybe!

Because the IR camera on the front of the Wiimote is of such a high quality (1024 x 768px!) with a narrow viewing angle (~45°) it suffers foreshortening much more pronounced and acurately reproduced than that of a normal webcam. This means that if the sensor is far away from the source, the distance between the points will be small, but consistant between them. If the sensor is tilted, the distance between the 2 leftmost points will differ from that of the 2 rightmost. There is a value returned for the size of each of the light points, but this is inacurate and unstable due to the narrowviewing angle of the LEDs. I am currently looking into way to increase the viewing angle of the IR LEDs, which will help the accuracy and reliability of the values returned.

Finally, credit where credit is due. Thank you to Alex Harker for the updated ajh.wiiremote Max5 patch: http://cycling74.com/forums/topic.php?id=22500