%-----------------------------------------------------------------------
% Beginning of amsart.template
%-----------------------------------------------------------------------
%
%     AMS-LaTeX v.2 template for use with amsart
%
%     Remove any commented or uncommented macros you do not use.

\documentclass{amsart}[14]
\usepackage{epsf}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{xca}[theorem]{Exercise}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

\numberwithin{equation}{section}

\begin{document}

\title{Application of the Singular Value Decomposition to Image Representation}

%    Remove any unused author tags.

%    author one information
\author{Michael Kirby}
\address{Department of Mathematics, Colorado State University, Fort Collins, CO 80523 USA}
\curraddr{} \email{kirby\@math.colostate.edu}
\thanks{}

%    author two information
%\author{}
%\address{}
%curraddr{}
%\email{}
%\thanks{}

\subjclass[2000]{Primary }

\keywords{}

\date{}

\dedicatory{}

\begin{abstract}
This is a sample report for M435.  We discuss latex and matlab and in particular how to get
your matlab results into latex.  Of course, we will talk about writing abstracts in
class.  All reports need one!  It will be a very brief summary of
the work.
\end{abstract}

\maketitle
\tableofcontents

\section{Introduction}
General introduction to the problem. Why is it interesting?
Instead, a few comments on Latex to get us prepared to write reports.  Good news:  it is really quite
easy and I am prepared to help when you get stuck.  One writes an equation quite
simply by typing in
\begin{verbatim}
$$X = U \Sigma V^T $$
\end{verbatim}
and this produces
$$X = U \Sigma V^T $$
If I want to be able to reference the equation then we
need a little more.  Now,
\begin{verbatim}
\begin{equation}
\label{SVD-eq}
X = U \Sigma V^T
\end{equation}
\end{verbatim}
Notice the dollar signs are now missing.  This code produces
\begin{equation}
\label{SVD-eq}
X = U \Sigma V^T
\end{equation}
and we can now draw attention to Equation (\ref{SVD-eq})
using
\begin{verbatim}
...now draw attention to Equation (\ref{SVD-eq})...
\end{verbatim}
\section{Mathematical theory and modeling approach}
Now the SVD is all about truncating the representation.  We can re-express
Equation (\ref{SVD-eq})as
$$X = \sum_{i=1}^k \sigma_i u_i v_i^T$$
A $k$-term approximation will be exact when $k$ is equal to
the rank of $X$.  In matlab we can examine rank $k$ approximations
very easily!!
$$X_k = U(:,1:k)*\Sigma(1:k,1:k)*V(:,1:k)^T$$




\section{Data}

The Saturn image for this problem may be downloaded  from the
class web page.  The format of the data is "uint8", which stands
for unsigned integer, 8 bits.  Before you apply the SVD, change it
to "double" format:
\begin{verbatim}
A=imread('saturn.tif')
A=double(A);
\end{verbatim}
To display the image use
\begin{verbatim}
imagesc(A);
colormap(gray);
\end{verbatim}
Use the singular value decomposition to construct a low-rank
approximation to Saturn.
\begin{verbatim}
[U,D,V] = svd(X);
\end{verbatim}
To see the results incorporated into our document examine Figure
\ref{saturn-pic}.

\begin{figure}[!t]
\epsfxsize=4.0in \epsfysize=3.7in \epsffile{saturn.eps}
\caption{The matlab picture of Saturn.} \label{saturn-pic}
\end{figure}


\section{Results}

Use Figures embedded in the text and cited in the text.  Here are a few tasks for this class.

\begin{itemize}
\item embed the picture of the eigenvectors into the text as done above.
\item compute a 10 term reconstruction of Saturn and embed in text.
\item compute the column mean and subtract this from all the columns of the original Saturn and
reproduce the eigenvectors.  What do you notice about the eigenvectors and eigenvalues (the latter is not
trivial).
\end{itemize}

\subsection{Analysis of Results}

Predictions, added value.

\subsection{Weaknesses of the approach}

\section{Conclusions and Summary}

Answer the questions: what did you learn about this question that
you could not have discovered without your mathematics? " if you
had 3 months to work on this problem what would you do?

\appendix{Matlab Code}
Background information or theory


\end{document}

%-----------------------------------------------------------------------
% End of amsart.template
%-----------------------------------------------------------------------
