From 3194a084e6072211c6e2bdb9906587b658c4e42f Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Tue, 5 Jan 2016 17:32:25 +0100 Subject: [PATCH] [TASK] Move gauss filter function to private section. --- canny_edge_machine.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/canny_edge_machine.cpp b/canny_edge_machine.cpp index d9eaa3c..58c5e3c 100644 --- a/canny_edge_machine.cpp +++ b/canny_edge_machine.cpp @@ -31,6 +31,12 @@ class CannyEdgeMachine { double t_low; double t_high; + double gauss(int x, int y, double sigma) { + // e^-((x^2 + y^2)/(sigma^2)) + double upper_part = pow(M_E, (-1.0) * ( (pow(x, 2)+pow(y, 2))/pow(sigma, 2) ) ); + return upper_part; + }; + public: CannyEdgeMachine(LazyImage* original, LazyImage* working_copy){ this->original = original; @@ -75,12 +81,6 @@ class CannyEdgeMachine { } }; - double gauss(int x, int y, double sigma) { - // e^-((x^2 + y^2)/(sigma^2)) - double upper_part = pow(M_E, (-1.0) * ( (pow(x, 2)+pow(y, 2))/pow(sigma, 2) ) ); - return upper_part; - }; - void doGaussBlur(void) { int filter_width = this->filter_size; double sigma = this->filter_sigma;