Welcome! Log In Create A New Profile

Advanced

How to detect more than 4 IR LEDS

Posted by Mennatullah 
How to detect more than 4 IR LEDS
April 01, 2010 04:14PM
Hello,
I use wiimotelib to detect 4 IR LEDS.I need to mak them 5 IR LEDS
I read "With more than four objects visible, the camera is prone to rapidly switching between some of them. This could allow perception of more than four objects, at a reduced response speed and reliability."
If the IR camera switches between more than 4 objects....which object does it choose to switch the 5th object with?
How do I know when it switches 2 objects
And Does it switch between only 2 objects or it doesn't have to switch always between the same 2 objects?
Thanks



Edited 1 time(s). Last edit at 04/01/2010 04:15PM by Mennatullah.
Re: How to detect more than 4 IR LEDS
April 01, 2010 05:49PM
[wiibrew.org]

Quote

The camera's built-in image processing is capable of tracking up to 4 moving objects, and these data are the only data available to the host.
So, you can't. Sorry.
Re: How to detect more than 4 IR LEDS
April 02, 2010 02:34AM
Well, assuming it does switch (which Daid seems to indicate is not the case), you sould be able to figure out the pattern.

Write a simple program that checks all 4 of the IR LEDs and stores the IR dot location in memory or writes it out to SD card. I suggets storing in memory and then after a while dumping to SD card so that you get the fastest possible response time.

Then you can run the program with 5 IR sources and analyze the results. If your output is correctly labelled (i.e. which output was produced by which IR LED) you should be able to figure out the switching scheme.

BTW, Daid indicated that you can not detect more than 4 IR LED. Maybe what the original reading (i.e. about switching quickly) ment is that the IR LED sources need to quickly switch on and off. For example, consider 5 IR LED sources. If the Wii can only detect 4 then you shut one of the sources off and you do the detect. You now have the location of 4 IR LED sources. Then you temporarily shut down one of those 4 sources, for example the 4th source, and turn on the 5th. The Wii will now think that the 5th source is the 4th IR LED (and has just moved). You can now read the location of the 5th source by reading the 4th IR LED location. Now turn the 5th source off and the 4th source back on. By constantly swapping these two sources on and off you should be able to read all 5 IR sources. Of course if this is the case then you would need specialized equipment (i.e. modified wiimotes) because, as far as I know, the wiimotes do not turn on and off. In addition if all wiimotes turned off and on then you would have the additional problem of making sure they don't turn on and off in sync (i.e. all turn off and all turn on at the same time) and trying to figure out which one is off and which one is on.



Edited 1 time(s). Last edit at 04/02/2010 02:41AM by LordAshes.
Re: How to detect more than 4 IR LEDS
April 02, 2010 07:51PM
Quote
LordAshes
Of course if this is the case then you would need specialized equipment (i.e. modified wiimotes) because, as far as I know, the wiimotes do not turn on and off. In addition if all wiimotes turned off and on then you would have the additional problem of making sure they don't turn on and off in sync (i.e. all turn off and all turn on at the same time) and trying to figure out which one is off and which one is on.
Wiimotes do not have IR LEDs, only IR cameras. No IR is emitted from Wiimotes.
Re: How to detect more than 4 IR LEDS
April 03, 2010 11:18AM
Doh! Right...the sensor bar has the IR LEDs and the Wiimotes' camera reads those.

In that case the same advice as above applies except that the sensor bar or whatever is going to be generating the LEDs for the wiimotes to detect needs to be synchronized and ensure that only 4 LEDs are active at one time. Then your wiimote detection code needs to either be linked into this synchronization cycle so that it knows when the LEDs are for what objects or the wiimote detection code needs to apply some smart logic and assumptions (e.g. the LED for a source will not move more than x every check, etc).



Edited 1 time(s). Last edit at 04/11/2010 05:11AM by LordAshes.
Sorry, only registered users may post in this forum.

Click here to login