\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{3}{Curves, Shapes, and Poses}{Jan 27, 1999}{Andras Ferencz}

% INCLUDE AN OUTLINE OF THE CLASS TOPICS

{\bf Contents}

\begin{itemize} 
  \item Curvature
  \subitem Types of Patches
  \subitem Gaussian Curvature
  \item Shape and Pose
  \subitem Local Pose
  \subitem Back Projection Map
\end{itemize}

% THE NOTES WILL GO HERE

\section{Curvature}
     Not all surfaces are flat.  Thus we need a way to characterize the local shape of the
surface of an object.  That is, given a point $P$ on the surface, we want to know how the surface
normal vector $\vec{n}$ changes as we travel on some tangent curve passing through $P$.  

{\bf The Normal Curvature} of a surface $K_n$ is the directional derivative of $\vec{n}$.  That
is, we associate a $K_n$ with each direction along the tangent plane of the surface at P.  The
extrema of Kn are called {\bf principal curvatures} and are usually denoted $K_1$ and  $K_2$. 

\proclaim Theorem 3.1. The two principal curvatures $K_1$ and $K_2$ are perpendicular.  (no
proof)

\proclaim Corollary 3.2. $K_n$ for all direction can be determined from the two principal
curvatures.  It is given by 
$$ K_n = K_1 \cos^2 \theta + K_2 \sin^2 \theta $$ where $\theta $ is the angle of $K_n$
measured from $K_1$. 

\subsection{Types of Patches}

K1 and K2 may be positive (for a convex curve), zero ( for a flat line), or negative (for a concave
curve).  Depending on the sign of K1 and K2, three types of patches (local surface
neighborhoods) are defined: 
 
\proclaim Elliptical patch. $K_1$ and $K_2$ have the same sign (both are positive or negative).
Example:  Football $K_1 = 1/r$, $0 < K_2 < 1/r$ 

\proclaim Hyperbolic patch. $K_1$ and $K_2$ have the opposite sign (one is positive and the
other is negative).
Example:  Saddle $K_1 > 0$, $K_2 < 0$. Note that Kn must be zero on some line passing
through P.

\proclaim Parabolic patch. Either or both $K_1$ and $K_2$ are zero.
Example:  Cylinder $K_1 = 1/r$, $K_2 = 0$ 

Note that a line is concave versus convex ($K_n$ positive or negative) by convention only.
Flipping the normal vector to the other side changes the sign without changing the curve. Thus in
the above only the change in sign between $K_1$ and $K_2$ matters. 

\subsection{Gaussian Curvature}

$K_n$ at a point on a surface can clearly be changed by bending the surface. For example, a flat
sheet can be bent into the shape of a cylinder, thus changing $K_1$. However, a flat sheet can
not be bent into any arbitrary shape, such as a sphere, without stretching (distorting) the
material. What is the difference between these two transformations?

\proclaim Definition 3.3. Given a two-dimensional surface in a three-dimensional space, we
define two different distances between two points on this surface.  {\bf Intrinsic distance} is the
distance of the two point along the surface. {\bf Extrinsic distance} is the distance of the two
points in the three-dimensional space.

Bending the flat sheet described above in any way changes the extrinsic distance of some points. 
However, bending without stretching does not change the intrinsic distance of any points.  

\proclaim Definition 3.4. Gaussian Curvature (GC)
$$ GC = K_1 * K_1 $$.

Example 4. Plane and cylinder have $GC = 0$. Sphere and Football have $GC > 0$.  Saddle has
$GC < 0'$.

\proclaim Theorem 3.5. Intrinsic distances on a surface are preserved by a transformation if the
Gaussian Curvature is unchanged at all points.  Bending preserves Gaussian Curvature. 


\section{Shape and Pose}

An object's {\bf Shape} is preserved under rotation and translation (it's $K_n$'s and thus its GC
are also preserved).  {\bf Pose}, on the other hand, is the relationship of the object to a set frame
- its location (a.k.a. ``attitude''). This can be characterized by a distance (3 parameters) and
rotation (another 3 parameters). 

Characterizing shape can be divided into a local and a global problem.  The local problem is
relatively easy, and is based on differential geometry developed in the last century by the likes of
Gauss and Euler. However, the global problem is very difficult.  Topology can help, though two
very different objects can have the same topology (a mug and a donut, for example) and in
vision we want to identify different objects from a projection even if they have the same
topology. 

\subsection{Local Pose} 
 
So far we have been describing the local pose of a patch surrounding point P by the distance $r$
(from P to the focal point F), and the slant $\sigma$ (the angle between the line $P-F$ and the
normal vector $\vec{n}$).  However one degree of freedom is missing. 

\proclaim Definition 3.6. The tilt $\tau$ is the direction in with r changes the most (the gradient
of r). 

To visualize this, as an angle, the tilt is the direction of $\vec{n}$ projected back onto the
viewing plane.  

\subsection{Back Projection Map}

In vision, we are interested in the appearance of objects as they are projected onto a viewing
surface.  The size and shape of objects appear to change in the image as they move and rotate in
the scene.  Given ($r,\sigma,\tau$), we can calculate the appearance of an object in an image. 

Imagine a flat infinite surface on which flat objects are placed.  As these objects are moved,
there are 2 effects on their appearance to consider:
\begin{itemize}
\item Shrinkage: as an object is moved farther ($r$ increases), the object appears smaller.
\item Foreshortening: as an object is moved farther, the object appears thinner.
\end{itemize}

\proclaim Definition 3.7. The back projection map $F(p)$ is the inverse of the projection of the
point P onto the viewing surface (viewsphere):
$$ F:  \Sigma  \Rightarrow S $$
where $\Sigma$ is the viewshere and $S$ is the surface in the world. This can be calculated by:
$$ F(\vec{p})=r(\vec{p})\vec{p}. $$

Unfortunately, we often do not know $r(\vec{p})$, making the above calculation difficult.


\proclaim Definition 3.8. $F_*$ is the derivative of $F$.

As we will see next time, given the right basis

$$ F_* = \left[\matrix{r/\cos\sigma&0\cr0&r}\right]$$.


\end{document}

