color auto levels
[imago.git] / imago_pack / intrsc.py
index 45308b1..c64386f 100644 (file)
@@ -5,6 +5,7 @@ from operator import itemgetter
 
 import ImageDraw
 
+import filters
 import k_means
 import output
 
@@ -36,10 +37,14 @@ def board(image, lines, show_all, do_something):
                 draw.point((x , y), fill=(120, 255, 120))
         do_something(image_g, "intersections")
 
+    image_c = filters.color_enhance(image)
+    if show_all:
+        do_something(image_c, "white balance")
+    
     board_raw = []
     
     for line in intersections:
-        board_raw.append([stone_color_raw(image, intersection) for intersection in
+        board_raw.append([stone_color_raw(image_c, intersection) for intersection in
                       line])
     board_raw = sum(board_raw, [])