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
cbbcc441
Commit
cbbcc441
authored
Dec 21, 2011
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed some unused imports.
parent
bd4097f0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
13 deletions
+10
-13
src/run_classifier.py
src/run_classifier.py
+1
-1
src/test_classifier.py
src/test_classifier.py
+1
-1
src/test_compare.py
src/test_compare.py
+1
-2
src/test_performance.py
src/test_performance.py
+0
-1
src/xml_helper_functions.py
src/xml_helper_functions.py
+7
-8
No files found.
src/run_classifier.py
View file @
cbbcc441
#!/usr/bin/python
from
cPickle
import
dump
,
load
from
cPickle
import
load
from
sys
import
argv
,
exit
from
pylab
import
imsave
import
os
...
...
src/test_classifier.py
View file @
cbbcc441
#!/usr/bin/python
from
cPickle
import
dump
,
load
from
cPickle
import
load
from
sys
import
argv
,
exit
from
Classifier
import
Classifier
...
...
src/test_compare.py
View file @
cbbcc441
#!/usr/bin/python
from
matplotlib.pyplot
import
imshow
,
subplot
,
show
from
LocalBinaryPatternizer
import
LocalBinaryPatternizer
from
GrayscaleImage
import
GrayscaleImage
from
cPickle
import
load
from
numpy
import
zeros
,
resize
from
numpy
import
zeros
chars
=
load
(
file
(
'characters.dat'
,
'r'
))[::
2
]
left
=
None
...
...
src/test_performance.py
View file @
cbbcc441
#!/usr/bin/python
from
os
import
listdir
from
cPickle
import
load
from
sys
import
argv
,
exit
from
time
import
time
...
...
src/xml_helper_functions.py
View file @
cbbcc441
from
os
import
mkdir
from
os.path
import
exists
from
math
import
acos
from
pylab
import
imsave
,
array
,
zeros
,
inv
,
dot
,
norm
,
svd
,
floor
from
pylab
import
array
,
zeros
,
inv
,
dot
,
svd
,
floor
from
xml.dom.minidom
import
parse
from
Point
import
Point
from
Character
import
Character
...
...
@@ -110,7 +109,7 @@ def xml_to_LicensePlate(filename, save_character=None):
character_image
=
NormalizedCharacterImage
(
data
=
character_data
)
result_characters
.
append
(
Character
(
value
,
corners
,
character_image
,
filename
))
if
save_character
:
single_character
=
GrayscaleImage
(
data
=
character_data
)
...
...
@@ -133,26 +132,26 @@ def get_corners(dom):
margin_x
=
2
corners
.
append
(
Point
(
get_coord
(
nodes
[
0
],
"x"
)
-
margin_x
,
Point
(
get_coord
(
nodes
[
0
],
"x"
)
-
margin_x
,
get_coord
(
nodes
[
0
],
"y"
)
-
margin_y
)
)
corners
.
append
(
Point
(
get_coord
(
nodes
[
1
],
"x"
)
+
margin_x
,
Point
(
get_coord
(
nodes
[
1
],
"x"
)
+
margin_x
,
get_coord
(
nodes
[
1
],
"y"
)
-
margin_y
)
)
corners
.
append
(
Point
(
get_coord
(
nodes
[
2
],
"x"
)
+
margin_x
,
Point
(
get_coord
(
nodes
[
2
],
"x"
)
+
margin_x
,
get_coord
(
nodes
[
2
],
"y"
)
+
margin_y
)
)
corners
.
append
(
Point
(
get_coord
(
nodes
[
3
],
"x"
)
-
margin_x
,
Point
(
get_coord
(
nodes
[
3
],
"x"
)
-
margin_x
,
get_coord
(
nodes
[
3
],
"y"
)
+
margin_y
)
)
return
corners
def
get_coord
(
node
,
attribute
):
return
int
(
node
.
getAttribute
(
attribute
))
\ No newline at end of file
return
int
(
node
.
getAttribute
(
attribute
))
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