\documentclass[amssymbols,12pt]{article}
%\input{/home/robo6/sastry/lygeros/RES/PAPERS/Format/macros}
%bibliographystyle{/home/robo6/sastry/lygeros/RES/PAPERS/Format/IEEE}
%\usepackage{psfig}
%\usepackage{fancyheadings}
\topmargin = -0.5 in

\leftmargin = 0.9 in
\oddsidemargin =  0.10 in
\textheight = 9.0 in
\textwidth = 6.6 in
\pagestyle{plain}
\parindent = 0.7 in
\setlength{\parskip}{2mm}
\setlength{\parindent}{0mm}
\def\Init{\mathrm{Init}}
\def\Inv{\mathrm{Inv}}
\def\Out{\mathrm{Out}}
\def\Reach{\mathrm{Reach}}

\newcommand{\lecturetitle}[4]{
  \noindent
  CS 280, Computer Vision (Prof. Jitendra Malik) \hfill #3\\
  Lecture \##1 (#2) \hfill {\bf DRAFT} Notes by #4\\[-.05in]
  \mbox{}\hrulefill \mbox{}\\}

\begin{document}

% MODIFY THE FOLLOWING TO INCLUDE THE LECTURE #, TOPIC, DATE, and YOUR NAME
\lecturetitle{5}{Rotation and Translation}{Feb 3, 1999}{Yogesh Bhumralkar}


\textbf{Isometry}: preserves distances\\
\begin{equation}
\Vert \psi(\bar{a}) - \psi(\bar{b})\Vert = \Vert\bar{a}-\bar{b}\Vert
\end{equation}

\textbf{Examples}:
\begin{enumerate}
\item Translation
\item Rotations and Reflections in 2-D
\end{enumerate}

Orthogonal Transformation:  Linear Tranformation
\begin{equation}
\psi(\bar{a})\cdot \psi(\bar{b}) = \bar{a}\cdot\bar{b}
\end{equation}

Note that for a matrix A:
\begin{displaymath} \psi(\bar{a}) = A\bar{a} \end{displaymath}
\begin{displaymath}
\psi(\bar{a})\cdot \psi(\bar{b}) = (A\bar{a})^T(A\bar{b}) = \bar{a}^T\bar{b} \\
\end{displaymath}
\begin{displaymath}\bar{a}^TA^TA\bar{b} = \bar{a}^TI\bar{b}\end{displaymath}

This implies that:
\begin{equation} A^TA = I \end{equation}
or
\begin{equation} A^T = A^{-1} \end{equation}
So,
\begin{displaymath}
A = \left( \begin{array}{ccc}
\vert & \vert & \vert \\
r_1 & r_2 & r_3 \\
\vert & \vert & \vert
\end{array} \right)
\end{displaymath}

\begin{displaymath}
A^{-1} = \left( \begin{array}{ccc}
- & r_1^T & - \\
- & r_2^T & - \\
- & r_3^T & -
\end{array} \right)
\end{displaymath}
Since the colunmns of the matrix A are orthonormal, we have:
\begin{displaymath}
A^{-1}A = \left( \begin{array}{ccc}
r_1^Tr_1 & r_1^Tr_2 & r_1^Tr_3 \\
r_2^Tr_1 & r_2^Tr_2 & r_2^Tr_3 \\
r_3^Tr_1 & r_3^Tr_2 & r_3^Tr_3
\end{array} \right) = \left( \begin{array}{ccc}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{array} \right)
\end{displaymath}
The components of the comlumn vectors of the matrix A act like the Kronecker Delta function:
\begin{displaymath} r_i^Tr_j = \delta_{ij} \end{displaymath}
where $\delta_{ij}$ is 1 if $i=j$ and 0 otherwise.

\begin{displaymath} AA^T = I \end{displaymath}
\begin{displaymath} (det \;A)\times(det \;A^T) = (det\;I) = 1 \end{displaymath}
\begin{displaymath} (det \; A)^2 = 1 \end{displaymath}

