Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
licenseplates
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Taddeüs Kroes
licenseplates
Commits
d9932282
Commit
d9932282
authored
13 years ago
by
Jayke Meijer
Browse files
Options
Downloads
Patches
Plain Diff
Added stuff on usage of different neighbourhoods.
parent
df98d883
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/neighbourhoods.png
+0
-0
0 additions, 0 deletions
docs/neighbourhoods.png
docs/report.tex
+31
-15
31 additions, 15 deletions
docs/report.tex
with
31 additions
and
15 deletions
docs/neighbourhoods.png
0 → 100644
+
0
−
0
View file @
d9932282
1.81 KiB
This diff is collapsed.
Click to expand it.
docs/report.tex
+
31
−
15
View file @
d9932282
...
...
@@ -94,8 +94,8 @@ Rewrite this section once we have implemented this properly.
\subsection
{
Transformation
}
A simple perspective transformation will be sufficient to transform and resize
the characters to a normalized format. The corner positions of characters in
the
dataset are supplied together with the dataset.
the characters to a normalized format. The corner positions of characters in
the
dataset are supplied together with the dataset.
\subsection
{
Reducing noise
}
...
...
@@ -141,8 +141,9 @@ by the n(with i=i$_{th}$ pixel evaluated, starting with $i=0$).
This results in a mathematical expression:
Let I(
$
x
_
i, y
_
i
$
) an Image with grayscale values and
$
g
_
n
$
the grayscale value
of the pixel
$
(
x
_
i, y
_
i
)
$
. Also let
$
s
(
g
_
i, g
_
c
)
$
(see below) with
$
g
_
c
$
= grayscale value
of the center pixel and
$
g
_
i
$
the grayscale value of the pixel to be evaluated.
of the pixel
$
(
x
_
i, y
_
i
)
$
. Also let
$
s
(
g
_
i, g
_
c
)
$
(see below) with
$
g
_
c
$
=
grayscale value of the center pixel and
$
g
_
i
$
the grayscale value of the pixel
to be evaluated.
$$
s
(
g
_
i, g
_
c
)
=
\left\{
...
...
@@ -236,12 +237,12 @@ noise in the margin.
In the next section you can read more about the perspective transformation that
is being done. After the transformation the character can be saved: Converted
to grayscale, but nothing further. This was used to create a learning set. If
it does
n'
t need to be saved as an actual image it will be converted to a
it does
no
t need to be saved as an actual image it will be converted to a
NormalizedImage. When these actions have been completed for each character the
license plate is usable in the rest of the code.
\paragraph*
{
Perspective transformation
}
Once we retrieved the cornerpoints of the character, we feed those to a
Once we retrieved the corner
points of the character, we feed those to a
module that extracts the (warped) character from the original image, and
creates a new image where the character is cut out, and is transformed to a
rectangle.
...
...
@@ -274,11 +275,18 @@ surrounding the character.
\subsection
{
Creating Local Binary Patterns and feature vector
}
Every pixel is a center pixel and it is also a value to evaluate but not at the
same time. Every pixel is evaluated as shown in the explanation
of the LBP algorithm. The 8 neighbours around that pixel are evaluated, of course
this area can be bigger, but looking at the closes neighbours can give us more
information about the patterns of a character than looking at neighbours
further away. This form is the generic form of LBP, no interpolation is needed
the pixels adressed as neighbours are indeed pixels.
of the LBP algorithm. There are several neighbourhoods we can evaluate. We have
tried the following neighbourhoods:
\begin{figure}
[h!]
\center
\includegraphics
[scale=0.5]
{
neighbourhoods.png
}
\caption
{
Tested neighbourhoods
}
\end{figure}
We chose these neighbourhoods to prevent having to use interpolation, which
would add a computational step, thus making the code execute slower. In the
next section we will describe what the best neighbourhood was.
Take an example where the
full square can be evaluated, there are cases where the neighbours are out of
...
...
@@ -311,9 +319,10 @@ available. These parameters are:\\
$
\sigma
$
&
The size of the Gaussian blur.
\\
\emph
{
cell size
}
&
The size of a cell for which a histogram of LBPs will
be generated.
\\
\emph
{
Neighbourhood
}&
The neighbourhood to use for creating the LBP.
\\
$
\gamma
$
&
Parameter for the Radial kernel used in the SVM.
\\
$
c
$
&
The soft margin of the SVM. Allows how much training
errors are accepted.
errors are accepted.
\\
\end{tabular}
\\
\\
For each of these parameters, we will describe how we searched for a good
...
...
@@ -339,7 +348,14 @@ the feature vectors will not have enough elements.\\
In order to find this parameter, we used a trial-and-error technique on a few
cell sizes. During this testing, we discovered that a lot better score was
reached when we take the histogram over the entire image, so with a single
cell. therefor, we decided to work without cells.
cell. Therefore, we decided to work without cells.
\subsection
{
Parameter
\emph
{
Neighbourhood
}}
The neighbourhood to use can only be determined through testing. We did a test
with each of these neighbourhoods, and we found that the best results were
reached with the following neighbourhood, which we will call the
()-neighbourhood.
\subsection
{
Parameters
$
\gamma
$
\&
$
c
$}
...
...
@@ -351,7 +367,7 @@ different feature vector than expected, due to noise for example, is not taken
into account. If the soft margin is very small, then almost all vectors will be
taken into account, unless they differ extreme amounts.
\\
$
\gamma
$
is a variable that determines the size of the radial kernel, and as
such
blablabla
.
\\
such
determines how steep the difference between two classes can be
.
\\
\\
Since these parameters both influence the SVM, we need to find the best
combination of values. To do this, we perform a so-called grid-search. A
...
...
@@ -445,7 +461,7 @@ plates. Upon completion all kinds of learning and data sets could be created.
\subsection
{
How it went
}
Sometimes one cannot hear the alarm bell and wake up properly. This however was
not a big problem as no one was af
f
raid of staying at Science Park a bit longer
not a big problem as no one was afraid of staying at Science Park a bit longer
to help out. Further communication usually went through e-mails and replies
were instantaneous! A crew to remember.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment