fix bug in ransac
[imago.git] / src / gridf3.py
index ac7fa2a..f5e6edb 100644 (file)
@@ -125,7 +125,7 @@ def gen_corners(d1, d2):
             # TODO create an intersection?
         try:
             yield manual.lines(map(lambda p: p.to_tuple(), [c2, c1, c3, c4]))
-        except TypeError:
+        except (TypeError, ZeroDivisionError):
             pass
             # the square was too small to fit 17 lines inside
             # TODO define SquareTooSmallError or something