# comp.graphics.algorithms

## Subject: 3D rotation estimate via least squares

I need to estimate a camera orientation given only its relative
orientation with regard to some other cameras, and where the relative
orientations are not exact. For example, I would like to arrive at a
linear system of the form shown below, so that I can solve for C2 via
least squares:

C1 = C0 + R01
C2 = C1 + R12
C2 = C0 + R02

here Cx is a 3D rotation describing the orientation of camera x and Rxy is
the relative orientation (e.g. the first equations says that the
orientation of camera 1 is given by camera 0 rotated by R01). Note that
this is only a small example, in the real case, I need to solve for 10+
cameras.

Now if I could form equations like this, I would be able to solve them
easily. The trouble is, if I use, say, quaternions to describe the
rotations, then multiplication rather than addition should be used to
combine rotations, so the equations would instead look like:

C1 = C0 * R01
C2 = C1 * R12
C2 = C0 * R02

and this is no longer a set of linear equations that I can solve with
least-squares (e.g. SVD). (I think)

I'm hoping that someone can suggest how to 'linearize' this problem. For
example, is there is a way of expressing rotations so that combined
rotations are expressed as addition? I'm pretty sure that Euler angles
will not work here.

Thanks for any tips,

Jason.