next up previous
Next: Defining the Centre of Up: tr99mj1 Previous: Transformations

RMS Deviation

Consider two transformations, $T_1$ and $T_2$, each mapping volume A to volume B (the reference volume). Now a point in volume A, $x_A$ (a three vector), is mapped to some point in volume B by each transformation. If the transformations are identical then the points in volume B will be the same. However, in general the transformations differ and so map $x_A$ to two different points: $x_{B1}$ and $x_{B2}$. The vector difference between these points, $\Delta x =
x_{B2} - x_{B1}$, represents the error in the transformation. It is the average magnitude of this error that is of interest.

As world coordinates are being used, the magnitude of the error vector, $\vert \Delta x \vert$ is the magnitude of the deviation expressed in millimetres. Therefore some average of this quantity will express the desired average error. Here the root mean square measure is chosen as the desired average since it is easier to deal with analytically.

In addition, the volume of interest for the average must be defined. For measuring the average error over the brain volume a spherical volume is the simplest approximation. A cubic volume is obviously a worse approximation and will tend to be dominated by the error near the corners, which for a rotational error increases with the distance from the centre of the cube.

Using homogeneous coordinates1 the error vector can be written in matrix form as:

$\displaystyle \Delta x$ $\textstyle =$ $\displaystyle M_A x_A$ (1)
$\displaystyle M_A$ $\textstyle =$ $\displaystyle T_2 - T_1$ (2)

or as
$\displaystyle \Delta x$ $\textstyle =$ $\displaystyle M_B x_B$ (3)
$\displaystyle M_B$ $\textstyle =$ $\displaystyle T_2 \, T_1^{-1} - I$ (4)

The form depends on whether the error is a function of the coordinate in volume A or volume B.

In general, the general form $\Delta x = M x$ can be used to give the squared error:

$\displaystyle E^2$ $\textstyle =$ $\displaystyle \vert \Delta x \vert^2$ (5)
  $\textstyle =$ $\displaystyle (\Delta x)^\top (\Delta x)$ (6)
  $\textstyle =$ $\displaystyle x^\top M^\top M x.$ (7)

The normalised RMS error is then given by:

E_{RMS}^2 = \frac{\int_{V} E^2 \, dx}{\int_{V} \, dx}.
\end{displaymath} (8)

Expanding equation 7 for spherical coordinates, $x = r
\hat{x}$ where $\hat{x} = ( \sin \theta \cos \phi , \sin \theta \sin
\phi , \cos \theta )$, gives:

E^2 = r^2 \hat{x}^\top A^\top A \hat{x} + 2 r t^\top A \hat{x} + t^\top t
\end{displaymath} (9)

where the 4 by 4 matrix $M$ is decomposed into a 3 by 3 matrix $A$, and a 3 by 1 vector $t$, such that:
M = \left[ \begin{array}{cc} A & t \\ 0 \; 0 \; 0 & 0 \end{array} \right].
\end{displaymath} (10)

Now integrating over the desired spherical volume $r \in [0,R];
\theta \in [0,\pi]; \phi \in [ 0 , 2\pi]$ gives:

$\displaystyle E_{RMS}^2$ $\textstyle =$ $\displaystyle \frac{1}{V} \int_0^R dr \int_0^\pi d\theta \int_0^{2\pi} d\phi \;
r^2 \sin \theta \; E^2$ (11)
  $\textstyle =$ $\displaystyle \frac{1}{V} \int_0^\pi d\theta \int_0^{2\pi} d\phi \;
\sin \theta...
...4 \hat{x}^\top A^\top A \hat{x}
+ 2 r^3 t^\top A \hat{x} + r^2 t^\top t \right)$ (12)
  $\textstyle =$ $\displaystyle \frac{1}{V} \int_0^\pi d\theta \int_0^{2\pi} d\phi \;
