Commit b04b1a16 authored by Taddeus Kroes's avatar Taddeus Kroes

Fixed 80 character limit.

parent 81644280
...@@ -20,7 +20,7 @@ class LicensePlate: ...@@ -20,7 +20,7 @@ class LicensePlate:
self.read_xml() self.read_xml()
def are_corners_sorted(corners): 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.''' corner.'''
x0, y0 = corners[0].to_tuple() x0, y0 = corners[0].to_tuple()
x1, y1 = corners[1].to_tuple() x1, y1 = corners[1].to_tuple()
...@@ -30,7 +30,7 @@ class LicensePlate: ...@@ -30,7 +30,7 @@ class LicensePlate:
return x0 < x1 and y1 <= y2 and x2 >= x3 and y3 > y0 return x0 < x1 and y1 <= y2 and x2 >= x3 and y3 > y0
def sort_corners(corners): 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 = [] tuples = []
output = [] output = []
...@@ -118,9 +118,9 @@ class LicensePlate: ...@@ -118,9 +118,9 @@ class LicensePlate:
def get_transformation_matrix(self, matrix): def get_transformation_matrix(self, matrix):
# Get the vector p and the values that are in there by taking the SVD. # 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 # Since D is diagonal with the eigenvalues sorted from large to small
# the diagonal, the optimal q in min ||Dq|| is q = [[0]..[1]]. Therefore, # on the diagonal, the optimal q in min ||Dq|| is q = [[0]..[1]].
# p = Vq means p is the last column in V. # Therefore, p = Vq means p is the last column in V.
U, D, V = svd(matrix) U, D, V = svd(matrix)
p = V[8][:] p = V[8][:]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment