bug fixed in edge detection
authorTomas Musil <tomik.musil@gmail.com>
Fri, 19 Oct 2012 21:46:09 +0000 (23:46 +0200)
committerTomas Musil <tomik.musil@gmail.com>
Fri, 19 Oct 2012 21:46:09 +0000 (23:46 +0200)
pcf.c

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] 
-                               - (25 * image[x * j + i]);
+                               - (24 * image[x * j + i]);
                        if (sum < 0) sum = 0;
                        if (sum > 255) sum = 255;
                        n_image[x * j + i] = sum;