X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=deconvolution_sharpen_effect.cpp;h=2d32ecd6724d886a03185b1042b643a15a83075b;hp=ab28eb387d980ec8923ec150b1f3903e04e85f10;hb=29072985d0a00a53e5b578a1444cee61a0c9e1f2;hpb=71a27346652e54781215737255f757f6292ff120 diff --git a/deconvolution_sharpen_effect.cpp b/deconvolution_sharpen_effect.cpp index ab28eb3..2d32ecd 100644 --- a/deconvolution_sharpen_effect.cpp +++ b/deconvolution_sharpen_effect.cpp @@ -5,12 +5,12 @@ #include #include +#include #include #include #include "deconvolution_sharpen_effect.h" #include "util.h" -#include "opengl.h" using namespace Eigen; @@ -268,8 +268,7 @@ void DeconvolutionSharpenEffect::update_deconvolution_kernel() if (gaussian_radius < 1e-3) { val = (x == 0 && y == 0) ? 1.0f : 0.0f; } else { - float z = hypot(x, y) / gaussian_radius; - val = exp(-z * z); + val = exp(-(x*x + y*y) / (2.0 * gaussian_radius * gaussian_radius)); } gaussian_h(y + 2 * R, x + 2 * R) = val; }