\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[bookmarks=false,colorlinks,urlcolor=blue,pdftitle={Take-home Quiz 4},pdfauthor={Matthew O'Toole}]{hyperref}

\def\vO{{\bf O}}
\def\vP{{\bf P}}
\def\vp{{\bf p}}
\def\vx{{\bf x}}
\def\vt{{\bf t}}
\def\vl{{\bf l}}
\def\vm{{\bf m}}
\def\vX{{\bf X}}
\def\mS{{\bf S}}
\def\mT{{\bf T}}
\def\mH{{\bf H}}
\def\mA{{\bf A}}
\def\mM{{\bf M}}
\def\mP{{\bf P}}
\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}}}

\begin{document}

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

\bigskip

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

As we discussed in class, homographies can be used, under certain conditions, to relate images of the same scene captured by different cameras.

\begin{enumerate}

\item Suppose that we have two photos of a textured planar surface $\Pi$, captured by two cameras and their corresponding $3 \times 4$ camera projection matrices $\mathbf{P_1}$ and $\mathbf{P_2}$, respectively.  Prove that there exists a homography $\mathbf{H}$ that relates the two images of this textured planar surface, as given by 
\begin{equation} \label{eq:q21}
\mathbf{x}_1 \equiv \mathbf{H}\cdot\mathbf{x}_2,
\end{equation}
where $\mathbf{x}_1$ and $\mathbf{x}_2$ are 2D corresponding points represented in homogeneous coordinates. The $\equiv$ symbol stands for equality \emph{up to scale}. (\emph{Note: A degenerate case happens when the plane $\Pi$ contains both cameras' centers, in which case there are infinite choices of $\mathbf{H}$ satisfying Equation~\eqref{eq:q21}. You can ignore this special case in your answer.})

\item Prove that there exists a homography $\mathbf{H}$ that satisfies Equation~\eqref{eq:q21}, given two cameras separated by a pure rotation. That is, for camera 1, $\mathbf{x_1} = \mathbf{K_1} \begin{bmatrix} \mathbf{I} & \mathbf{0} \end{bmatrix} \mathbf{X}$, and for camera 2, $\mathbf{x_2} = \mathbf{K_2} \begin{bmatrix}\mathbf{R} & \mathbf{0} \end{bmatrix} \mathbf{X}$. Note that $\mathbf{K_1}$ and $\mathbf{K_2}$ are the $3 \times 3$ intrinsic matrices of the two cameras and are different. $\mathbf{I}$ is $3 \times 3$ identity matrix, $\mathbf{0}$ is a $3\times1$ zero vector and $\mathbf{X}$ is a point in 3D space. $\mathbf{R}$ is the $3 \times 3$ rotation matrix of the camera.

\end{enumerate}

\section*{Question 2 \emph{\small(5 points)}}

In class we saw that a camera matrix satisfies the equation $\vx_i=\mP\vX_i$, and that six 3D-2D matches $\vx\leftrightarrow\vX$ are sufficient to recover $\mP$ using a linear (non-iterative) algorithm.

\begin{enumerate}
\item Find a linear algorithm for computing the camera matrix $\mP$ in the special case when the camera location (but not orientation) is known. Ignoring degenerate configurations, how many 2D-3D matches are required for there to be a unique solution? Justify your answer.

\item Repeat the previous question for the special case when both the camera location and complete orientation are known.

\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}
