Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
uva
Commits
eb66faab
Commit
eb66faab
authored
Oct 09, 2011
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ImProc: converted tabs to spaces and fixed some typo's.
parent
871fe57e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
28 deletions
+29
-28
improc/ass3/report/report.tex
improc/ass3/report/report.tex
+29
-28
No files found.
improc/ass3/report/report.tex
View file @
eb66faab
...
@@ -146,8 +146,8 @@ So, using the HSV color model does improve the results.
...
@@ -146,8 +146,8 @@ So, using the HSV color model does improve the results.
\subsection
{
Finding Waldo
}
\subsection
{
Finding Waldo
}
The assignment is to find Waldo (
\emph
{
waldo.
png
}
) in a large image containing
The assignment is to find Waldo (
\emph
{
waldo.
tiff
}
) in a large image containing
Waldo and many other characters (
\emph
{
waldo
\_
env.
png
}
) using Histogram Backprojection.
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,
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:
so we will not explain it here. The algorithm as described in the paper is as follows:
...
@@ -156,28 +156,29 @@ Given histograms $M$ (model, Waldo) and $I$ (environment), create the back proje
...
@@ -156,28 +156,29 @@ Given histograms $M$ (model, Waldo) and $I$ (environment), create the back proje
$
b
$
in the following steps:
$
b
$
in the following steps:
\begin{enumerate}
\begin{enumerate}
\item
for each histogram bin
$
j
$
do
$
R
_
j :
=
frac
{
M
_
j
}{
I
_
j
}$
\item
for each histogram bin
$
j
$
do
$
R
_
j :
=
frac
{
M
_
j
}{
I
_
j
}$
\item
for each
$
x, y
$
do
$
b
_{
x,y
}
:
=
min
(
R
_{
h
(
c
_{
x,y
}
)
}
,
1
)
$
\item
for each
$
x, y
$
do
$
b
_{
x,y
}
:
=
min
(
R
_{
h
(
c
_{
x,y
}
)
}
,
1
)
$
\item
$
b :
=
D
^
r
*
b
$
\item
$
b :
=
D
^
r
*
b
$
\item
$
(
x
_
t, y
_
t
)
:
=
loc
(
max
_{
x,y
}
, b
_{
x,y
}
)
$
\item
$
(
x
_
t, y
_
t
)
:
=
loc
(
max
_{
x,y
}
, b
_{
x,y
}
)
$
\end{enumerate}
\end{enumerate}
However, the assignment tells us to only implement steps 1-3.
However, the assignment tells us to only implement steps 1-3.
\subsection
{
Mask
}
\subsection
{
Mask
}
The algorithm is implemented in
\emph
{
back
\_
projection.py
}
. First, a mask is created
The algorithm is implemented in
\emph
{
back
\_
projection.py
}
. First, a mask is
to ignore the white background in the
\emph
{
waldo.png
}
. This is needed because the
created to ignore the white background in the
\emph
{
waldo.tiff
}
. This is needed
white color is not part of Waldo himself,. In fact, Waldo in the
\emph
{
waldo
\_
env.png
}
because the white color is not part of Waldo himself. In fact, Waldo in the
has a yellowish background behind him. The usage of a mask is simple: if the mask value
\emph
{
waldo
\_
env.tiff
}
has a yellowish background behind him. The usage of a
of a pixel is
\texttt
{
False
}
, the pixel's color is discarded in the creation of the
mask is simple: if the mask value of a pixel is
\texttt
{
False
}
, the pixel's
color histogram. The mask for Waldo is created by discarding all pixels with RGB
color is discarded in the creation of the color histogram. The mask for Waldo
color (255, 255, 255), which has the following result:
is created by discarding all pixels with RGB color (255, 255, 255), which has
the following result:
\begin{figure}
[h]
\label
{
fig:mask
}
\begin{figure}
[H]
\includegraphics
{
mask.png
}
\label
{
fig:mask
}
\caption
{
The mask used to ignore the white background in
\emph
{
waldo.png
}
.
}
\includegraphics
{
mask.png
}
\caption
{
The mask used to ignore the white background in
\emph
{
waldo.tiff
}
.
}
\end{figure}
\end{figure}
\subsection
{
Basic algorithm
}
\subsection
{
Basic algorithm
}
...
@@ -192,11 +193,11 @@ weight mask.
...
@@ -192,11 +193,11 @@ weight mask.
The following result is generated with 64 bins in each color dimension and a convolution
The following result is generated with 64 bins in each color dimension and a convolution
radius of 15 pixels:
radius of 15 pixels:
\begin{figure}
[
h
]
\begin{figure}
[
H
]
\hspace
{
-4cm
}
\hspace
{
-4cm
}
\includegraphics
[width=20cm]
{
found
_
waldo.png
}
\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.
}
red spot is Waldo's location.
}
\end{figure}
\end{figure}
This result is created in roughly 27 seconds on a laptop from 2009.
This result is created in roughly 27 seconds on a laptop from 2009.
...
@@ -217,11 +218,11 @@ that are further away from all other estimators than the diagonal of the model i
...
@@ -217,11 +218,11 @@ 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
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:
of 0.25 and a convolution radius of 10 pixels, the result is as follows:
\begin{figure}
[
h
]
\begin{figure}
[
H
]
\hspace
{
-4cm
}
\hspace
{
-4cm
}
\includegraphics
[width=20cm]
{
k-means.png
}
\includegraphics
[width=20cm]
{
k-means.png
}
\caption
{
\emph
{
k-means.png
}
: Multiple possible locations using a low threshold
\caption
{
\emph
{
k-means.png
}
: Multiple possible locations using a low threshold
and convolution radius.
}
and convolution radius.
}
\end{figure}
\end{figure}
\end{document}
\end{document}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment