i've seen several similar questions, , have ideas of might try, don't remember seeing spread.
so: working on measurement system, computer vision based.
i take n captures, , process them using library outputs pose estimations in form of 4x4 affine transformation matrices of translation , rotation.
there's noise in these pose estimations. standard deviation in euler angles each axis of rotation less 2.5 degrees, orientations pretty close each other (for case euler angles close 0 or 180). standard errors of less 0.25 degrees important me. have run problems endemic euler angles.
i want average these pretty-close-together pose estimates single final pose estimate. , want find measure of spread can estimate accuracy.
i'm aware "average" isn't defined rotations.
(for record, code in numpy-heavy python.)
i may want weight average, since captures (and axes) known more accurate others.
my impression can take mean , standard deviation of translation vector, , rotation can convert quaternions, take mean, , re-normalize ok accuracy since these quaternions pretty close together.
i've heard mentions of least-squares across quaternions, of research how implemented has been dismal failure.
is workable? there reasonably well-defined measure of spread in context?
without more info geometry setup hard answer. anyway rotations would:
create 3 unit vectors
x=(1,0,0),y=(0,1,0),z=(0,0,1)- apply rotation on them , call output
x(i),y(i),z(i) - it applying matrix(i) position @
(0,0,0)
do measurements have
now average vectors
x=avg(x(1),x(2),...x(n))y=avg(y(1),y(2),...y(n))z=avg(z(1),z(2),...z(n))
correct vector values
- so make each of
x,y,zunit vectors again - take axis more closest rotation axis main axis
- it stay is
- and recompute remaining 2 axises cross product of main axis , other vector
- to ensure orthogonality
- beware of multiplication order (wrong order of operands negate output)
- so make each of
construct averaged transform matrix
- see transform matrix anatomy
- as origin can use averaged origin of measurement matrices
Comments
Post a Comment