File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,8 @@ void computeGradient(
122
122
(gradienty[2 ][1 ] * input[index_row_below]) +
123
123
(gradienty[2 ][2 ] * input[index_row_below + 1 ]);
124
124
125
- output[index] = sqrtf (powf (gradient_x, 2 .f ) + powf (gradient_y, 2 .f ));
125
+ // output[index] = sqrtf(powf(gradient_x, 2.f) + powf(gradient_y, 2.f));
126
+ output[index] = sqrtf (gradient_x * gradient_x + gradient_y * gradient_y);
126
127
}
127
128
128
129
int main (int argc, const char * argv[])
Original file line number Diff line number Diff line change @@ -122,7 +122,8 @@ void computeGradient(
122
122
(gradienty[2 ][1 ] * input[index_row_below]) +
123
123
(gradienty[2 ][2 ] * input[index_row_below + 1 ]);
124
124
125
- output[index] = sqrtf (powf (gradient_x, 2 .f ) + powf (gradient_y, 2 .f ));
125
+ // output[index] = sqrtf(powf(gradient_x, 2.f) + powf(gradient_y, 2.f));
126
+ output[index] = sqrtf (gradient_x * gradient_x + gradient_y * gradient_y);
126
127
}
127
128
128
129
int main (int argc, const char * argv[])
You can’t perform that action at this time.
0 commit comments