\documentclass[envcountsect]{beamer}
%\includegraphics[height=6cm](full frame)
\usepackage{times}
\usepackage{amsfonts,eucal}
%\usecolortheme[overlystylish]{albatross}
\usetheme{JuanLesPins}
%\usetheme{Copenhagen}
%\usetheme{Berkeley}
\logo{\includegraphics[height=30px]{jpg/uteplogo100.jpg}}
\title{Discrete Wavelets and Image Processing}
\institute{{\large Helmut Knaust}\medskip\\Department of Mathematical Sciences\\The University of Texas at El Paso\\El Paso TX 79968-0514\medskip\\\tt{hknaust@utep.edu}}
\date{{\small October 16, 2009}}
\setbeamertemplate{theorems}[normal font]
\newtheorem{defi}{Definition}
\newtheorem{con}[defi]{Conjecture}
\newtheorem{thm}[defi]{Theorem}
\newcommand{\field}[1]{\mathbb{#1}}
\newcommand{\nat}{\field{N}}
\newcommand{\zet}{\field{Z}}
\newcommand{\real}{\field{R}}
\newcommand{\rat}{\field{Q}}
\newcommand{\cpl}{\field{C}}
\newcommand{\ilf}[1]{$\displaystyle #1 $}
\renewcommand\thefootnote{\fnsymbol{footnote}}

\begin{document}
\begin{frame}
\titlepage
\end{frame}

%\begin{frame}
%\tableofcontents[hideallsubsections]
%\end{frame}

\section{Math 5311: Applied Mathematics}
\subsection{Course Objectives}
\begin{frame}
Course Objectives:
\begin{itemize}
\item Get a flavor of the ideas and issues involved in applying mathematics to a relevant engineering problem
\item Develop an understanding of the theoretical underpinnings of wavelet transforms and their applications
\item Learn how to use a computer algebra system for mathematical investigations, as a computational and visualization aid, and for the implementation of mathematical algorithms
\end{itemize}
\end{frame}


\subsection{Prerequisites}
\begin{frame}
Prerequisites:
\begin{itemize}
\item A thorough understanding of Calculus
\item Some familiarity with matrices
\item Mathematical maturity
\item Willingness to learn \emph{Mathematica}
\end{itemize}
\end{frame}

\section{The Problem}
\begin{frame}
The Engineering Problem:
\begin{itemize}
\item Transmit digital information through a ``narrow channel''.
\item ``Lossy compression'': The information received need not be identical to the one sent, but the quality must be ``acceptable''.
\end{itemize}
\begin{figure}
\includegraphics[height=3cm]{pdf/schematic.pdf}
\end{figure}
\end{frame}


\begin{frame}
Applications:
\begin{itemize}
\item \textbf{Photos}
\item MP3 players
\item Real-time two-way audio (cellular telephones)
\item<2-> Streaming video (Netflix, Hulu)
\item<3-> Real-time two-way audio and video (Skype)
\end{itemize}
\end{frame}

\section{Basics of Digital Signal Processing}
\begin{frame}
A color image consists of three color channels: Red, Green and Blue
\begin{columns}[c]
\column{4cm}
\begin{figure}
\includegraphics[width=4cm]{png/color1.png}
\end{figure}
\column{5cm}
\begin{figure}
\includegraphics[width=5cm]{png/colorRGB.png}
\end{figure}
\end{columns}
\end{frame}

\begin{frame}
Each pixel in a gray-scale image is represented by an integer between $0$ and $255=2^8-1$ (8 bit = 1 byte)\medskip\\
0=black, 255=white
\begin{columns}[c]
\column{4cm}
\begin{figure}
\includegraphics[width=4cm]{png/pix1.png}
\end{figure}
\column{6cm}
\begin{figure}
\includegraphics[width=6cm]{png/pix2.png}
\end{figure}
\end{columns}
\end{frame}


\begin{frame}
\begin{figure}
``Raw'' storage requirement:\\(512 $\times$ 768) bytes = 393.2 KB  
\includegraphics[width=9cm]{png/tram.png}
\end{figure}
\end{frame}

\begin{frame}
\begin{figure}
``Naive compression'' --- Average of four neighboring pixels:\\Compression factor: 4  
\includegraphics[width=9cm]{png/tram_ave.png}
\end{figure}
\end{frame}

\section{Approximating data}
\begin{frame}
Mathematical Question: What ways are there to approximate a function (``data'') other than just averaging?\medskip\\
\begin{itemize}
\item<2->Differentiation Techniques
	\begin{itemize}
	\item<3-> Taylor series 
	\end{itemize}
\item<4->Integration Techniques	
	\begin{itemize}
	\item<5-> Fourier series
	\item<5-> Wavelets
	\end{itemize}
\end{itemize}
\end{frame}

\subsection{Fourier techniques}
\begin{frame}
\begin{figure}
Fourier approximation\\
\includegraphics[width=7cm]{pdf/fourier.pdf}
\end{figure}
$0.827958 \sin (t)-0.310564 \sin (2 t)+0.191515 \sin (3 t)-0.139372 \sin (4 t)+0.109891 \sin (5 t)-0.0908419 \sin (6
   t)+0.586021 \cos (t)-0.172359 \cos (2 t)+0.079192 \cos (3 t)-0.0450785 \cos (4 t)+0.0290109 \cos (5 t)-0.0202076 \cos
   (6 t)-0.465052$
\end{frame}

\begin{frame}
Fourier series of the function $f(t)$:
\[\sum_{n=1}^\infty a_n \sin{n t} +\sum_{n=0}^\infty b_n \cos{n t}\]
The coefficients are given by 
\[a_n=\frac{1}{\pi}\int_{-\pi}^\pi f(t) \sin{nt}\,dt\]
and 
\[b_n=\frac{1}{\pi}\int_{-\pi}^\pi f(t) \cos{nt}\,dt\quad(n\geq 1)\]
\end{frame}

\begin{frame}
\begin{figure}
The first Fourier functions:\medskip\\
\includegraphics[width=11cm]{pdf/fou.pdf}
\end{figure}
\end{frame}

\begin{frame}
The JPEG algorithm uses Fourier techniques - it employs the ``Discrete Cosine Fourier Transform (DCT)''. \medskip\\
Here is a JPEG example with compression factor 6:
\begin{columns}[c]
\column{4.5cm}
\begin{figure}
\includegraphics[width=4cm]{png/JPEG_ori.png}
\end{figure}
\column{4.5cm}
\begin{figure}
\includegraphics[width=4cm]{png/JPEG.png}
\end{figure}
\end{columns}
\end{frame}

\subsection{Wavelet techniques}
\begin{frame}
\begin{columns}[c]
\column{5cm}
\begin{figure}
\includegraphics[width=3cm]{jpg/Daubechies.jpg}
\end{figure}
\begin{center}
Wavelet pioneers: Alfred Haar (t-r, on the left), Stephane Mallat (b-r), Ingrid Daubechies (t)
\end{center}
\column{5cm}
\begin{figure}
\includegraphics[width=5cm]{jpg/Haar+.jpg}
\end{figure}
\begin{figure}
\includegraphics[width=5cm]{jpg/mallat.jpg}
\end{figure}
\end{columns}
\end{frame}


\begin{frame}
\begin{figure}
The first Haar functions:\medskip\\
\includegraphics[width=11cm]{pdf/haar.pdf}
\end{figure}
\end{frame}

\begin{frame}
\begin{figure}
Wavelet approximation:\\
\includegraphics[width=7cm]{pdf/d4_app.pdf}
\end{figure}
\ldots using the Daubechies-4 wavelet
\end{frame}

\begin{frame}
\begin{figure}
The basis functions are now re-scalings of the two functions below, the ``father wavelet'' (blue) and the ``mother wavelet'' (red)
\includegraphics[width=7cm]{pdf/d4_fm.pdf}
\end{figure}
\end{frame}


\section{The JPEG2000 algorithm}
\begin{frame}
\begin{center}
Original image\\
\begin{figure}
\includegraphics[width=9cm]{png/image01.png}
\end{figure}
\end{center}
\end{frame}

\begin{frame}
\begin{center}
1st color channel: $Y$\\
\begin{figure}
\includegraphics[width=9cm]{png/image02y.png}
\end{figure}
\end{center}
\end{frame}

\begin{frame}
\begin{center}
2nd color channel: $C_r$\\
\begin{figure}
\includegraphics[width=9cm]{png/image02cr.png}
\end{figure}
\end{center}
\end{frame}

\begin{frame}
\begin{center}
3rd color channel: $C_b$\\
\begin{figure}
\includegraphics[width=9cm]{png/image02cb.png}
\end{figure}
\end{center}
\end{frame}

\begin{frame}
\begin{center}
Applying the CDF97-wavelet transform to $Y$ once\\
\begin{figure}
\includegraphics[width=9cm]{png/image03y1.png}
\end{figure}
\end{center}
\end{frame}

\begin{frame}
\begin{center}
\ldots and again\ldots\\
\begin{figure}
\includegraphics[width=9cm]{png/image03y2.png}
\end{figure}
\end{center}
\end{frame}

\begin{frame}
\begin{center}
\ldots and one more time:\\
\begin{figure}
\includegraphics[width=9cm]{png/image03y.png}
\end{figure}
\end{center}
\end{frame}

\begin{frame}
\begin{center}
Quantizing the $Y$ channel\\
\begin{figure}
\includegraphics[width=9cm]{png/image04y.png}
\end{figure}
\end{center}
\end{frame}

\begin{frame}
\begin{itemize}
\item The sender then encodes this ``quantized image'' and sends it through the narrow channel to the receiver. \bigskip
\item The compression factor in this example is 10.2.\bigskip
\item The receiver then decompresses the image to be able to view the approximation of the original image. 
\end{itemize}
\end{frame}

\begin{frame}
\begin{center}
``Undoing'' the transform (by receiver)\\
\begin{figure}
\includegraphics[width=9cm]{png/image05.png}
\end{figure}
\end{center}
\end{frame}

\begin{frame}
\begin{center}
Original image, again\ldots\\
\begin{figure}
\includegraphics[width=9cm]{png/image01.png}
\end{figure}
\end{center}
\end{frame}


\begin{frame}
\begin{center}
Zooming in on the original image:\\
\begin{figure}
\includegraphics[width=7cm]{png/image07det1.png}
\end{figure}
\end{center}
\end{frame}

\begin{frame}
\begin{center}
Zooming in on the received image:\\
\begin{figure}
\includegraphics[width=7cm]{png/image07det2.png}
\end{figure}
\end{center}
\end{frame}

\begin{frame}
Any Questions?
\begin{columns}[c]
\column{5cm}
\begin{figure}
\includegraphics[width=5cm]{jpg/plane.jpg}
\end{figure}
\column{5cm}
\begin{figure}
\includegraphics[width=5cm]{png/plane_tr.png}
\end{figure}
\end{columns}
\end{frame}

\end{document}

\begin{frame}
\begin{center}
The ``negative'' of the difference\\
\begin{figure}
\includegraphics[width=9cm]{png/image06.png}
\end{figure}
\end{center}
\end{frame}