Commit 03378fde authored by Taddeüs Kroes's avatar Taddeüs Kroes

Merge branch 'master' of ssh://vo20.nl/git/uva

parents 17168c07 eb66faab
......@@ -146,8 +146,8 @@ So, using the HSV color model does improve the results.
\subsection{Finding Waldo}
The assignment is to find Waldo (\emph{waldo.png}) in a large image containing
Waldo and many other characters (\emph{waldo\_env.png}) using Histogram Backprojection.
The assignment is to find Waldo (\emph{waldo.tiff}) in a large image containing
Waldo and many other characters (\emph{waldo\_env.tiff}) using Histogram Backprojection.
The idea of Histogram Backprojection is explained in the paper by Swain and Ballard,
so we will not explain it here. The algorithm as described in the paper is as follows:
......@@ -166,18 +166,19 @@ However, the assignment tells us to only implement steps 1-3.
\subsection{Mask}
The algorithm is implemented in \emph{back\_projection.py}. First, a mask is created
to ignore the white background in the \emph{waldo.png}. This is needed because the
white color is not part of Waldo himself,. In fact, Waldo in the \emph{waldo\_env.png}
has a yellowish background behind him. The usage of a mask is simple: if the mask value
of a pixel is \texttt{False}, the pixel's color is discarded in the creation of the
color histogram. The mask for Waldo is created by discarding all pixels with RGB
color (255, 255, 255), which has the following result:
The algorithm is implemented in \emph{back\_projection.py}. First, a mask is
created to ignore the white background in the \emph{waldo.tiff}. This is needed
because the white color is not part of Waldo himself. In fact, Waldo in the
\emph{waldo\_env.tiff} has a yellowish background behind him. The usage of a
mask is simple: if the mask value of a pixel is \texttt{False}, the pixel's
color is discarded in the creation of the color histogram. The mask for Waldo
is created by discarding all pixels with RGB color (255, 255, 255), which has
the following result:
\begin{figure}[h]
\begin{figure}[H]
\label{fig:mask}
\includegraphics{mask.png}
\caption{The mask used to ignore the white background in \emph{waldo.png}.}
\caption{The mask used to ignore the white background in \emph{waldo.tiff}.}
\end{figure}
\subsection{Basic algorithm}
......@@ -192,10 +193,10 @@ weight mask.
The following result is generated with 64 bins in each color dimension and a convolution
radius of 15 pixels:
\begin{figure}[h]
\begin{figure}[H]
\hspace{-4cm}
\includegraphics[width=20cm]{found_waldo.png}
\caption{\emph{found\_waldo.png}: Back projection of Waldo in the larger image, the
\caption{\emph{found\_waldo.tiff}: Back projection of Waldo in the larger image, the
red spot is Waldo's location.}
\end{figure}
......@@ -217,7 +218,7 @@ that are further away from all other estimators than the diagonal of the model i
image is drawn over the larger image. With 32 bins in each color dimension, a threshold
of 0.25 and a convolution radius of 10 pixels, the result is as follows:
\begin{figure}[h]
\begin{figure}[H]
\hspace{-4cm}
\includegraphics[width=20cm]{k-means.png}
\caption{\emph{k-means.png}: Multiple possible locations using a low threshold
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment