From 5cf4a31525522851060f336dfbf8dda2a2041274 Mon Sep 17 00:00:00 2001 From: Tomas Musil Date: Mon, 21 Jul 2014 17:44:06 +0200 Subject: [PATCH] fix imports in manual, better README --- README | 14 -------------- README.md | 23 +++++++++++++++++++++++ src/imago.py | 5 +---- src/manual.py | 4 ++-- 4 files changed, 26 insertions(+), 20 deletions(-) delete mode 100644 README create mode 100644 README.md 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() -- 2.4.2