Averaging quaternions

I assume you are thinking of unit quaternions and you are using them to represent rotations? If that is the case then here is a paper on the related subject of means and averages in the rotation group. It might not be a very easy read though if you don't understand the notation.

Barring that, Here's what I might try: Pick a canonical form for your quaternions. Then convert each to the canonical form and finally perform your weighted linear combination.


There is a technical report from 2001 which states that the mean is actually quite a good approximation, provided that the quaternions lie close together. (for the case of -q=q, you could just flip the ones that point in the other direction by pre multiplying them by -1, so that all of the quaternions involved life in the same half sphere.

An even better approach is sketched in this paper from 2007, which involves using an SVD.