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
8acbc023
Commit
8acbc023
authored
Nov 18, 2011
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Plain Diff
Fixed merge conflicts.
parents
093ff345
dd5d084a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
3 deletions
+43
-3
docs/plan.tex
docs/plan.tex
+7
-3
src/crop.py
src/crop.py
+36
-0
No files found.
docs/plan.tex
View file @
8acbc023
...
...
@@ -53,7 +53,7 @@ In short our program must be able to do the following:
\section
{
Solution
}
Now that
we know the problem we can start with stating our
solution. This will
Now that
the problem is defined, the next step is stating a
solution. This will
come in a few steps as well.
\subsection
{
Transformation
}
...
...
@@ -80,7 +80,11 @@ very robust when dealing with noisy images.
Because we are already given the locations of the characters, we only need to
transform those locations using the same perspective transformation used to
create a front facing license plate.
create a front facing license plate. The next step is to transform the
characters to a normalized manner. The size of the letter W is used as a
standard to normalize the width of all the characters, because W is the widest
character of the alphabet. We plan to also normalize the height of characters,
the best manner for this is still to be determined.
\begin{enumerate}
\item
Crop the image in such a way that the character precisely fits the
...
...
@@ -102,7 +106,7 @@ which describes the distribution of line directions in the image. Since letters
on a license plate are mainly build up of straight lines and simple curves, it
should theoretically be possible to identify these using Local Binary Patterns.
This will actually be the first thing
we
implement, since it is not known if it
This will actually be the first thing
to
implement, since it is not known if it
will give the desired results. Our first goal is therefore a proof of concept
that using LBP's is a good way to determine which character we are dealing
with.
...
...
src/crop.py
0 → 100644
View file @
8acbc023
from
PIL
import
Image
from
Pylab
import
*
from
LBP
import
domain_iterator
THRESHOLD
=
0.5
im
=
Image
.
open
(
'../.jpg'
)
im
=
Image
.
convert
(
'L'
,
im
)
outer_bounds
=
get_outer_bounds
()
im
.
crop
(
outer_bounds
)
imshow
(
im
)
show
()
def
get_outer_bound
():
min_x
=
len
(
im
[
0
])
max_x
=
0
min_y
=
len
(
im
)
max_y
=
0
for
y
in
xrange
(
len
(
im
)):
for
x
in
xrange
(
len
(
im
[
0
])):
if
im
[
y
,
x
]
>
THRESHOLD
:
if
x
<
min_x
:
min_x
=
x
if
y
<
min_y
:
min_y
=
y
if
x
>
max_x
:
max_x
=
x
if
y
>
max_y
:
max_y
=
y
return
(
min_x
,
min_y
,
max_x
,
max_y
)
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