\sin \theta...
...A \hat{x}
+ \frac{1}{2} R^4 t^\top A \hat{x} + \frac{1}{3} R^3 t^\top t \right)$ (13)

where $V = \frac{4\pi}{3} R^3$ is the spherical volume.

Denoting $\hat{x} = ( \hat{x}_1 , \hat{x}_2 , \hat{x}_3)$ and

\overline{p} = \int_0^\pi d\theta \int_0^{2\pi} d\phi \; \sin \theta \; p
\end{displaymath} (14)

and combining with
$\displaystyle \int_0^{2\pi} d\phi \; 1$ $\textstyle =$ $\displaystyle 2 \pi$ (15)
$\displaystyle \int_0^{2\pi} d\phi \; \sin \phi$ $\textstyle =$ $\displaystyle 0$ (16)
$\displaystyle \int_0^{2\pi} d\phi \; \cos \phi$ $\textstyle =$ $\displaystyle 0$ (17)
$\displaystyle \int_0^{2\pi} d\phi \; \sin \phi \, \cos \phi$ $\textstyle =$ $\displaystyle 0$ (18)
$\displaystyle \int_0^{2\pi} d\phi \; \sin^2 \phi$ $\textstyle =$ $\displaystyle \pi$ (19)
$\displaystyle \int_0^{2\pi} d\phi \; \cos^2 \phi$ $\textstyle =$ $\displaystyle \pi$ (20)
$\displaystyle \int_0^\pi d \theta \; \sin \theta \, \cos \theta$ $\textstyle =$ $\displaystyle 0$ (21)
$\displaystyle \int_0^\pi d \theta \; \sin \theta \cos^2 \theta$ $\textstyle =$ $\displaystyle \frac{2}{3}$ (22)
$\displaystyle \int_0^\pi d \theta \; \sin^3 \theta$ $\textstyle =$ $\displaystyle \frac{4}{3}$ (23)

$\displaystyle \overline{x_1 x_1} = \overline{x_2 x_2} = \overline{x_3 x_3}$ $\textstyle =$ $\displaystyle \frac{4\pi}{3}$ (24)
$\displaystyle \overline{x_1} = \overline{x_2} = \overline{x_3}$ $\textstyle =$ $\displaystyle 0$ (25)
$\displaystyle \overline{x_1 x_2} = \overline{x_1 x_3} = \overline{x_2 x_3} =
\overline{x_2 x_1} = \overline{x_3 x_1} = \overline{x_3 x_2}$ $\textstyle =$ $\displaystyle 0$ (26)

Furthermore, by expanding the matrix product,

\hat{x}^\top Q \hat{x} = \sum_{ij} Q_{ij} \hat{x}_i \hat{x}_j
\end{displaymath} (27)

so that
$\displaystyle \overline{\hat{x}^\top Q \hat{x}}$ $\textstyle =$ $\displaystyle \sum_{ij} Q_{ij}
\overline{\hat{x}_i \hat{x}_j}$ (28)
  $\textstyle =$ $\displaystyle \frac{4\pi}{3} \sum_{i} Q_{ii}$ (29)
  $\textstyle =$ $\displaystyle \frac{4\pi}{3} \ensuremath{\mathrm{Trace}}(Q)$ (30)

where the elements $Q_{ij}$ are constants.

Therefore, by substituting the above results, the RMS error is given by:

$\displaystyle E_{RMS}^2$ $\textstyle =$ $\displaystyle \left(\frac{4\pi}{3} R^3\right)^{-1}
\left( \frac{4\pi}{3} R^3 t^\top t +
\frac{4\pi}{15} R^5 \ensuremath{\mathrm{Trace}}(A^\top A) \right)$ (31)
  $\textstyle =$ $\displaystyle \frac{1}{5} R^2 \ensuremath{\mathrm{Trace}}(A^\top A) + t^\top t$ (32)

next up previous
Next: Defining the Centre of Up: tr99mj1 Previous: Transformations
Mark Jenkinson 2003-02-11