+def transform(image, hough, show_all, do_something):
+ im_hough = hough.transform(image)
+ if show_all:
+ do_something(im_hough, "hough transform")
+
+ # im_hough.image = filters.peaks(im_hough.image)
+ # if show_all:
+ # do_something(im_hough.image, "peak extraction")
+
+ im_h2 = filters.high_pass(im_hough, 96)
+ if show_all:
+ do_something(im_h2, "second high pass filters")
+
+ im_h2 = filters.components2(im_h2)
+ if show_all:
+ do_something(im_h2, "components centers")
+
+ return im_h2