projekty
/
imago.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e38a855
)
bug fixed in edge detection
author
Tomas Musil
<tomik.musil@gmail.com>
Fri, 19 Oct 2012 21:46:09 +0000
(23:46 +0200)
committer
Tomas Musil
<tomik.musil@gmail.com>
Fri, 19 Oct 2012 21:46:09 +0000
(23:46 +0200)
pcf.c
patch
|
blob
|
history
diff --git
a/pcf.c
b/pcf.c
index
8cb8a4b
..
2a43188
100644
(file)
--- a/
pcf.c
+++ b/
pcf.c
@@
-112,7
+112,7
@@
static PyObject* py_edge(PyObject* self, PyObject* args)
image[x * (j + 2) + i + 1] + image[x * (j + 2) + i + 2] +
image[x * (j + 1) + i - 2] + image[x * (j + 1) + i - 1] + image[x * (j + 1) + i] +
image[x * (j + 1) + i + 1] + image[x * (j + 1) + i + 2]
- - (2
5
* image[x * j + i]);
+ - (2
4
* image[x * j + i]);
if (sum < 0) sum = 0;
if (sum > 255) sum = 255;
n_image[x * j + i] = sum;