Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
licenseplates
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
licenseplates
Commits
c1d76618
Commit
c1d76618
authored
Dec 19, 2011
by
Fabien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XML reader erbij
parent
ec532bce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
docs/verslag.tex
docs/verslag.tex
+30
-3
No files found.
docs/verslag.tex
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
...
...
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