X-Git-Url: http://git.tomasm.cz/imago.git/blobdiff_plain/3f247835cf0314b09b329cb54132d6e529065fd1..45b6aba3bbf3aea1bacad077387ae77a1deb1a3c:/imago_pack/linef.py?ds=inline diff --git a/imago_pack/linef.py b/imago_pack/linef.py index 667442c..47952c2 100644 --- a/imago_pack/linef.py +++ b/imago_pack/linef.py @@ -43,17 +43,10 @@ def transform(image, hough, show_image): return im_h2 -def find_lines(image, show_image, verbose): +def find_lines(image, show_image, logger): """Find lines in the *image*.""" # TODO refactor into smaller functions - if verbose: - def logger(m): - print >> sys.stderr, m - else: - def logger(m): - pass - logger("preprocessing") show_image(image, "original image") @@ -80,7 +73,7 @@ def find_lines(image, show_image, verbose): im_h3 = filters.components(im_h3) show_image(im_h3, "half centers") - logger("finding the grid") + logger("finding the lines") lines_m = hough2.all_lines_h(im_h3) lines = []