SeedV / SeedUnityVRKit

A toolkit using Mediapipe to run motion tracking in Unity. Support desktop, Android and iOS.
Apache License 2.0
19 stars 3 forks source link

Stablize head rotation movement using Kalman filter #25

Open henryouly opened 2 years ago

henryouly commented 2 years ago

We need to filter the rotation vector from SolvePnP to reduce subtle movement. When using webcam, the movement looks more verbose.

henryouly commented 2 years ago

It seems Kalman filter can be only applied to vectors, not quaternions.

There’s a discussion thread here: https://math.stackexchange.com/questions/2621677/extended-kalman-filter-equation-for-orientation-quaternion

There’s a paper to apply that to quaternion-based orientation tracking: https://kodlab.seas.upenn.edu/uploads/Arun/UKFpaper.pdf

henryouly commented 2 years ago

More understanding of the problems: