- intersections = intersections_from_angl_dist(lines, image.size)
- image_g = image.copy()
- draw = ImageDraw.Draw(image_g)
- for line in intersections:
- for (x, y) in line:
- draw.point((x , y), fill=(120, 255, 120))
+ if args.manual_mode:
+ try:
+ lines = manual.find_lines(image)
+ except manual.UserQuitError:
+ #TODO ask user to try again
+ return 1
+ else:
+ lines, l1, l2, bounds, hough, im_h = linef.find_lines(image, show_all, do_something, verbose)
+ grid, lines = gridf.find(lines, image.size, l1, l2, bounds, hough,
+ do_something, im_h)
+ if show_all:
+ im_g = image.copy()
+ draw = ImageDraw.Draw(im_g)
+ for l in grid[0] + grid[1]:
+ draw.line(l, fill=(64, 255, 64), width=1)
+ do_something(im_g)
+
+ board = intrsc.board(image, lines, show_all, do_something)
+
+ #simple ASCII output:
+ for line in board:
+ print ' '.join(line)