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;