A hack for canny edge detector?

A hack for canny edge detector?

Hi, there,

After trial and errors, I finally made canny edge detector output the correctedge map. But I used the following "hacks". Does anybody have the same problem and solve it in a more elegant fashion?

The hacks:

1. Use negated vertical Sobel derivatives and regular Sobel derivatives for horiztonal direction.

2. Reverse the derivative imagesin X and Y directions in the canny function call.

Is this the supposed way to do it?

Thanks.

Fan

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

Hi,

You are right this way is proper. But it is not completely the hack.

One misunderstanding (2.) connected with Sobel function names: SobelVert mean "vertical" Sobel kernel (dx derivative), not "vertical" direction of derivative (dy) and correspondingly SobelHorizuses "horizontal" Sobel kernel ie dy derivative. These kernels are described in IPP Manual Vol 2.

Another (1.) follows from the fact that for some historical reasons IPP SobelVert kernel really calculats -dx (see the kernel in the manual). So, because the dx derivative with the right sign could be calculated by another method (eg by Scharr convolution) the SobelNegVert function calculated dx with positive sign had been introduced.

This issue will be mentioned in IPP manual for the next release.

Thanks,

Alexander

Leave a Comment

Please sign in to add a comment. Not a member? Join today