-import pygame
-import Image
+try:
+ import pygame
+ import Image
+except ImportError, msg:
+ import sys
+ print >>sys.stderr, msg
+ sys.exit(1)
def show(image, caption=''):
if image.mode != 'RGB':
#!/usr/bin/env python
-"""Usage: imago.py file"""
+
+"""Usage: imago.py file
+ analyses the given file
+ imago.py file --debug
+ shows every step of the computation
+ imago.py --help
+ shows this help"""
import sys
import math
-import Image, ImageDraw
+try:
+ import Image, ImageDraw
+except ImportError, msg:
+ print >>sys.stderr, msg
+ sys.exit(1)
import im_debug
import filter
from hough import Hough