\documentclass[12pt,utf8,notheorems,compress]{beamer}

\usepackage[english]{babel}

\usepackage{ragged2e}
\usepackage{multicol}
\usepackage{mathtools}

\usepackage[protrusion=true,expansion=false]{microtype}

\setlength\parskip{\medskipamount}
\setlength\parindent{0pt}

\newcommand{\RR}{\mathbb{R}}
\newcommand{\Set}{\mathrm{Set}}

\title{Principal component analysis}
\author[Kleine Bayessche AG]{Ingo Blechschmidt \\[-0.3em] {\scriptsize December 17th, 2014}}
\date{December 17th, 2014}

\usetheme{Warsaw}
\usecolortheme{seahorse}
%\usefonttheme{serif}
%\usepackage{mathpazo}
\usepackage{kurier}
\useinnertheme{rectangles}
\setbeamercolor{structure}{fg=purple}

\setbeamertemplate{title page}[default][colsep=-1bp,rounded=false,shadow=false,bg=white]
\setbeamertemplate{frametitle}[default][colsep=-2bp,rounded=false,shadow=false,center]

\setbeamertemplate{headline}{}
\setbeamertemplate{footline}{}

\setbeamertemplate{navigation symbols}{}

\newcommand{\backupstart}{
  \newcounter{framenumberpreappendix}
  \setcounter{framenumberpreappendix}{\value{framenumber}}
}
\newcommand{\backupend}{
  \addtocounter{framenumberpreappendix}{-\value{framenumber}}
  \addtocounter{framenumber}{\value{framenumberpreappendix}} 
}

\newcommand*\oldmacro{}%
\let\oldmacro\insertshorttitle%
\renewcommand*\insertshorttitle{%
  \oldmacro\hfill\insertframenumber\,/\,\inserttotalframenumber\hfill}

\newcommand{\hil}[1]{{\usebeamercolor[fg]{item}{#1}}}

\newcommand{\img}[2]{\begin{center}\includegraphics[scale=#1]{#2}\end{center}}
\newcommand{\imageslide}[3]{\frame{\frametitle{#1}\img{#2}{#3}}}

\newcommand{\T}[1]{\boldsymbol{#1}}
\newcommand{\defeq}{\vcentcolon=}
\DeclareMathOperator{\trace}{tr}
\DeclareMathOperator{\rank}{rank}

\setbeameroption{show notes}
\setbeamertemplate{note page}[plain]

\newcommand{\svd}[4]{
  \frame{\frametitle{Singular values: #2 of #3}
    \centering
    \includegraphics[#4]{image-samples/#1/reduced-#2}
    \par
  }
}

\newcommand{\svdend}[1]{
  \frame{\frametitle{Image \##1}
    \centering
    \includegraphics[width=\textwidth]{image-samples/#1/svs}
    \par
  }
}

\begin{document}

\frame[t]{\frametitle{Image compression by SVD}\tableofcontents}

\section{Image 1}
\svd{01}{001}{581}{scale=0.3}
\svd{01}{002}{581}{scale=0.3}
\svd{01}{003}{581}{scale=0.3}
\svd{01}{004}{581}{scale=0.3}
\svd{01}{005}{581}{scale=0.3}
\svd{01}{006}{581}{scale=0.3}
\svd{01}{007}{581}{scale=0.3}
\svd{01}{008}{581}{scale=0.3}
\svd{01}{009}{581}{scale=0.3}
\svd{01}{010}{581}{scale=0.3}
\svd{01}{011}{581}{scale=0.3}
\svd{01}{012}{581}{scale=0.3}
\svd{01}{013}{581}{scale=0.3}
\svd{01}{014}{581}{scale=0.3}
\svd{01}{015}{581}{scale=0.3}
\svd{01}{016}{581}{scale=0.3}
\svd{01}{017}{581}{scale=0.3}
\svd{01}{018}{581}{scale=0.3}
\svd{01}{019}{581}{scale=0.3}
\svd{01}{020}{581}{scale=0.3}
\svd{01}{030}{581}{scale=0.3}
\svd{01}{040}{581}{scale=0.3}
\svd{01}{050}{581}{scale=0.3}
\svd{01}{060}{581}{scale=0.3}
\svd{01}{070}{581}{scale=0.3}
\svd{01}{080}{581}{scale=0.3}
\svd{01}{090}{581}{scale=0.3}
\svd{01}{100}{581}{scale=0.3}
\svd{01}{110}{581}{scale=0.3}
\svd{01}{120}{581}{scale=0.3}
\svd{01}{130}{581}{scale=0.3}
\svd{01}{140}{581}{scale=0.3}
\svd{01}{150}{581}{scale=0.3}
\svd{01}{160}{581}{scale=0.3}
\svd{01}{581}{581}{scale=0.3}
\svdend{01}

\section{Image 2}
\svd{02}{001}{360}{scale=0.5}
\svd{02}{002}{360}{scale=0.5}
\svd{02}{003}{360}{scale=0.5}
\svd{02}{004}{360}{scale=0.5}
\svd{02}{005}{360}{scale=0.5}
\svd{02}{006}{360}{scale=0.5}
\svd{02}{007}{360}{scale=0.5}
\svd{02}{008}{360}{scale=0.5}
\svd{02}{009}{360}{scale=0.5}
\svd{02}{010}{360}{scale=0.5}
\svd{02}{011}{360}{scale=0.5}
\svd{02}{012}{360}{scale=0.5}
\svd{02}{013}{360}{scale=0.5}
\svd{02}{014}{360}{scale=0.5}
\svd{02}{015}{360}{scale=0.5}
\svd{02}{016}{360}{scale=0.5}
\svd{02}{017}{360}{scale=0.5}
\svd{02}{018}{360}{scale=0.5}
\svd{02}{019}{360}{scale=0.5}
\svd{02}{020}{360}{scale=0.5}
\svd{02}{030}{360}{scale=0.5}
\svd{02}{040}{360}{scale=0.5}
\svd{02}{050}{360}{scale=0.5}
\svd{02}{060}{360}{scale=0.5}
\svd{02}{070}{360}{scale=0.5}
\svd{02}{360}{360}{scale=0.5}
\svdend{02}

\section{Image 3}
\svd{03}{001}{422}{scale=0.4}
\svd{03}{002}{422}{scale=0.4}
\svd{03}{003}{422}{scale=0.4}
\svd{03}{004}{422}{scale=0.4}
\svd{03}{005}{422}{scale=0.4}
\svd{03}{006}{422}{scale=0.4}
\svd{03}{007}{422}{scale=0.4}
\svd{03}{008}{422}{scale=0.4}
\svd{03}{009}{422}{scale=0.4}
\svd{03}{010}{422}{scale=0.4}
\svd{03}{011}{422}{scale=0.4}
\svd{03}{012}{422}{scale=0.4}
\svd{03}{013}{422}{scale=0.4}
\svd{03}{014}{422}{scale=0.4}
\svd{03}{015}{422}{scale=0.4}
\svd{03}{016}{422}{scale=0.4}
\svd{03}{017}{422}{scale=0.4}
\svd{03}{018}{422}{scale=0.4}
\svd{03}{019}{422}{scale=0.4}
\svd{03}{020}{422}{scale=0.4}
\svd{03}{030}{422}{scale=0.4}
\svd{03}{040}{422}{scale=0.4}
\svd{03}{050}{422}{scale=0.4}
\svd{03}{060}{422}{scale=0.4}
\svd{03}{070}{422}{scale=0.4}
\svd{03}{422}{422}{scale=0.4}
\svdend{03}

\section{Image 4}
\svd{04}{001}{534}{scale=0.35}
\svd{04}{002}{534}{scale=0.35}
\svd{04}{003}{534}{scale=0.35}
\svd{04}{004}{534}{scale=0.35}
\svd{04}{005}{534}{scale=0.35}
\svd{04}{006}{534}{scale=0.35}
\svd{04}{007}{534}{scale=0.35}
\svd{04}{008}{534}{scale=0.35}
\svd{04}{009}{534}{scale=0.35}
\svd{04}{010}{534}{scale=0.35}
\svd{04}{011}{534}{scale=0.35}
\svd{04}{012}{534}{scale=0.35}
\svd{04}{013}{534}{scale=0.35}
\svd{04}{014}{534}{scale=0.35}
\svd{04}{015}{534}{scale=0.35}
\svd{04}{016}{534}{scale=0.35}
\svd{04}{017}{534}{scale=0.35}
\svd{04}{018}{534}{scale=0.35}
\svd{04}{019}{534}{scale=0.35}
\svd{04}{020}{534}{scale=0.35}
\svd{04}{030}{534}{scale=0.35}
\svd{04}{040}{534}{scale=0.35}
\svd{04}{050}{534}{scale=0.35}
\svd{04}{060}{534}{scale=0.35}
\svd{04}{070}{534}{scale=0.35}
\svd{04}{080}{534}{scale=0.35}
\svd{04}{090}{534}{scale=0.35}
\svd{04}{100}{534}{scale=0.35}
\svd{04}{534}{534}{scale=0.35}
\svdend{04}

\section{Image 5}
\svd{05}{001}{300}{scale=0.5}
\svd{05}{002}{300}{scale=0.5}
\svd{05}{003}{300}{scale=0.5}
\svd{05}{004}{300}{scale=0.5}
\svd{05}{005}{300}{scale=0.5}
\svd{05}{006}{300}{scale=0.5}
\svd{05}{007}{300}{scale=0.5}
\svd{05}{008}{300}{scale=0.5}
\svd{05}{009}{300}{scale=0.5}
\svd{05}{010}{300}{scale=0.5}
\svd{05}{011}{300}{scale=0.5}
\svd{05}{012}{300}{scale=0.5}
\svd{05}{013}{300}{scale=0.5}
\svd{05}{014}{300}{scale=0.5}
\svd{05}{015}{300}{scale=0.5}
\svd{05}{016}{300}{scale=0.5}
\svd{05}{017}{300}{scale=0.5}
\svd{05}{018}{300}{scale=0.5}
\svd{05}{019}{300}{scale=0.5}
\svd{05}{020}{300}{scale=0.5}
\svd{05}{030}{300}{scale=0.5}
\svd{05}{040}{300}{scale=0.5}
\svd{05}{050}{300}{scale=0.5}
\svd{05}{060}{300}{scale=0.5}
\svd{05}{070}{300}{scale=0.5}
\svd{05}{080}{300}{scale=0.5}
\svd{05}{090}{300}{scale=0.5}
\svd{05}{100}{300}{scale=0.5}
\svd{05}{300}{300}{scale=0.5}
\svdend{05}

\section{Image 6}
\svd{06}{001}{450}{scale=0.5}
\svd{06}{002}{450}{scale=0.5}
\svd{06}{003}{450}{scale=0.5}
\svd{06}{004}{450}{scale=0.5}
\svd{06}{005}{450}{scale=0.5}
\svd{06}{006}{450}{scale=0.5}
\svd{06}{007}{450}{scale=0.5}
\svd{06}{008}{450}{scale=0.5}
\svd{06}{009}{450}{scale=0.5}
\svd{06}{010}{450}{scale=0.5}
\svd{06}{011}{450}{scale=0.5}
\svd{06}{012}{450}{scale=0.5}
\svd{06}{013}{450}{scale=0.5}
\svd{06}{014}{450}{scale=0.5}
\svd{06}{015}{450}{scale=0.5}
\svd{06}{016}{450}{scale=0.5}
\svd{06}{017}{450}{scale=0.5}
\svd{06}{018}{450}{scale=0.5}
\svd{06}{019}{450}{scale=0.5}
\svd{06}{020}{450}{scale=0.5}
\svd{06}{030}{450}{scale=0.5}
\svd{06}{040}{450}{scale=0.5}
\svd{06}{050}{450}{scale=0.5}
\svd{06}{060}{450}{scale=0.5}
\svd{06}{070}{450}{scale=0.5}
\svd{06}{080}{450}{scale=0.5}
\svd{06}{090}{450}{scale=0.5}
\svd{06}{100}{450}{scale=0.5}
\svd{06}{450}{450}{scale=0.5}
\svdend{06}

\section{Image 7}
\svd{07}{001}{450}{scale=0.5}
\svd{07}{002}{450}{scale=0.5}
\svd{07}{003}{450}{scale=0.5}
\svd{07}{004}{450}{scale=0.5}
\svd{07}{005}{450}{scale=0.5}
\svd{07}{006}{450}{scale=0.5}
\svd{07}{007}{450}{scale=0.5}
\svd{07}{008}{450}{scale=0.5}
\svd{07}{009}{450}{scale=0.5}
\svd{07}{010}{450}{scale=0.5}
\svd{07}{011}{450}{scale=0.5}
\svd{07}{012}{450}{scale=0.5}
\svd{07}{013}{450}{scale=0.5}
\svd{07}{014}{450}{scale=0.5}
\svd{07}{015}{450}{scale=0.5}
\svd{07}{016}{450}{scale=0.5}
\svd{07}{017}{450}{scale=0.5}
\svd{07}{018}{450}{scale=0.5}
\svd{07}{019}{450}{scale=0.5}
\svd{07}{020}{450}{scale=0.5}
\svd{07}{030}{450}{scale=0.5}
\svd{07}{040}{450}{scale=0.5}
\svd{07}{050}{450}{scale=0.5}
\svd{07}{060}{450}{scale=0.5}
\svd{07}{070}{450}{scale=0.5}
\svd{07}{080}{450}{scale=0.5}
\svd{07}{090}{450}{scale=0.5}
\svd{07}{100}{450}{scale=0.5}
\svd{07}{420}{420}{scale=0.5}
\svdend{07}

\section{Image 8}
\svd{08}{001}{390}{scale=0.5}
\svd{08}{002}{390}{scale=0.5}
\svd{08}{003}{390}{scale=0.5}
\svd{08}{004}{390}{scale=0.5}
\svd{08}{005}{390}{scale=0.5}
\svd{08}{006}{390}{scale=0.5}
\svd{08}{007}{390}{scale=0.5}
\svd{08}{008}{390}{scale=0.5}
\svd{08}{009}{390}{scale=0.5}
\svd{08}{010}{390}{scale=0.5}
\svd{08}{011}{390}{scale=0.5}
\svd{08}{012}{390}{scale=0.5}
\svd{08}{013}{390}{scale=0.5}
\svd{08}{014}{390}{scale=0.5}
\svd{08}{015}{390}{scale=0.5}
\svd{08}{016}{390}{scale=0.5}
\svd{08}{017}{390}{scale=0.5}
\svd{08}{018}{390}{scale=0.5}
\svd{08}{019}{390}{scale=0.5}
\svd{08}{020}{390}{scale=0.5}
\svd{08}{030}{390}{scale=0.5}
\svd{08}{040}{390}{scale=0.5}
\svd{08}{050}{390}{scale=0.5}
\svd{08}{060}{390}{scale=0.5}
\svd{08}{070}{390}{scale=0.5}
\svd{08}{080}{390}{scale=0.5}
\svd{08}{090}{390}{scale=0.5}
\svd{08}{100}{390}{scale=0.5}
\svd{08}{390}{390}{scale=0.5}
\svdend{08}

\end{document}
