Canny gradient norm estimation: L2 or L1

Canny gradient norm estimation: L2 or L1


I'm trying to implement Canny edge detector with subpixel precision. AFAIK, there is only usual (non-subpixel) detector in IPP. It accepts x and y gradient components as input and applies hysteresis thresholding based on gradient value.

The problem is, gradient value is estimated as a sum of absolute values of gradient components: mag = |dx| + |dy|. But all the rest of my algorithm (edge detection is only a small piece) uses more conventional L2 norm to estimate gradient value: mag = sqrt(dx^2 + dy^2). So inconsistencies arise in this case.

Is there a way to make Canny detector use L2 norm instead of L1, or directly pass gradient value to use?


1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.