X-Git-Url: http://git.tomasm.cz/imago.git/blobdiff_plain/2fbf55c60d081e31a445334ea65703136a12c8d8..5cf4a31525522851060f336dfbf8dda2a2041274:/src/manual.py?ds=inline diff --git a/src/manual.py b/src/manual.py index 8e246d4..67f58e0 100644 --- a/src/manual.py +++ b/src/manual.py @@ -1,8 +1,8 @@ """Manual grid selection module""" -import pygame -import ImageDraw from math import sqrt, acos, copysign +from PIL import ImageDraw +import pygame from geometry import l2ad, line, intersection @@ -76,6 +76,8 @@ def find_lines(im_orig): def lines(corners): # TODO Error on triangle + corners.sort() # TODO does this help? + # TODO refactor this vvv cor_d = [(corners[0], (c[0] - corners[0][0], c[1] - corners[0][1]), c) for c in corners[1:]] cor_d = [(float(a[0] * b[0] + a[1] * b[1]) / (sqrt(a[0] ** 2 + a[1] ** 2) *