Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
公告
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
6815 讨论

Bug in lib or documetation of Canny/Sobel functions ??

Deleted_U_Intel
542 次查看
hi,

I found out, that ippiCanny_16s8u_C1R does not work right
when fed with the output coming from ippiFilterSobelHoriz/Vert
functions.
Horizontal & vertical edges are found correctly. But diagonal
edges look strange.
When the output of ippiFilterSobelVert is negated and then
used as input for ippiCanny_16s8u_C1R it works perfectly.
In addition to that, I guess the kernels presented in the documentation do not match the implemented kernels (see attached demo program).

alexander pfaff


/* Demo program to show mismatch of implementation and documentation of
*
* ippiFilterSobelHoriz_XYZ
* ------------------------
* Kernel as shown in documentation:
* 1 2 1
* 0 0 0
* -1 -2 -1
* Kernel implemented in library:
* -1 -2 -1
* 0 0 0
* 1 2 1
*
* ippiFilterSobelVert_XYZ
* ------------------------
* Kernel as shown in documentation:
* -1 0 1
* -2 0 2
* -1 0 1
*
* Kernel implemented:
* 1 0 -1
* 2 0 -2
* 1 0 -1
*/
0 项奖励
1 回复
Intel_C_Intel
员工
542 次查看

Sobel convolutions that are implemented in ippCV and OpenCV libraries are really correlations ie their kernels for odd derivatives are reflected on x=0 or y=0.

So, Sobel functions for first or third derivative on one direction and even derivative on the other direction result in pixels with different size in comparison with "right" definition of convolution operation.

Regards,
Vladimir

0 项奖励
回复