diff --git a/canny_edge_machine.cpp b/canny_edge_machine.cpp index ccfbd59..464cf21 100644 --- a/canny_edge_machine.cpp +++ b/canny_edge_machine.cpp @@ -72,8 +72,13 @@ class CannyEdgeMachine { // build the gauss filter int* filter = (int*) malloc(sizeof(int) * filter_width* filter_width); int sum_weights = 0; - for(int i=0; i filter_middle) i = filter_middle - (x - filter_middle); + for(int y=0; y filter_middle) j = filter_middle - (y - filter_middle); filter[i*filter_width + j] = pow(2, i) * pow(2, j); sum_weights += filter[i*filter_width + j]; }