We note the following important facts:
\begin{itemize}
\item det A = +1  implies \textbf{Rotations} \\
\item det A = -1  implies \textbf{Reflections}
\end{itemize}

Example of rotation (ie, det A = +1):
\begin{displaymath}
A =  \left( \begin{array}{ccc}
\cos \theta & -\sin \theta \\
\sin \theta & \cos \theta
\end{array} \right)
\end{displaymath}

Example of reflection (ie, det A = -1):
\begin{displaymath}
A =  \left( \begin{array}{ccc}
\cos \theta & \sin \theta \\
\sin \theta & -\cos \theta
\end{array} \right)
\end{displaymath}
Note that 2 reflections equal a rotation but the converse is not true!


\textbf{Orthogonal Transformations preserve norms}. That is to say:
\begin{displaymath} 
\Vert A \bar{v} \Vert = \Vert \bar{v} \Vert 
\end{displaymath}
\begin{displaymath}
\Vert A \bar{v} \Vert^2 = (A\bar{v})^T(A\bar{v}) = \bar{v}^TA^TA\bar{v} = \bar{v}^T\bar{v} = \Vert \bar{v} \Vert^2
\end{displaymath}
Note that translations do not preserve norms (ie, the distance with respect to the origin changes).  Only the distance between pairs of points is preserved with translations.
\textbf{Orthogonal Transformations preserve distances}.  This means that:
\begin{displaymath}
\Vert A\bar{v} - A\bar{w} \Vert  = \Vert A(\bar{v}-\bar{w}) \Vert = \Vert \bar{v}-\bar{w} \Vert
\end{displaymath}
Since the norm is preserved (as we saw earlier), this is in fact true.

%\flushleft
\newtheorem{theorem}{Theorem:}[section]
\begin{theorem}
Any isometry can be expressed as the combination of an orthogonal transformation followed by a translation as follows:
\begin{displaymath} \psi(\bar{v}) = A\bar{v}+\bar{d} \end{displaymath}
where $A$ represents the orthogonal matrix and $\bar{d}$ is the translation vector.
\end{theorem}

A proper isometry (also called rigid body motion) is one that requires that $det A = +1$

\textbf{Group Structure of Rigid Body motions}:
\begin{displaymath}
\psi_2(\bar{v})=A_2\bar{v}+\bar{d}_2 \qquad \psi_1(\bar{v})=A_1\bar{v}+\bar{d}_1
\end{displaymath}
$\psi_1 \circ \psi_2$ means $\psi_1$ composed $\psi_2$ (ie, apply $\psi_2$ first and then apply $\psi_1$)
\begin{eqnarray}
\psi_1 \circ \psi_2(\bar{v}) & = & A_1(A_2\bar{v}+\bar{d}_2)+\bar{d}_1 \\
 & = & A_1A_2\bar{v}+A_1\bar{d}_2+\bar{d}_1\\
 & = & (A_1A_2)\bar{v}+(A_1\bar{d}_2+\bar{d}_1) \\
 & = & A_3\bar{v} + \bar{d}_3
\end{eqnarray}
where $A_3=A_1A_2$ and $\bar{d}_3=A_1\bar{d}_2+\bar{d}_3$\\
Assumption:  The product of two orthogonal matrices is orthogonal.
\\
Closure Property:\\
$\psi_1 \circ \psi_2 = \psi_3$ is also a rigid body motion.\\
\\
Identity Exists: \\
$A = I$, $\bar{d}=0$ \\
\\
Inverse exists for each element:\\
$A_1A_2 = I$ and $\bar{d}_3 = A_1\bar{d}_2+\bar{d}_1 = 0$.  This means that $\psi_1$ is the inverse of $\psi_2$.  $A_1=A_2^T$ and $\bar{d}_2=-A_1^{-1} \bar{d}_1$\\
\\
Associativity: \\
Rotations constitute a group but reflections by themselves don't! \\

