From 5575c909e2d345773367d1da42149b758f7e4865 Mon Sep 17 00:00:00 2001 From: Tomas Musil Date: Sat, 11 Aug 2012 22:53:25 +0200 Subject: [PATCH] grid lines in debugging mode --- imago.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/imago.py b/imago.py index ab44f4f..9e1697c 100755 --- a/imago.py +++ b/imago.py @@ -130,6 +130,13 @@ def main(): do_something(im_c, "hough x lines") lines.append(hough1.all_lines(im_c)) + image_g = image.copy() + draw = ImageDraw.Draw(image_g) + for line in [l for s in lines for l in s]: + draw.line(line_from_angl_dist(line, image.size), fill=(120, 255, 120)) + if show_all: + do_something(image_g, "the grid") + intersections = intersections_from_angl_dist(lines, image.size) image_g = image.copy() draw = ImageDraw.Draw(image_g) @@ -142,7 +149,7 @@ def main(): line]) if show_all: - do_something(image_g, "the grid") + do_something(image_g, "intersections") return 0 -- 2.4.2