fix imports in manual, better README
authorTomas Musil <tomik.musil@gmail.com>
Mon, 21 Jul 2014 15:44:06 +0000 (17:44 +0200)
committerTomas Musil <tomik.musil@gmail.com>
Mon, 21 Jul 2014 15:44:06 +0000 (17:44 +0200)
README [deleted file]
README.md [new file with mode: 0644]
src/imago.py
src/manual.py

diff --git a/README b/README
deleted file mode 100644 (file)
index d1da4e1..0000000
--- a/README
+++ /dev/null
@@ -1,14 +0,0 @@
-Requirements:
-Python 2.7 (including dev)
-PIL
-pygame
-openCV (if you want to use a camera, otherwise not needed)
-for documentation:
-    sphinx
-    sphinx-argparse
-
-Install:
-Run "make install" in this directory.
-
-Usage:
-Run "imago.py --help" for help and usage examples.
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..75588e1
--- /dev/null
+++ b/README.md
@@ -0,0 +1,23 @@
+# Imago Go Image Recognition
+
+## Requirements
+
+- Python 2.7 (including dev)
+- PIL
+- pygame
+- openCV (if you want to use a camera, otherwise not needed)
+- for documentation:
+    - sphinx
+    - sphinx-argparse
+
+## Installation
+
+Run `make install` in this directory.
+
+## Usage
+
+Run `./imago image.jpg` to extract game position from image.jpg.
+Run `./imago -m image.jpg` to manually select grid position.
+Run `./imago image000.jpg image001.jpg image002.jpg ...` to produce a game record from a sequence of images, one for every move. Use `-S` option to select SGF output. 
+Run "./imago --help" for help and list of all options.
+
index 9c58288..fd16af0 100755 (executable)
@@ -1,9 +1,6 @@
 #!/usr/bin/env python
 
-"""Go image recognition.
-
-This is the main UI module of Imago.
-"""
+"""Go image recognition."""
 
 import sys
 import os
index fb7f832..67f58e0 100644 (file)
@@ -1,7 +1,8 @@
 """Manual grid selection module"""
 
-from PIL import ImageDraw
 from math import sqrt, acos, copysign
+from PIL import ImageDraw
+import pygame
 
 from geometry import l2ad, line, intersection
 
@@ -23,7 +24,6 @@ class Screen:
 
 def find_lines(im_orig):
     # TODO rename, refactor, comment
-    import pygame
 
     im = im_orig.copy()