\documentclass[12pt]{article}
\usepackage{fullpage}
\usepackage{psfig}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{latexsym}
\usepackage{floatflt}

\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{14}{Occluding Contours}{March 10, 1999}{Cory Sharp}

% INCLUDE AN OUTLINE OF THE CLASS TOPICS

\begin{itemize} 
  \item Intro to occlusion
    \subitem Properties of occluding contours
    \subitem Consequences of ${\bf p} \cdot {\bf n}_s = 0$
    \subitem Shape from silhouettes
  \item Identifying occlusion
    \subitem Texture
    \subitem Stereo
\end{itemize}

% THE NOTES WILL GO HERE

\section{Intro to occlusion}

In the scene in Figure \ref{fOcclTjunc}, surface $S1$ is closer than and
obscures a portion of surface $S2$.  In the neighborhood of a T-junction as
in Figure \ref{fOcclEdge}, the edge or limb with continuity is called either
an occluding edge or occluding limb, respectively.

\begin{figure}[ht]
  \centerline{\psfig{file=lec14-fig1.eps}}
  \caption{Occluding T-junctions}
  \label{fOcclTjunc}
\end{figure}

\begin{figure}[ht]
  \centerline{\psfig{file=lec14-fig2.eps}}
  \caption{Occluding edges and limbs}
  \label{fOcclEdge}
\end{figure}

Not all T-junctions are cues for occluding edges or limbs.  For instance,
the T-junction in Figure \ref{fNotOcclEdge} is more likely the result of a
reflectance discontinuity.

\begin{figure}[ht]
  \centerline{\psfig{file=lec14-fig3.eps}}
  \caption{Non-occluding T-junction}
  \label{fNotOcclEdge}
\end{figure}

\subsection{Properties of occluding contours} 

Two significant properties of occluding contours are
\begin{enumerate}
  \item Tangency
  \item Conjucacy
\end{enumerate}

\begin{figure}[ht]
  \centerline{\psfig{file=lec14-fig4.eps}}
  \caption{Contour generator and occluding contour}
  \label{fContourGen}
\end{figure}

Figure \ref{fContourGen} illustrates the geometric relationship between a
contour generator and the spherical projection of the corresponding
occluding contour.  Mathematical relationships between the surface, contour
generator, and occluding contour are derived.

Let ${\bf r}(s)$ be the vector from ${\bf c}$ to a point on the 3D surface,
where $s$ is the arclength along the contour generator.  Let $r(s)$ be the
distance from ${\bf c}$ to ${\bf r}(s)$.  And, let ${\bf p}(s)$ be the
projection of ${\bf r}(s)$ onto the viewsphere.  Then, it holds that
\begin{equation}\label{eqConGen} {\bf r}(s) = r(s) {\bf p}(s). \end{equation}

Differentiating equation \eqref{eqConGen} with respect to $s$, we get
\begin{equation}\label{eqConGenDiff} {\bf r}_s = r_s {\bf p} + r {\bf p}_s.
\end{equation}  Notice that ${\bf r}_s$ is the tangent direction on the
contour generation, and ${\bf p}_s$ is the tangent direction on the
projected contour.

If ${\bf n}$ is normal to the surface, it is clear that ${\bf r}_s$ is
perpendicular to ${\bf n}$.  Also, due to tangency of occluding contours,
${\bf p}$ is perpendicular to ${\bf n}$, as well.  Now, take the dot product
of both sides of equation \eqref{eqConGenDiff} with respect to ${\bf n}$:
%
\begin{eqnarray} \label{eqDotn}
  {\bf r}_s \cdot {\bf n} & = &
    r_s {\bf p} \cdot {\bf n} + r {\bf p}_s \cdot {\bf n} \nonumber \\
  0 & = & 0 + r {\bf p}_s \cdot {\bf n} \nonumber \\
  {\bf p}_s \cdot {\bf n} & = & 0 
\end{eqnarray}