\textbf{Jargon}: \\
$O(n)$: group of orthogonal transformations from $R^n \longmapsto R^n$ \\
$SO(n)$: special, orthogonal group.  $det = +1$ (ie, rotations).  No translations. \\
$SE(n)$: group of proper rigid body motions.  Proper orthogonal (ie, $det=+1)$ followed by Translation.  The E in SE stands for Euclidean. \\
\\
\textbf{Rotation Matrices}: 3D \\
\begin{itemize}
\item Rotation about z-axis by $\theta$:
\begin{displaymath}
\left( \begin{array}{ccc}
\cos \theta & -\sin \theta & 0 \\
\sin \theta & \cos \theta & 0 \\
0 & 0 & 1
\end{array} \right)
\end{displaymath}

\item Rotation about x-axis by $\theta$:
\begin{displaymath}
\left( \begin{array}{ccc}
1 & 0 & 0 \\
0 & \cos \theta & -\sin \theta \\
0 & \sin \theta & \cos \theta
\end{array} \right)
\end{displaymath}
\end{itemize}

\textbf{Vector (Cross) Product}: Denoted $\bar{a}\times\bar{b}$ or $\bar{a}\wedge\bar{b}$
\begin{equation}
\left( \begin{array}{ccc}
a_1 \\ a_2 \\ a_3 \end{array} \right) \times
\left( \begin{array}{ccc}
b_1 \\ b_2 \\ b_3 \end{array} \right) = \left( \begin{array}{ccc}
a_2b_3-b_2a_3 \\ a_3b_1-a_1b_3 \\ a_1b_2-a2b_1 \end{array} \right)
\end{equation}
Another way of looking at this is to imagine multiplying the vector $\bar{b}$ by a matrix $\hat{a}$ such that:
\begin{displaymath}
\hat{a} = \left( \begin{array}{ccc}
0 & -a_3 & a_2 \\
a_3 & 0 & -a_1 \\
-a_2 & a_1 & 0
\end{array} \right)
\end{displaymath}
We immediately see that that the cross product operation is equivalent to this matrix multiplication (ie, $\bar{a}\times\bar{b}=\hat{a}\bar{b}$).  A is called a \textbf{Skew-Symmetric Matrix} because $\hat{a}^T=-\hat{a}$ \\
\\
\textbf{Definition}:  A skew-symmetric matrix S is one that satisfies the condition $S^T=-S$ (ie, $S_{ij}=-S_{ji}$ and $S_{ii}=0$)\\
\\
Given a rotation matrix R, what is the axis/amount of rotation (and vice versa)?  Consider Rotation about the axis $\omega$ (assume $\Vert\omega\Vert=1$):\\
\begin{displaymath} \dot{q}(t)=\bar{\omega}\wedge\bar{q}(t) \end{displaymath}
\begin{displaymath}
\bar{q}(t)=e^{\bar{\omega} t}\cdot\bar{q}(0) = R(\bar{\omega},t)\cdot\bar{q}(0)
\end{displaymath}
Recall,
\begin{equation}
e^{At} = I+At+\frac{A^2t^2}{2!}+\frac{A^3t^3}{3!}+\ldots
\end{equation}
\\
\textbf{Define} the following quantities:
\begin{itemize}
\item Axis of rotation is $\bar{\omega}$
\item Amount of rotation is $\theta$
\item The Orthogonal Rotation Matrix is $R=e^{\hat{\omega}\theta}$ where $\hat{\omega}$ is the skew-symmetric matrix.
\end{itemize}

\textbf{Rodrigues Formula}: in 3-D
\begin{equation}
R(\omega,\theta)=I + \hat{\omega}\sin\theta+\hat{\omega}^2(1-\cos\theta)
\end{equation}
where $\hat{\omega}$ is the axis of rotation and $\theta$ is the amount of rotation.

\end{document}






