conected components
[imago.git] / imago.py
index 45d165c..511027b 100755 (executable)
--- a/imago.py
+++ b/imago.py
@@ -68,15 +68,20 @@ def main():
     im_hough = hough1.transform(im_h)
     if show_all:
         do_something(im_hough, "hough transform")
     im_hough = hough1.transform(im_h)
     if show_all:
         do_something(im_hough, "hough transform")
-               
-       im_hough = filters.peaks(im_hough)
+
+    im_hough = filters.peaks(im_hough)
     if show_all:
         do_something(im_hough, "peak extraction")
     if show_all:
         do_something(im_hough, "peak extraction")
-
+               
     im_h2 = filters.high_pass(im_hough, 120)
     if show_all:
         do_something(im_h2, "second high pass filters")
 
     im_h2 = filters.high_pass(im_hough, 120)
     if show_all:
         do_something(im_h2, "second high pass filters")
 
+    im_c = filters.components(im_h2)
+    if show_all:
+        do_something(im_c, "components centers")
+
+    """
     hough2 = Hough(im_h2.size)
     im_hough2 = hough2.transform(im_h2)
     if show_all:
     hough2 = Hough(im_h2.size)
     im_hough2 = hough2.transform(im_h2)
     if show_all:
@@ -104,6 +109,7 @@ def main():
     collapse(im_c)
     if show_all:
         do_something(im_c, "optimalised hough")
     collapse(im_c)
     if show_all:
         do_something(im_c, "optimalised hough")
+    """
 
     lines = hough1.all_lines(im_c)
     draw = ImageDraw.Draw(image)
 
     lines = hough1.all_lines(im_c)
     draw = ImageDraw.Draw(image)