Commit cbbcc441 authored by Taddeus Kroes's avatar Taddeus Kroes

Removed some unused imports.

parent bd4097f0
#!/usr/bin/python
from cPickle import dump, load
from cPickle import load
from sys import argv, exit
from pylab import imsave
import os
......
#!/usr/bin/python
from cPickle import dump, load
from cPickle import load
from sys import argv, exit
from Classifier import Classifier
......
#!/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
......
#!/usr/bin/python
from os import listdir
from cPickle import load
from sys import argv, exit
from time import time
......
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))
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