Reversing the Order of Operators for Edge Detection? Usually, for edge detection, we perform smoothing and then pass it through difference filter. What if application of difference filter happens first and then smoothing. How the math behind the same will change?
In the classic framework both the Smoothing and the Difference Filter are applied using Convolution.
Since it is done using convolution it implies the operation is Linear Spatially Invariant (LSI).
LSI operators can be applied in any order and the result will be the same. This is also a result of the commutativity property of the convolution operator.
Let's say $ f $ is the smoothing operator and $ g $ is the difference operator then:
$$ y = f \ast g \ast x = g \ast f \ast x $$
In practice, a more computational efficient way is define $ h = f \ast g = g \ast f $.
See Difference of Gaussians.