\documentstyle[12pt,fullpage,psfig]{article}

\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{11}{Introduction}{March 1, 1999}{Adam Weinberger}

% INCLUDE AN OUTLINE OF THE CLASS TOPICS
\begin{itemize} 
  \item Affine Transformations- Definition and Properties
  
  \item  Projective Geometry-   Definition and Properties

  \item  Introduction to Homogenous Coordinates 
\end{itemize}

% THE NOTES WILL GO HERE

\section{Affine Transformation}

\begin{quote}
  "Like Moliere's character who is pleasantly surprised to find that he has been
speaking prose all his life, you may be pleasantly surprised to learn find that
you have been learning affine geometry most of your life."
\end{quote}

\item  Theorem:  A transformation such that the images of every three collinear points are themselves collinear is an affine transformation.  

\linebreak

\item {\bf PROPERTIES PRESERVED}
   
                     
\item Parallelism  
\item Collinearity - property of being a straight line
\item Incidence    - whether or not a point lies on a curve
\item Ratio of length along a line preserved

-----A------B----------------C--D-------

----A'--B'--------------C'-D'-----------

\item Ratio AB/CD = A'B'/C'D'  preserved:

\item Midpoints : If \alpha\end {math} is an affine transformation
and M is the midpoint of points A and B, then \alpha(M)\end {math}
is the midpoint of \alpha(A)\end {math} and \alpha(B)\end {math}.

\item  One may see this theorem elegantly applied in proving that
the medians of any triangle intersect. (Trivial in the
case of an equilateral triangle, and any triangle may be considered
an affine transformation of an equilateral)











\pagebreak


\item {\bf PROPERTIES NOT PRESERVED}

\item  1. Length
\item  2. Angle
\item  3. Area

\item {\bf General Affine Transformation}

\[\left | \begin{array}{c} 
    x' \\ y'
   \end{array} \right |
= \left | \begin{array}{cl}
 a{11} & a{12} \\
 a{21} & a{22} 
    \end{array} \right |
   \left | \begin{array}{c}
    x{1} \\ y{1}
    \end{array} \right| 
+ \left | \begin{array}{cl}
  d{1} \\ d{2} 
  \end{array} \right | \]

\item Question: If we know the correspondence between points, how can 
\item we estimate the Affine transform?

\item  - We can estimate the shift (d) by taking the mean of a set of
\item    points and comparing it with the mean of the second set.

\item  - To determine A, and if we have a lot of points, we can find
\item    the best match through a least squares fit.

\item  min \sum_{i=1}^{n} \|x' - Ax \|^{2} \]

\section{}

\item {\bf EUCLIDEAN is a subset of AFFINE}
\item {\bf AFFINE is a subset of PROJECTIVE}

\linebreak

\item Whereas, Euclidean geometry formed a special case of Affine
\item Geometry, Affine likewise forms a special case of the 
\item Projective Geometry. Since in Projective geometry, incidence
\item  and parallelism are not preserved, parallel lines interesect at infinity 
\item at an "ideal" point.  This notion, which extends beyond Euclidean concepts,
\item requires the introduction of HOMOGENOUS COORDINATES

\subsection{Homogeneous Coordinates}
\item "In homogeneous coordinates, we add a third coordinate to a point.
\item Instead of being represented by a pair of number (x,y), each point
\item is represented by a triplet (x,y,W).  At the same time, we say that 
\item two sets of homogenous coordinates (x,y,W) and (x', y', W') represent
\item the same point iff one is a multiple of the other" 
\item (Computer Graphics- Foley et al) 

\item Points in P2 projective space are represented as:
\[\left | \begin{array}{c} 
    x{1} \\ x{2} \\ x{3}
   \end{array} \right |\]

\item If we divide through by x{3} we get the point in \Re 2

\item Where do the following two lines intersect in P2?

\[\left | \begin{array}{clcr} 
    a{1} & a{2} & a{3} \\
    b{1} & b{2} & b{3}  
   \end{array} \right |
 * \left | \begin{array}{cl}
   x{1} \\ x{2} \\ x{3}
    \end{array} \right |
  = \left | \begin{array}{c}
    0 \\ 0
    \end{array} \right | \]

\item Solve the system of equations. If a and b are not scalar multiples
\item of eachother, they intersect when x{3} = 0; ie the "ideal point."

\item In general the projective transformation P2 \rightarrow\end {math} P2 
\item looks like:

\[\left | \begin{array}{c} 
    x'{1} \\ x'{2} \\ x'{3} 
   \end{array} \right |
 = \left | \begin{array}{clcr}
   P{11} & P{12} & P{13}\\
   P{21} & P{22} & P{23}\\
   P{31} & P{32} & P{23} 
    \end{array} \right |
  * \left | \begin{array}{c}
    x{1} \\ x{2} \\ x{3} 
    \end{array} \right | \]

\item A transformation of P2 \rightarrow\end {math} P2 has 8 paramters (not 9)
\item since one is a scalar multiple.

\subsection{Nice things about homogeneous Coordinates}

\item 1. If points are expressed in homogeneous coordinates, all three
\item transformations can me treated as matrix multiplications.

\item 2. In projective space, complicated expressions become simpler to handle

\item 3.  With regard to the upper left hand 2x2 submatrix:
\[\left | \begin{array}{cl}
   P{11} & P{12}\\
   P{21} & P{22}
\end{array} \right |\]
\item  If this submatrix is orthogonal, the transformation preserves
\item  angles and lengths (ie Euclidean).
\item If the matrix is of the form:
\[\left | \begin{array}{clcr}
   P{11} & P{12} & P{13}\\
   P{21} & P{22} & P{23}\\
   0 & 0 & 1 
    \end{array} \right |\]
\item This corresponds to an arbitrary sequence of rotation, translation, and 
\item scale matrices. In otherwords, this is an affine transformation.
\item We can therefore see that the Affine is a special case of the
\item projective transform.


% EXAMPLE OF A PostScript FIGURE
%\begin{figure}
%\centerline{\psfig{file=lec4.eps,height=3in}}
%\caption{Illustration}
%\label{surface}
%\end{figure}


.................................................................................

\end{document}

