Can you also think of this as the box filter having repeated computation, which this takes advantage of?
Staffjrk
Great observation. Yes! It’s basically a result of being able to factorize the computation (all the multiplied and adds) such that many terms are shared between neighboring output pixels.
jsc723
So is there a mathematical way to determine whether a filter is separable or not?
moridin22
It's separable in this way (as a product of a column and a row vector) iff it is rank 1, i.e. its column space has dimension 1. You can see why this is true by looking at the effect that multiplying a matrix (ab^T) and a vector v will have. The result is: (a b^T) v = a (b^T v) = a(b dot v), so the result is always just some scalar multiple of a.
Can you also think of this as the box filter having repeated computation, which this takes advantage of?
Great observation. Yes! It’s basically a result of being able to factorize the computation (all the multiplied and adds) such that many terms are shared between neighboring output pixels.
So is there a mathematical way to determine whether a filter is separable or not?
It's separable in this way (as a product of a column and a row vector) iff it is rank 1, i.e. its column space has dimension 1. You can see why this is true by looking at the effect that multiplying a matrix (ab^T) and a vector v will have. The result is: (a b^T) v = a (b^T v) = a(b dot v), so the result is always just some scalar multiple of a.