better manual mode, grid-fitting preparation
[imago.git] / hough.py
index 9d44bcb..0e9fe2d 100644 (file)
--- a/hough.py
+++ b/hough.py
@@ -30,7 +30,7 @@ class Hough:
                                     size[0] / 2)
                         # column of the matrix closest to the distance
                         column = int(round(distance)) 
                                     size[0] / 2)
                         # column of the matrix closest to the distance
                         column = int(round(distance)) 
-                        if column >= 0 and column < size[0]:
+                        if 0 <= column < size[0]:
                             matrix[column][a] += 1
 
         new_image = Image.new('L', size)
                             matrix[column][a] += 1
 
         new_image = Image.new('L', size)