View Full Version : (OSC-Max5) IR Motion Tracking calibration issues

03-31-2009, 10:52 AM

I'm building a patch using OSCulator to Max5 that can track a single (or more) points for analysis and evaluation, much like Johnny Lee's Wii-glove thingy. I'm using cv.jit library to track the dots, which works well, however the IR data is extremely stocky and rough, I'm not sure why! I can never seem to get a clean, smooth data feed.. Any thoughts?

I'm testing my Wiimote with a single IR LED built on a basic breadboard circuit, I know the circuit works but the Wii needs to be extremely close to pick up any X, Y or size data. I realize this could be due to ambient light but I'm using the same type of IR LEDs that are used in the Wii Sensor Bar.

Any help or suggestions would be grately appreciated!

I can provide a prototype of the patch if necessary...


03-31-2009, 10:45 PM
Hi Will,

I just tested with a candle, sending the X or Y coordinates to the Console Log, and it seems I am getting rather smooth results. I have to agree that the "field of view" is rather narrow, and sometimes the Wiimote jumps from one dot to another (unfortunately, this is done automatically and I can't have any control on it.)

The best results are achieved when I am using the Wiimote 3 feet from the candle. I guess the candle is more powerful than the LED, but I don't think it had much importance, I think you should try with a larger distance: being very close from the light source doesn't work well. I guess this is how the built-in camera was designed for.

Also, I would suggest you try with another LED since it will give more data, the X/Y tracking is then much much better. Using the smoothing on the IR data, maybe it will help.

There is something else you have to know about Max 5. The CNMAT osc-route object is broken (or used to be, I am not really sure mine seem to work well Content.txt file says : Packdate: Feb 24 2009, 12:45:14). The symptom is spurious 0 values inserted in the middle of the stream of data. Check your CNMAT extensions version, and the problem should go away.

Oh, and please send me the patch as well, I'll have a look (camille at osculator dot net).



03-31-2009, 11:10 PM
Hey Camille,

Thanks so much for you help.

After reviewing, I have discovered the poor data stream is largely down to the diode's intensity (which is probably why the candle works better!) and it also must be directed at the IR sensor, rather than side-on (as was in my test environment.. simple mistake)

I believe my OSC-Route object is up to date, Contence.txt states; Packdate: Mar 03 2009, 12:33:55. I've also managed to avoid data being streamed back into the OSC-route object causing endless Max window errors by simply writing the OSC-route address in full (OSC-route /wii/1/ir/xys/1 /wii/1/ir/xys/2 /wii/1/ir/xys/3 /wii/1/ir/xys/4) I don't think this was the same error you stated in the original 'OSCulator to Max 5.pat' file but it hopefully enables smoother operation.

My next bit of troubleshooting will be with 3 LED's, I'm going to test with an alternative Wiimote and some higher intensity LED's at distance. I'm also building a glove to house the LED's so I need to test if the proximity of each LED affects the IR detection. Any more suggestions would be appreciated as always!

Thanks again,

I will send the patch to you tomorrow after I've tidied it up a little :)

p.s. your osculator software has saved my project!


04-01-2009, 10:26 PM
Cool to hear that it is working better, I am looking forward to seeing your corrected patch. Thanks!