Is an Elliptical Gaussian Blur Separable for X and Y

convolution

On the Wikipedia Gaussian Blur page it reads in part:

A Gaussian blur effect is typically generated by convolving an image with a kernel of Gaussian values. In practice, it is best to take advantage of the Gaussian blur’s separable property by dividing the process into two passes. In the first pass, a one-dimensional kernel is used to blur the image in only the horizontal or vertical direction. In the second pass, the same one-dimensional kernel is used to blur in the remaining direction. The resulting effect is the same as convolving with a two-dimensional kernel in a single pass, but requires fewer calculations.

I'm interested in an elliptical gaussian blur, described here on Wikipedia.

For a circular Gaussian, I can compute the X blur on an image and take the resulting blurred image and separately compute the Y blur on it which, as described above, greatly reduces the number of computations performed as compared to convolving both dimensions at the same time.

If the blur is Elliptical, does the same hold? Is an elliptical also separable for $X$ and $Y$ or do we end up with an $XY$ term that breaks that? The formula on the Wikipedia page of the second link above would seem to suggest there is an XY term:

$$f(x,y) = A \exp\left(- \left(a(x – x_o)^2 + 2b(x-x_o)(y-y_o) + c(y-y_o)^2 \right)\right)$$

Best Answer

The elliptical is separable only if the axes of the ellipse are aligned with the axes of separation. The relative angle of the ellipse to the axes of separation is represented by θ in the Wikipedia article and when θ is the b term is zero in the parameters for the general form of the equation:

$$b = -sin(2θ)/4σ^2_x + sin(2θ)/4σ^2_y$$

Since sin(0) = 0, the b term is 0 and the other terms simplify to: $$a=1/2σ^2_y$$ $$c=1/2σ^2_y$$

And the equation:

$$f(x,y) = A \exp\left(- \left(a(x - x_o)^2 + 2b(x-x_o)(y-y_o) + c(y-y_o)^2 \right)\right)$$

Simplifies to just:

$$f(x,y) = A \exp\left(- \left((x - x_o)^2/2σ^2_x + (y-y_o)^2/2σ^2_y \right)\right)$$

And in case where the ellipse is centered on the origin it just becomes:

$$f(x,y) = A \exp\left(- \left(x^2/2σ^2_x + y^2/2σ^2_y \right)\right)$$

Related Question