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
c1d76618
Commit
c1d76618
authored
13 years ago
by
Fabien
Browse files
Options
Downloads
Patches
Plain Diff
XML reader erbij
parent
ec532bce
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/verslag.tex
+30
-3
30 additions, 3 deletions
docs/verslag.tex
with
30 additions
and
3 deletions
docs/verslag.tex
+
30
−
3
View file @
c1d76618
...
...
@@ -206,11 +206,38 @@ choices we made.
In order to retrieve the license plate from the entire image, we need to
perform a perspective transformation. However, to do this, we need to know the
coordinates of the four corners of the licenseplate. For our dataset, this is
stored in XML files. So, the first step is to read these XML files.
\\
\\
\paragraph*
{
XML reader
}
stored in XML files. So, the first step is to read these XML files.
\paragraph*
{
XML reader
}
The XML reader will return a 'license plate' object when given an XML file. The
licence plate holds a list of, up to six, NormalizedImage characters and from which country the
plate is from. The reader is currently assuming the XML file and image name are corresponding. Since this was the case
for the given dataset. This can easily be adjusted if required.
To parse the XML file, the minidom module is used. So the XML file can be
treated as a tree, where one can search for certain nodes. In each XML
file it is possible that multiple versions exist, so the first thing the reader will do is
retrieve the current and most up-to-date version of the plate. The reader will only get results from this
version.
Now we are only interested in the individual characters so we can skip the location
of the entire license plate. Each character has
a single character value, indicating what someone thought what the letter or digit was and four coordinates to create
a bounding box. To make things not to complicated a
Character class and Point class are used. They
act pretty much as associative lists, but it gives extra freedom on using the
data. If less then four points have been set the character will not be saved.
When four points have been gathered the data from the actual image is being requested.
For each corner a small margin is added (around 3 pixels) so that no features will be lost and minimum
amounts of new features will be introduced by 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 doesn'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 license plate, we feed those to a
...
...
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