projekty
/
imago.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
444c17e
)
catch geometric errors
author
Tomas Musil
<tomik.musil@gmail.com>
Mon, 21 Jul 2014 21:51:46 +0000
(23:51 +0200)
committer
Tomas Musil
<tomik.musil@gmail.com>
Mon, 21 Jul 2014 21:51:46 +0000
(23:51 +0200)
src/manual.py
patch
|
blob
|
history
diff --git
a/src/manual.py
b/src/manual.py
index
b761f5e
..
2eb4ac5
100644
(file)
--- a/
src/manual.py
+++ b/
src/manual.py
@@
-91,7
+91,10
@@
def find_lines(im_orig):
if len(corners) == 4:
im = im_orig.copy()
draw = ImageDraw.Draw(im)
- l_vert, l_hor = lines(corners)
+ try:
+ l_vert, l_hor = lines(corners)
+ except Exception:
+ corners = corners[:-1]
for l in l_vert:
draw.line(l, fill=color, width=line_width)
for l in l_hor: