Wiimote Project » General Category » General Discussion » distance from Sensor Bar
: [1]
   
: distance from Sensor Bar  ( 7081 )
0 and 1 Guest are viewing this topic.
*
Karma: +3/-0
: 39
Offline Offline
« : December 14, 2008, 10:43:09 AM »

How to calculate distance from Sensor Bar?
could you give me some examples ?


I found this:
Code: [Select]
Now, we can obtain the ecuations of both lines, from wiimote to each IR diode, but we need a value for the depth. After a couple of failed attempts using the diode size detected by the camera, the solutions was take some measurements, composing a table with pairs: (distance to wiimote , distance of the IR dots in the camera space). With this table you can make a simple numerical regression, and realize that the ecuation is just a parametriced first order inverse function, something like

f(x) = k.x^-1

where x is the distance between the IR dots in camera space, f(x) is the depth from the camera of the IR diode, and k is a parameter depending on the distance of the IR diodes in real world terms.

The tracking using this technique was better than I spected, with very low error, about 2 or 3 centimeters in a general case. In extreme cases, as very very close to the camera, or very far, the error increases, of course.

Could someone explain this to me?
Thanks
« : December 14, 2008, 11:04:19 AM eziosoft »

*
Karma: +1/-0
: 21
Offline Offline
« #1 : February 06, 2009, 07:42:59 PM »

Hi,

Ok, some explanations :

I made some measurements with the library fwiine v0.3  and Matlab.
First, a picture explains how to reproduce the same measures :
(be careful of specific conditions : angles = 90° and between 10 and 120cm)
(description of the experiment with a wiimote and a wireless sensor bar)
(zf is the theor. distance between wiimote IR sensor and middle of objective. including magnification to be simple...)
It means the equation : d/k = zf/z
So you will obtain z = zf*k/d and by the same way d = zf*k/z

Ok let's experiment with fwiine http://fwiineur.blogspot.com/
Several measures were performed in order to observe an expected function d=f(z).
First to check when the acquisition of 2 IR dots is available and then to check the robustness of the measures. You will find the compilation of them with an excel file :
(2 differents cases comes from the selection of IR dots by the Wiimote)

Out of 60 cm, there is only one kind of measurement and, in this area, you will deduce zf ~ 1.36cm (for k ~ 20cm)
Under a distance of 60 cm both cases are existing and you will see the wiimote can distinguish additionnal points from my sensor bar. Especially, in this case there is a big problem of robustness to define position z from d.
After some calculations, the new size of the sensor bar was 1.61 cm... In fact this is the distance between 2 Infrared Led on the left side of the sensor bar. It means the IR device switch between 2 areas because the aperture angle of the wiimote IR sensor is limited (45° horiz. I suppose)
Well, the theor. curves confirm the problem of robustness with a sensor bar (to be clear about the phenomenom : 3 IR LEDs from each side of the bar leads to 2  IR lights when you are far away of the sensor bar. But when you are near...)
(th. curves from both area of acquisition of a sensor bar to find d=f(z) )
The limitation of the use of the whole range of the sensor bar is zmin=27.2cm.

I guess Nintendo engineers observed the same problem and they didn't think this feature would be enough robust to make some games. If you want to use this feature with a sensor bar to obtain z=f(d), you will have to distinguish 2 areas of measurements. I can be easily tested but robustness will be the main problem.



Have a nice week-end,
Wiilliam


fWiine v0.3 is available, now : http://fwiineur.blogspot.com/2009/02/fwiine-v03-released.html

« : February 08, 2009, 07:06:46 PM williiam »
: [1]
   
 
:  

Clicky Web Analytics