From 8489fc00904f05607f9de5134e933d03aef3f866 Mon Sep 17 00:00:00 2001 From: Tomas Musil Date: Fri, 19 Oct 2012 23:46:09 +0200 Subject: [PATCH 1/1] bug fixed in edge detection --- pcf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcf.c b/pcf.c index 8cb8a4b..2a43188 100644 --- 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; -- 2.4.2