Scharr¶
Like Sobel, Scharr is a first-order gradient filter using a small (3×3) kernel pair — but with weights chosen to give more accurate rotational symmetry. Sobel’s gradient direction estimate can be noticeably off for edges that aren’t close to horizontal/vertical/45°; Scharr corrects this at essentially the same computational cost, so it’s generally the better default choice whenever gradient direction, not just magnitude, matters.
See also
Sobel — the simpler, more common gradient filter this improves on
Edge Detection — where Sobel, Scharr, and other edge operators are compared in one place
Feature Extraction — every other feature