wiimote I2C camera
Graham Stabler
Posts: 2,510
I recently discovered that as well as containing some accelerometers the Nintendo wiimote contains a camera. This camera has 1024x768 resolution and in built hardware to track up to 4 points at 100hz. The camera sits behind an IR filter so it can be used to track IR leds or IR light reflected off retro-reflective targets.
So far this has been used for:
Interactive white boards
Stereo tracking (using two remotes)
Head tracking
Laser point tracking (taking off IR filter)
And others?
You can see some demo videos here:
www.cs.cmu.edu/~johnny/projects/wii/
He has also done a good TED talk on it
www.youtube.com/watch?v=QgKCrGvShZs
What I have since discovered is that the camera because it is designed specifically for point tracking outputs point data via I2C, this should make it ideal for using with the propeller. And when in I2C mode you get 200Hz operation!!
Graham
So far this has been used for:
Interactive white boards
Stereo tracking (using two remotes)
Head tracking
Laser point tracking (taking off IR filter)
And others?
You can see some demo videos here:
www.cs.cmu.edu/~johnny/projects/wii/
He has also done a good TED talk on it
www.youtube.com/watch?v=QgKCrGvShZs
What I have since discovered is that the camera because it is designed specifically for point tracking outputs point data via I2C, this should make it ideal for using with the propeller. And when in I2C mode you get 200Hz operation!!
Graham
Comments
Just so you are aware the WiiMote camera only has a resolution of 128x96 but because it only tracks ir points the resolution of the points can be given at up to 1024x768.
The only downside with trying to use the camera directly on the propeller is having to desolder it (I am half way through doing this but don't have the time to complete it at the moment!)
I did put a post on the forum some time ago asking if anyone knew of any modules to allow the propeller to access HID devices but no one came up with any answers (this would allow the WiiMote to interface directly to the propeller without needing a PC to proxy the data). I have also made enquiries with several companies to see if I can get a BT module to do this, unfortunatly it looks like I would have to spend a lot of money in order to do it (and have to write the code myself!!)
If you do get any further with connecting one up, I'd be really interested in hearing about it!
Cheers
Keith
But, I don't get this resolution thing: ···· Is this massive interpolation or what?
As long as you are only looking at round blobs it should be very accurate assuming sufficient gray scales are available, PSDs have only two analogue signals but are highly accurate in blob positioning.
Graham
Maybe there's some way to use one of Sparkfun's bluetooth modules with this...
I think the additional resolution is calculated using the number of pixels used to make up each dot, and it is possible to change the sensitivity to it's lowest sensitivity which will reduce the resolution to the cameras 128x96 resolution. As for the algorithm I am not sure about how it is done, but it would be a pretty cool project for someone to track more than 4 light sources using a custom camera on the propeller (one of the things I have heard discussed is to track many light sources and be able to identify each one - not a simple task without loosing data, but could then be used for motion tracking etc.)
Unfortunatly Sparkfun's modules does not handle the Bluetooth HID profile (I got an answer back yesterday to this) and other devices such as mice are slaves so cannot act as a master device (and cannot connect to a wiimote). I am still looking for alternatives though, and I don't consider myself to be an expert in Bluetooth so I'd love someone to prove me wrong!!!
Hi Graham
You are correct, the image data is not available only the 4 bright light sources (you can remove the IR filter and use bright light sources such as laser pens, though I don't know how well this works!)
Some interesting WiiMote links for you are:
Johnny Chung Lee's pages:
procrastineering.blogspot.com/
www.cs.cmu.edu/~johnny/projects/wii/
Information on talking to the WiiMote:
www.wiili.org/index.php/Wiimote
wiibrew.org/wiki/Wiimote (mentions the actual camera resolution)
General information:
en.wikipedia.org/wiki/Wiimote
There are other pages on the net that give other details but your best bet is to google for those.
Cheers
Keith
Post Edited (Keith D) : 6/25/2008 2:45:24 PM GMT
Graham
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Although this would solve half my problem (as I do want to be able to connect such as the camera up to the propeller) part of my issue is to be able to wirelessly control a Propeller based robot wirelessly (without having to carry a laptop around!) I know people already control devices with a WiiMote (one person controls an iRobot roomba with one) but these all use a PC to read the HID data then pass the data serially to the microcontroller.
Cheers
Keith
I particularly liked the fact that Johnny thought outside the box (gees I hate that term!) and put the IR on his head, not the wiimote (much less geeky!). Simple, but effective
Thanks for sharing.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
BTW: I type as I'm thinking, so please don't take any offense at my writing style
Graham
Also, can a counter be used to as a substitute for the 25 MHz crystal/CLK?
Post Edited (Jay Kickliter) : 1/7/2009 9:39:23 PM GMT
Not sure yet what to do with the data once I get it.
I still haven't found an answer to whether a Propeller counter can output a 25 MHz clock that the camera can use. If not, maybe run the Prop and camera off a 20 MHz oscillator.
Post Edited (Jay Kickliter) : 1/11/2009 4:06:43 AM GMT
The above code doesn't seem to work and there are several init variations out there.
Thanx
I just need to polish a few details before publication. I wrote it before Christmas but have not been able to work on it for quite a while because of some other commitments. One of those was 700kg of pick and place machine that was sitting in my garage, I finally managed to sell it and it went to its new home today. I guess that is a good excuse to get my act together and finish the last details.
Graham
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Short answers?
Not available since you deserve more information than you requested.
May the road rise to meet you; may the sun shine on your back.
May you create something useful, instead of just another hack.
www.youtube.com/watch?v=TOoXNzTXhe4
This is just one application, I have a list as long as my arm for other applications, this is one of the more mundane [noparse];)[/noparse]
Time to get some sleep, might not get it at the weekend [noparse];)[/noparse]
Graham
p.s. I have two versions of the object, one is spin only based on Mikes I2C engine, the other is in assembly, also based on Mikes I2C code but translated. Pasm version needed for the 200hz read rate that they say is possible (I need to test the limits).
Attached is my hack job code.· Hope someone finds it useful.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
I'm not really implying that you do it, but it would be pretty slick!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Air hockey versus computer for example, you only need a single camera to track position on a surface.
Graham