added _doc.py -- doc-string ckecking utility

added some sample description
This commit is contained in:
Alexander Mordvintesv
2012-08-22 16:42:19 +03:00
parent 122f59560c
commit d9185ec21b
9 changed files with 95 additions and 36 deletions

View File

@@ -1,9 +1,10 @@
import numpy as np
import cv2
'''
Floodfill sample.
help_message = '''USAGE: floodfill.py [<image>]
Usage:
floodfill.py [<image>]
Click on the image to set seed point
Click on the image to set seed point
Keys:
f - toggle floating range
@@ -11,11 +12,14 @@ Keys:
ESC - exit
'''
import numpy as np
import cv2
if __name__ == '__main__':
import sys
try: fn = sys.argv[1]
except: fn = '../cpp/fruits.jpg'
print help_message
print __doc__
img = cv2.imread(fn, True)
h, w = img.shape[:2]