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
b04b1a16
Commit
b04b1a16
authored
Dec 06, 2011
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed 80 character limit.
parent
81644280
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
src/LicensePlate.py
src/LicensePlate.py
+18
-18
No files found.
src/LicensePlate.py
View file @
b04b1a16
...
...
@@ -20,7 +20,7 @@ class LicensePlate:
self
.
read_xml
()
def
are_corners_sorted
(
corners
):
'''
Check if points are sorted clockwise, starting in the left-top
'''Check if points are sorted clockwise, starting in the left-top
corner.'''
x0
,
y0
=
corners
[
0
].
to_tuple
()
x1
,
y1
=
corners
[
1
].
to_tuple
()
...
...
@@ -30,7 +30,7 @@ class LicensePlate:
return
x0
<
x1
and
y1
<=
y2
and
x2
>=
x3
and
y3
>
y0
def
sort_corners
(
corners
):
'''Sort the corners clockwise, starting in the left-top corner.
'''
'''Sort the corners clockwise, starting in the left-top corner.'''
tuples
=
[]
output
=
[]
...
...
@@ -118,9 +118,9 @@ class LicensePlate:
def
get_transformation_matrix
(
self
,
matrix
):
# Get the vector p and the values that are in there by taking the SVD.
# Since D is diagonal with the eigenvalues sorted from large to small
on
#
the diagonal, the optimal q in min ||Dq|| is q = [[0]..[1]]. Therefore,
# p = Vq means p is the last column in V.
# Since D is diagonal with the eigenvalues sorted from large to small
#
on the diagonal, the optimal q in min ||Dq|| is q = [[0]..[1]].
#
Therefore,
p = Vq means p is the last column in V.
U
,
D
,
V
=
svd
(
matrix
)
p
=
V
[
8
][:]
...
...
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