projekty
/
imago.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
better manual mode, grid-fitting preparation
[imago.git]
/
imago.py
diff --git
a/imago.py
b/imago.py
index
c053a7f
..
1e5166c
100755
(executable)
--- a/
imago.py
+++ b/
imago.py
@@
-17,6
+17,7
@@
import im_debug
import linef
import manual
import intrsc
import linef
import manual
import intrsc
+import gridf
def main():
"""Main function of the program."""
def main():
"""Main function of the program."""
@@
-52,7
+53,7
@@
def main():
image.size[1])), Image.ANTIALIAS)
do_something = im_debug.show
if args.saving:
image.size[1])), Image.ANTIALIAS)
do_something = im_debug.show
if args.saving:
- do_something = imsave("saved/" + args.file[0][:-4] + "_" +
+ do_something = imsave("saved/" + args.file
s
[0][:-4] + "_" +
str(image.size[0]) + "/").save
if args.manual_mode:
str(image.size[0]) + "/").save
if args.manual_mode:
@@
-63,6
+64,13
@@
def main():
return 1
else:
lines = linef.find_lines(image, show_all, do_something, verbose)
return 1
else:
lines = linef.find_lines(image, show_all, do_something, verbose)
+ grid = gridf.find(lines, image.size, None, None)
+ if show_all:
+ im_g = image.copy()
+ draw = ImageDraw.Draw(im_g)
+ for l in grid[0] + grid[1]:
+ draw.line(l, fill=(64, 255, 64), width=1)
+ do_something(im_g)
board = intrsc.board(image, lines, show_all, do_something)
board = intrsc.board(image, lines, show_all, do_something)