faster gridf, cancel scaling
[imago.git] / src / imago.py
index 2d225e5..93f2f3f 100755 (executable)
@@ -11,16 +11,15 @@ import argparse
 import pickle
 
 try:
-    import Image, ImageDraw
+    from PIL import Image, ImageDraw
 except ImportError, msg:
     print >> sys.stderr, msg
     sys.exit(1)
 
-import im_debug
 import linef
 import manual
 import intrsc
-import gridf2 as gridf
+import gridf3 as gridf
 import output
 
 def argument_parser():
@@ -76,6 +75,7 @@ def main():
         do_something = Imsave("saved/" + args.files[0][:-4] + "_" +
                                str(image.size[0]) + "/").save
     else:
+        import im_debug
         do_something = im_debug.show
 
     if verbose:
@@ -108,6 +108,10 @@ def main():
                 d_file.close()
         else:
             lines, l1, l2, bounds, hough = linef.find_lines(image, do_something, logger)
+            #d_file = open('lines09.pickle', 'wb')
+            #pickle.dump(lines, d_file)
+            #d_file.close() #TODO delete this
+
 
         grid, lines = gridf.find(lines, image.size, l1, l2, bounds, hough,
                                  show_all, do_something, logger)