General Wiimote and Technology > Project Ideas

Dual Wiimote 3DOF single IR source tracking

<< < (3/3)

Hey,

--- Quote from: defray on February 24, 2008, 08:45:21 AM ---In infrared the Wiimote essentially only sees a dot of light on an 2D-pane, but with two Wiimotes you get two different panes and you can easily calculate a 3D position.

--- End quote ---

Could you post some link that can explain how to get a 3d position from two different panes?

thanks

nebulus:
@ vadali  - take a look at my post on this thread (Posted on: February 19, 2008, 06:29:22 AM)

What I'm doing is calculating the objects position in 3D by using simple ray casting calculations.
Knowing the Field Of View of the wiimote (roughly 41x31 degrees) I can calculate the direction the source is relative to the wiimote given the numbers it is returning.
Its by comparing these two directions that the wiimotes return that I can calculate where the source is in 3D, this is done using the shortest line between rays test that is in the earlier post.

I recommend looking at a text book on frustums the OpenGL redbook has a nice section on exactly this type of concept...

@ tarantula

Each wiimote sees the each source from one perspective, using only 1 wiimote and 1 source allows you to calculate relative direction of the source from the wiimotes direction, but no information about the distance.
Using a second wiimote gives me the direction of the source from two perspectives, and using some simple ray calculations (give that I know the postions of the wiimotes and their FOV's) I can calculate the position of the source with respect to the wiimotes.

You always need three points of interest two of which you must know the relative positions of with respect to each other, for my demo I know the position/orientations of the two wiimotes, and I want to find the IR source's position relative to them.  In Johnny's headtracking VR demo, its the other way round, the wiimote is static, but you know the position of the two IR sources on his glasses, relative to each other.

Its effectively simple triangle geometry where you know the length of one side of the triangle and one (or more) of angles in the triangle...

@ inio  - Ok I understand now what you mean by the intrinsic/extrinsic stuff now!
I come from the 3d graphics and VR side rather than machine vision!
I'm not sure that wiimotes are really high enough quality for what you want, mine all produce really jittery data, which is a real pain.  I can smooth it over time but that introduces a big latency which is a pain for the application I'm using it for...

Incidentally given your from the machine vision side of things, I'd like to do what the wiimote does and convert an image into several blob samples of just x,y coordinates.  I've got a vaio laptop with integrated camera, and want to do something along the lines of this:

Just need the library/algorithm to convert the image to blob data...

@nebulus
for a library check out opencv http://opencvlibrary.sourceforge.net/, or http://opencvlibrary.sourceforge.net/ (which uses opencv as its base), this has alot of algorithms already built in.

I understood the algorithm, and since i am not that familiar with 3d graphics, i was more concerned with how to get the direction vector of each wiimote - how do I map the (x,y) plot I get from the wiimote's pane, and translate it into a vector. if I get these two vectors, it will be simple to get the mid-point of their shortest line, I just dont know how to get the direction vectors all together..

thanks alot,