]> git.sesse.net Git - movit/blobdiff - deconvolution_sharpen_effect.cpp
Run include-what-you-use over all of movit. Some hand tuning.
[movit] / deconvolution_sharpen_effect.cpp
index ab28eb387d980ec8923ec150b1f3903e04e85f10..260266403852a2beb22232e29924d4c25a873b2d 100644 (file)
@@ -2,15 +2,18 @@
 // Since all of our signals are symmetrical, discrete correlation and convolution
 // is the same operation, and so we won't make a difference in notation.
 
-
-#include <math.h>
-#include <assert.h>
 #include <Eigen/Dense>
 #include <Eigen/Cholesky>
+#include <GL/glew.h>
+#include <assert.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <algorithm>
+#include <new>
 
 #include "deconvolution_sharpen_effect.h"
 #include "util.h"
-#include "opengl.h"
 
 using namespace Eigen;
 
@@ -268,8 +271,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;
                }