Hi Brian I have also sended a mail to you,
from the Wiimote Acc. we can calculate only the pitch and roll, only when the data are between (-1,1), yaw can not be calculated, becouse
the gravity is going in the Z direction and in that case the Acc at X, and Y is Zero, so no yaw is possible from the acceleration. Also the pitch and roll are
correct only if the Wiimote is not acceleration (moving) becouse then tha value are bigger than (-1,1). I was also thinking to Integrat over the Wii motion and get the offset and i implemented this,
but if you move the wiimote and you are rotating the wiimote than the data is not valid any more. So the solution is to use the IR.
So I measured the Focal lenght, 1320 pixels, but I dont really know how to make the Relatioinship between the 3D Ir and the 2D (projected Ir).
I need this becouse I want to calculate the motion and the angels of the Wiimote.
My Idea is to minimize a objective funciton min(R,t)=pow( P[R,t]Xw - Xp), 2)
P - Camear Matrix
R - Rotation Matrix
t - Translation Vector
Xw - Ir on the Sensor bar, i build my own sensor bar with Ir on rectangle
Xp - are the projected Ir on the Image Plane
So if I minimize this function for every two diff. Images ( that i have during the rotation or the movement of the Wiimote ), I can get the pure Rotation and Translation of the Wiimote, and I allready build an OpenGL program for the Wiimote, there I draw a Virtual Wii.
But for all this I need the Point correspondencies between the Xw(Ir on the sensor bar) and the Xp(the projected Ir), for this correspondencies I need the projection Matrix.
Do you have any Idea, how can I or We make this?
Or my problem is more, how to define the Coordinate System.
Becouse i have the projection matrix and tha camera matrix
Camermatrix= ( fx, -tanQ*fx, Hx
0, fy, Hy,
0, 0, 1)
I assume we can take -tanQ*fx= 0, and I am not so sure if we need Hx and Hy
Projection matrix ( fx, 0, 0, 0
0, fy, 0, 0
0, 0, 1, 0 ) where fx=fy= 1320
The Ir on my sensor bar are at position:
IR1 (10,10), IR1(30,10) IR3(30,30) and IR4(10,30) in cm
So can if the wiimote is on distant 70cm, can I say, IR1(10,10,70) IR2(30,10,70) IR3(30,30,70) and IR4(10,30,70)
and this are my World Coord. projected with the above matrix I get 4 2D Ir Data
so if I put the wiimote to point to the center of the Sensor bat, at positon (20,20,0)
can this be my coord. system.
If yes, then this si my calibration point, where the Rotationmatrix is the Identity matrix
Can thsi work like this
Best wishes,
Dime Vitanovski