+++ /dev/null
-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.
--- /dev/null
+# 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.
+
#!/usr/bin/env python
-"""Go image recognition.
-
-This is the main UI module of Imago.
-"""
+"""Go image recognition."""
import sys
import os
"""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
def find_lines(im_orig):
# TODO rename, refactor, comment
- import pygame
im = im_orig.copy()