The conclusion of equation \eqref{eqDotn} is that ${\bf n}$ is perpendicular to
${\bf p}_s$, the direction tangent to the projection of the occluding contour.
This result, coupled with the tangency of the contour, necessarily implies
%
\begin{eqnarray} \label{eqPerpn}
  {\bf n} = \frac{{\bf p} \times {\bf p}_s}{||{\bf p} \times {\bf p}_s||}
\end{eqnarray}

\subsection{Consequences of ${\bf p} \cdot {\bf n}_s = 0$}

Differentiating ${\bf p} \cdot {\bf n} = 0$ with respect to s and applying
equation \eqref{eqDotn}, we conclude \begin{equation} \label{eqPNs} {\bf p}
\cdot {\bf n}_s = 0. \end{equation}

Let $\theta$ be the angle between ray ${\bf p}$ and ${\bf r}_s$ (the tangent
to the contour generator).  Equation \eqref{eqPNs} leads to the following
consequences:

\begin{enumerate}
  \item If ray ${\bf p}$ is along a principle direction, then the contour
generator runs along the other principle direction.
  \item At a parabolic point, the contour generator direction is parallel to
the axis of the cylinder.
  \item Ray lies along an asymptotic direction tangent to contour generator
and ray are parallel.  {\em (fixme, notes are unclear)}
\end{enumerate}

\begin{figure}[ht]
  \centerline{\psfig{file=lec14-fig5.eps}}
  \caption{Shadow boundary as an occluding contour}
  \label{fCylinder}
\end{figure}
Shadow boundaries act just like occluding contours.  For instance, in Figure
\ref{fCylinder}, the shadow boundary is parallel to the axis of the cylinder.

\subsection{Shapes from silhouettes}

Using the occludings contour of an object from a series of pictures from
different directions, successsive bounds can be placed on the maximum space
occupied by the object.  Figure \ref{fSilho} illustrates this idea - a
camera moves around an object, and each frame adds a constraint to the
maximum volume in which the object lives.

\begin{figure}[ht]
  \centerline{\psfig{file=lec14-fig6.eps}}
  \caption{Visual hull from silhouettes}
  \label{fSilho}
\end{figure}

The oct-tree is suggested as the core data structure in a possible algorithm
for computing the ``visual hull'' of an object.


\section{Identifying occlusion}

Four major cues can be used to identify occurences of occlusion:
%
\begin{enumerate}
  \item Texture
  \item Stereo
  \item Motion
  \item Junctions
\end{enumerate}

\subsection{Texture}

The distortion of the pattern of texture can be a significant cue for
determining to correct surface for line labeling.  The texture pattern on
the surface of an object in the neighborhood of a contour of that object
will be an elongated version (in the direction of the contour) of the
texture pattern proper.  That is, texture near the occluding conture of
surface tends to be parallel to the contour.  This is demonstrated in Figure
\ref{fTexture}a.

Conversely, arbitrary texture not on the surface of the object tends to be
biased toward being perpendicular to the occluding contour.  This is
demonstrated in Figure \ref{fTexture}b.

\begin{figure}[ht]
  \centerline{\psfig{file=lec14-fig7.eps}}
  \caption{Occluding contours from texture cues}
  \label{fTexture}
\end{figure}


\subsection{Stereo}

Disparity measurements from stereo vision can be used to determing occluding
contours.  In Figure \ref{fStereo}, the object in the left eye is uniformly
surrounded by pattern $P_1$.  In the right eye, a pattern $P_2$ not present
in the image in the left eye can be detected around the object.  As a
result, it can be decided that the right side of the object is an occluding
contour in the image of the right eye.  This condition is referred to as
{\em half occlusion}.

Occluding contours from stereo cues will be further embelished next lecture.
%
\begin{figure}[ht]
  \centerline{\psfig{file=lec14-fig8.eps}}
  \caption{Occluding contours from stereo cues}
  \label{fStereo}
\end{figure}


\end{document}


