Commit 2f5359ff authored by Fabien's avatar Fabien

license plater compleetos

parent 17913d43
...@@ -95,7 +95,15 @@ class LicensePlate: ...@@ -95,7 +95,15 @@ class LicensePlate:
if version == i.getElementsByTagName("version")[0].firstChild.data: if version == i.getElementsByTagName("version")[0].firstChild.data:
self.country = i.getElementsByTagName("identification-letters")[0].firstChild.data self.country = i.getElementsByTagName("identification-letters")[0].firstChild.data
characters = i.getElementsByTagName("characters")[0].childNodes
temp = i.getElementsByTagName("characters")
if len(temp):
characters = temp[0].childNodes
else:
self.characters = []
break
for character in characters: for character in characters:
if character.nodeName == "character": if character.nodeName == "character":
...@@ -108,7 +116,7 @@ class LicensePlate: ...@@ -108,7 +116,7 @@ class LicensePlate:
data = self.retrieve_data(corners) data = self.retrieve_data(corners)
image = NormalizedCharacterImage(data=data) image = NormalizedCharacterImage(data=data)
self.characters.append(Character(value, corners, image, filename)) self.characters.append(Character(value, corners, image))
break break
......
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