diff --git a/src/core/transformations/convolution.cpp b/src/core/transformations/convolution.cpp index 0e3f293..30f6683 100644 --- a/src/core/transformations/convolution.cpp +++ b/src/core/transformations/convolution.cpp @@ -25,7 +25,7 @@ math::matrix Convolution::getMask(int size, Mode mode = Normalize) for (int i=0; iformat()); EdgeLaplaceOfGauss log(newImage); + log.setParameter("size", getParameter("size")); + log.setParameter("sigma", getParameter("sigma")); + + Transformation laplasjan(log.transform()); int v0 = 128; + int half = size/2; for (int x=0;x mask = log.getMask(size, sigma, RepeatEdge); + math::matrix mask = laplasjan.getWindow(x, y, size, LChannel, RepeatEdge); float max = mask.max(); float min = mask.min(); + int gray = (min < (v0 - t) && max > (v0 + t)) ? mask(half, half) : 0; - if (min < v0 - t && max > v0 + t) - newImage->setPixel(x,y, QColor(255, 255, 255).rgb()); - else - newImage->setPixel(x,y, QColor(0, 0, 0).rgb()); + newImage->setPixel(x,y, QColor(gray, gray, gray).rgb()); } }