Pascal’s triangle gives sets of coefficients for a smoothing operator which, in the limit, approaches the coefficients of a Gaussian smoothing operator. The binomial expansion gives the integer coefficients of a series that, in the limit, approximates the normal distribution. Gaussian averaging has already been stated to give optimal averaging. One approach to a theoretical basis is to consider the optimal forms of averaging and of differencing.
Unfortunately a theoretical basis, that can be used to calculate the coefficients of larger templates, is rarely given. This is the standard formulation of the Sobel templates, but how do we form larger templates, say for 5×5 or 7×7? Few textbooks state its original derivation, but it has been attributed ( Heath et al., 1997) as originating from a PhD thesis ( Sobel, 1970). The Mathcad implementation of these masks is very similar to the implementation of the Prewitt operator, Code 4.2, again operating on a 3×3 subpicture.