From: Tomas Musil Date: Fri, 19 Oct 2012 21:46:09 +0000 (+0200) Subject: bug fixed in edge detection X-Git-Url: http://git.tomasm.cz/imago.git/commitdiff_plain/8489fc00904f05607f9de5134e933d03aef3f866 bug fixed in edge detection --- 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;