# Laplacian 2D kernel - is it separable?

I'm wondering if the 2D laplacian kernel

0  1  0
1 -4  1
0  1  0


is also a separable kernel. How can I find that out?

-
 If it were $\begin{bmatrix}a & b & c\end{bmatrix} * \begin{bmatrix}d \\ e \\ f\end{bmatrix}$, then the upper-left corner would be $ad = 0$, so either $a$ or $d$ would have to be zero, so... – Rahul Narain Apr 15 '12 at 19:18 you're right. Post it as an answer and I'll accept it. Although I was searching for a "standard way" to verify if the kernel is separable or not – paulAl Apr 15 '12 at 19:20 I've posted an answer about a general way to do this for arbitrary kernels, though I don't know if it's "standard" in any sense. – Rahul Narain Apr 15 '12 at 19:39

A kernel $h$ is separable if and only if all its rows are multiples of each other. Then you can pick one, call it $f$, make a column of the multiplicative factors, call it $g$, and find that $h = f*g$.

You can't do this for the 2D Laplacian kernel, because $[0,1,0]$ is not a multiple of $[1,-4,1]$.

-

You cannot separate this kernel and make 2 consecutive convolutions to get the same result. But you can make 2nd derivative convolutions (horizontal and vertical) with [1 -2 1] and [1; -2; 1] kernels and then sum their results.

In case of separable convolution you use associative property of convolution, in case of sum of two convolutions you use distributive property.

I think sum of convolutions is another way to effectively compute convolution kernel.

-