X-Git-Url: http://git.tomasm.cz/imago.git/blobdiff_plain/6f2695aadaf3eee6de311b681b7cf54987777871..16a9526d24fbdad7bbc544aeae9fd7ba067b3d91:/imago_pack/gridf.py?ds=inline diff --git a/imago_pack/gridf.py b/imago_pack/gridf.py index fe16f53..3c64720 100644 --- a/imago_pack/gridf.py +++ b/imago_pack/gridf.py @@ -1,4 +1,4 @@ -"""Imago grid-fitting module""" +"""Imago grid-fitting module.""" import multiprocessing from functools import partial @@ -30,9 +30,9 @@ def job_4(x, y, w, z, im_l, v1, v2, h1, h2, dv, dh, size): h2 = (h2[0] + z * dh, h2[1] + z) return (distance(im_l, get_grid([v1, v2], [h1, h2], size), size)) -def find(lines, size, l1, l2, bounds, hough, show_all, do_something): - l1 = line_from_angl_dist(l1, size) - l2 = line_from_angl_dist(l2, size) +def find(lines, size, l1, l2, bounds, hough, show_all, do_something, logger): + logger("finding the grid") + v1 = V(*l1[0]) - V(*l1[1]) v2 = V(*l2[0]) - V(*l2[1]) a, b, c, d = [V(*a) for a in bounds] @@ -98,6 +98,7 @@ def find(lines, size, l1, l2, bounds, hough, show_all, do_something): im_t_d.line(l, width=1, fill=(0, 255, 0)) do_something(im_t, "lines and grid") +# ### return grid, grid_lines