X-Git-Url: http://git.tomasm.cz/imago.git/blobdiff_plain/c13a5fb97c22ae952b4a99e75735f9c96efcf438..f0548db6acfd9616ddafa443e45103fc6655e0e4:/imago.py?ds=sidebyside diff --git a/imago.py b/imago.py index 136574a..33e7c69 100755 --- a/imago.py +++ b/imago.py @@ -86,7 +86,7 @@ def main(): 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) + show_all, do_something) if show_all: im_g = image.copy() draw = ImageDraw.Draw(im_g) @@ -94,18 +94,7 @@ def main(): draw.line(l, fill=(64, 255, 64), width=1) do_something(im_g, "grid", name="grid") - board, board_raw = intrsc.board(image, lines, show_all, do_something) - - ### Show color distribution - #import matplotlib.pyplot as pyplot - #luma = [(0.30 * s[0] + 0.59 * s[1] + 0.11 * s[2]) / 255. - # for s in sum(board_raw, [])] - #pyplot.scatter(luma, - # [(max(s) - min(s)) / (255 - abs(max(s) + min(s) - 255)) - # for s in sum(board_raw, [])], - # color=[(s[0]/255., s[1]/255., s[2]/255., 1.) for s in sum(board_raw, [])]) - #pyplot.show() - ### + board = intrsc.board(image, lines, show_all, do_something) #simple ASCII output: for line in board: