projekty
/
imago.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix bug in gridf2
[imago.git]
/
src
/
intrsc.py
diff --git
a/src/intrsc.py
b/src/intrsc.py
index
355468c
..
6f78f8d
100644
(file)
--- a/
src/intrsc.py
+++ b/
src/intrsc.py
@@
-162,6
+162,8
@@
def stone_color_raw(image, (x, y)):
except IndexError:
pass
norm = float(len(points))
+ if norm == 0:
+ return 0, 0, 0 #TODO trow exception here
color = (sum(p[0] for p in points) / norm,
sum(p[1] for p in points) / norm,
sum(p[2] for p in points) / norm)