\documentclass[12pt]{article}
\usepackage{fullpage}
\usepackage{amsmath,amsopn}
\usepackage{graphicx}
\usepackage{color}
\usepackage{verbatim}
\usepackage{setspace}
\usepackage{gensymb}
\usepackage{float}
\usepackage[normalem]{ulem}
%\usepackage[dvips,bookmarks=false,colorlinks,urlcolor=blue,pdftitle={
\usepackage{caption}
\usepackage{subcaption}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{comment}

\def\vO{{\bf O}}
\def\vP{{\bf P}}
\def\vp{{\bf p}}
\def\vx{{\bf x}}
\def\vl{{\bf l}}
\def\mS{{\bf S}}
\def\mT{{\bf T}}
\def\mH{{\bf H}}
\def\mA{{\bf A}}
\def\tx{{\tilde{\bf x}}}
\def\ta{{\tilde{\bf a}}}
\def\tb{{\tilde{\bf b}}}
\def\tc{{\tilde{\bf c}}}
\def\hn{{\bf \hat{n}}}
\def\hv{{\bf \hat{v}}}
\def\hh{{\bf \hat{h}}}
\def\vh{{\bf h}}
\def\vs{{\bf s}}
\def\hs{{\bf \hat{s}}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\ud}{\,\mathrm{d}}

\usepackage[bookmarks=false,colorlinks,urlcolor=blue,pdftitle={Take-home Quiz 2},pdfauthor={Matthew O'Toole}]{hyperref}

\begin{document}

\begin{centering}
	{\large 16-385 Computer Vision, Fall 2020\\}
	\vspace{2ex}
	{\LARGE Take-home Quiz 2\\}
	\vspace{2ex}
	{\large Due Date: Monday September 28, 2020 23:59\\}
\end{centering}

\bigskip

\section*{Question 1 \emph{\small(10 points)}}

In class, we discussed how, given a windowing function $w(s,t)$, we can use the following \emph{covariance} metric:
\begin{equation}\label{eq:covariance}
E_w(u,v;x,y) = \sum_{s,t} w(s,t) \left[I(x-s+u,y-t+v) - I(x-s,y-t)\right]^2,
\end{equation}
in order to identify whether an image patch centered at $(x,y)$ looks like a corner. In particular, large values of $E_w$ for all possible displacements $(u,v)$ of the window indicate that the patch is a corner.

\begin{enumerate}

\item Assuming that the displacements $u$ and $v$ are small, show that the metric of Equation~\eqref{eq:covariance} can be approximated as:
\begin{equation}
E_w(u,v; x, y) \approx [u, v] \cdot {\cal M}_w(x,y) \cdot [u, v]^T,
\end{equation}
where ${\cal M}_w(x,y)$ is the \emph{covariance matrix}:
\begin{align}
&{\cal M}_w(x,y)=\nonumber\\
&\left[\begin{array}{cc} \sum\limits_{s,t} w(s,t)I_x(x-s,y-t)I_x(x-s,y-t) & \sum\limits_{s,t} w(s,t)I_x(x-s,y-t)I_y(x-s,y-t)\\ \sum\limits_{s,t} w(s,t)I_y(x-s,y-t)I_x(x-s,y-t) & \sum\limits_{s,t} w(s,t)I_y(x-s,y-t)I_y(x-s,y-t)
\end{array}\right].
\end{align}

\item Show that the covariance matrix can be writen equivalently as:
\begin{equation}
{\cal M}_w(x,y)= w(x,y) \ast \left[\begin{array}{cc} I_x(x,y)I_x(x,y) & I_x(x,y)I_y(x,y)\\ I_y(x,y)I_x(x,y) & I_y(x,y)I_y(x,y)\end{array}\right],
\end{equation}
where $\ast$ indicates convolution of the windowing function $w(x,y)$ with each element of the matrix.

\item As we discussed in class, we can derive various ``cornerness'' metrics that take the form of functionals of \emph{only} the product and sum of the eigenvalues of the covariance matrix. Pick your favorite one (or propose your own), and explain how you would compute this metric efficiently for the entire image, using only convolutions and element-wise operations between images. You can explain this either verbally, or using pseudocode.
\end{enumerate} 


\section*{Instructions}

\begin{enumerate}
    \item \textbf{Integrity and collaboration:} Students are encouraged to work
    in groups but each student must submit their own work. If you work as a
    group, include the names of your collaborators in your write up. Plagiarism
    is strongly prohibited and may lead to failure of this course.

    \item \textbf{Questions:} If you have any questions, please look at Piazza
    first. Other students may have encountered the same problem, and it may be solved
    already. If not, post your question on the discussion board. Teaching staff will
    respond as soon as possible.

    \item \textbf{Write-up:} Your write-up should be typeset in \LaTeX and should consist of your answers to the theory questions. Please note that we
    \textbf{\color{red}do not} accept handwritten scans for your write-up in quizzes.

    \item \textbf{Submission:} Your submission for this take-home quiz should be a
    PDF file, \texttt{<andrew-id.pdf>}, with your write-up. \textbf{\color{red}Please do not submit ZIP files.}
\end{enumerate}

\end{document}
