Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Online Smoothing for Hand Tracking Data using Kalman Filters

I'm using Kinect with OpenNI/NITE. OpenNI can track human hands with the assistance of NITE. Also, OpenNI can smooth the tracked hand line, and I was trying to figure out how it does that.

I tried using Kalman filters, replaced the old hand position with the kalman estimated hand position, but still the smoother in OpenNI is much better.

I'd appreciate any clues on how to smooth online data or how to set the parameters in a Kalman filter (something specific to hand tracking, since I already know what the parameters do).

like image 494
Ouais Alsharif Avatar asked May 11 '12 21:05

Ouais Alsharif


1 Answers

Using Kalman filter is not as easy as it seems. You need to choose a good motion model, a good state vector and a good measurement model. For your problem, as I guess you do 3d tracking of position, not orientation (x,y and z position of the hands on the screen) I would choose the following:

State vector =[x, y, z, v_x, v_y, v_z]

Update equations: (x,y,z) = (x,y,z)+ (v_x,v_y,v_z)*delta(t)
velocity would be constant

You also need to set the covariance of error properly, as this will model the error of choosing velocity to be constant (which is not true).

Check this paper. Have a look to the Jacobians needed for the predict and update equations of the filter. They are important. If you consider them identity, the filter will work, but it will only work with accuracy if you choose properly the Jacobians W (multiplies Q), H and A. Q and R are diagonal, try to give values experimentaly.

Hope this helps, good luck.

like image 69
Jav_Rock Avatar answered Sep 29 '22 15:09

Jav_Rock