In his original publication [1] Scharr lists (on page 120 ) the filter, named after him, as:
[1] Dipl. Phys. Hanno Scharr, Optimale Operatoren in der Digitalen Bildverarbeitung, INAUGURAL-DISSERTATION zur Erlangung der Doktorwürde der Naturwissenschaftlich-Mathematischen Gesamtfakultät der Ruprecht-Karls-Universität Heidelberg, 10. Mai 2000.
Fx is what ippiFilterScharrHorizMaskBorder actually does (apart from the 1/32 normalization factor). So far, so good.
Now comes the confusion:
1. It does make a difference, visually, if the first column of Fx (and the first row of Fy) is positive or negative. A histogram of the 32f result of the Scharr (and other derivative) filters shows why: the result values are mirrored around 0.0. That difference disappears, of course, if we take the square or absolute value of the result (as is often the case, but not always).
2. It does make a difference if the kernel values are stored (and displayed) in an array or 3x3 matrix. What the programming-matrix does, depends on the programming language being row major or not (where e.g. Fortran, Pascal and C are different). To avoid that confusion, I suggest to always list kernel values as array.
2. The IPP Developer Reference states that ippiFilterScharrHorizMaskBorder is filtered by a 3x3 matrix as follows (and I don't think that is correct)
3. The headers list the same matrix as "ScharrHoriz" (also incorrect I think)
4. The IPP Developer references lists Gx of ippiGradientVectorScharr as
The sign is wrong. Admittedly that doesn't matter when the result is squared or made positive. Still, this adds to the confusion.
I suggest that the docs are clarified, also for the other built-in filters.
Regards,
Adriaan van Os