more comments
authorTomas Musil <tomik.musil@gmail.com>
Tue, 24 Jun 2014 13:01:09 +0000 (15:01 +0200)
committerTomas Musil <tomik.musil@gmail.com>
Tue, 24 Jun 2014 13:01:09 +0000 (15:01 +0200)
imago_pack/im_debug.py
imago_pack/imago.py
imago_pack/intrsc.py

index 9916e92..d04144a 100644 (file)
@@ -1,3 +1,9 @@
+"""Debugging image display.
+
+This is a simple module, that shows images on screen using PyGame.
+It is not used anywhere in the standard UI, serves only for debugging.
+"""
+
 try:
     import pygame
 except ImportError, msg:
@@ -6,6 +12,7 @@ except ImportError, msg:
     sys.exit(1)
 
 def show(image, caption='', name=None):
+    """Initialize PyGame and show the *image*."""
     if image.mode != 'RGB':
         image = image.convert('RGB')
     pygame.init()
index 806ddcc..33e6181 100755 (executable)
@@ -1,6 +1,9 @@
 #!/usr/bin/env python
 
-"""Go image recognition."""
+"""Go image recognition.
+
+This is the main UI module of Imago.
+"""
 
 import sys
 import os
@@ -43,6 +46,7 @@ def argument_parser():
     return parser
  
 
+# TODO factor this into smaller functions
 def main():
     """Main function of the program."""
     
index c64386f..d577205 100644 (file)
@@ -1,4 +1,4 @@
-"""Imago intersections module"""
+"""Imago intersections module."""
 
 from math import cos, tan, pi
 from operator import itemgetter
@@ -100,6 +100,7 @@ def board(image, lines, show_all, do_something):
     return output.Board(19, board_r)
 
 def mean_luma(cluster):
+    """Return mean luma of the *cluster* of points."""
     return sum(c[0][0] for c in cluster) / float(len(cluster))
 
 def intersections_from_angl_dist(lines, size, get_all=True):