From: Tomas Musil Date: Mon, 21 Jul 2014 15:44:06 +0000 (+0200) Subject: fix imports in manual, better README X-Git-Url: http://git.tomasm.cz/imago.git/commitdiff_plain/5cf4a31525522851060f336dfbf8dda2a2041274 fix imports in manual, better README --- diff --git a/README b/README deleted file mode 100644 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 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. + diff --git a/src/imago.py b/src/imago.py index 9c58288..fd16af0 100755 --- a/src/imago.py +++ b/src/imago.py @@ -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 diff --git a/src/manual.py b/src/manual.py index fb7f832..67f58e0 100644 --- a/src/manual.py +++ b/src/manual.py @@ -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()