kernels to compute second order derivative of digital image For an image $I$, its first order derivatives can be computed using several oprators, such as 
$$K_{sobel} = \left[ \begin{array}{ccc} -1 &amp;0 &amp;1 \\ -2 &amp;0 &amp;2 \\ -1 &amp;0 &amp;1 \end{array}\right]$$
$$I_{x} = I * K_{sobel},\ I_{y} = I * K_{sobel}.T$$.
And to compute the second order derivatives $(I_{xx}, I_{yy}, I_{xy})$, I can apply $K_{sobel}$ twice on $I$, however, I wonder are there any kernels which can be applied once to get the second order derivatives.

Here is what I tried, I made up 2 kernels,
$$K_{xx} = \left[ \begin{array}{ccc} 0 &amp;0 &amp;0 \\ 2 &amp;-4 &amp;2 \\ 0 &amp;0 &amp;0 \end{array}\right]$$ 
$$K_{yy} = \left[ \begin{array}{ccc} 0 &amp;2 &amp;0 \\ 0 &amp;-4 &amp;0 \\ 0 &amp;2 &amp;0 \end{array}\right]$$ 
and $I_{xx} = I * K_{xx},\ I_{yy} = I * K_{yy}$, they look pretty much the same as twice-applied-sobel results, but I failed to find a good kernel for $I_{xy}$, I need your help, any idea is appreciated.
Convolution $(*)$ is associative, so

$I_{xx} = K_{sobel} * (K_{sobel} * I) = (K_{sobel} * K_{sobel}) * I$

meaning the convolution of a 1st order Sobel filter kernel with another 1st order Sobel filter gives the filter kernel for a second order filter. So e.g. a 2nd order horizontal Sobel filter kernel is:

$\left(
\begin{array}{ccc}
 -1 &amp; 0 &amp; 1 \\
 -2 &amp; 0 &amp; 2 \\
 -1 &amp; 0 &amp; 1 \\
\end{array}
\right) * \left(
\begin{array}{ccc}
 -1 &amp; 0 &amp; 1 \\
 -2 &amp; 0 &amp; 2 \\
 -1 &amp; 0 &amp; 1 \\
\end{array}
\right)=\left(
\begin{array}{ccccc}
 1 &amp; 0 &amp; -2 &amp; 0 &amp; 1 \\
 4 &amp; 0 &amp; -8 &amp; 0 &amp; 4 \\
 6 &amp; 0 &amp; -12 &amp; 0 &amp; 6 \\
 4 &amp; 0 &amp; -8 &amp; 0 &amp; 4 \\
 1 &amp; 0 &amp; -2 &amp; 0 &amp; 1 \\
\end{array}
\right)$

And for $I_{xy}$:

$\left(
\begin{array}{ccc}
 -1 &amp; 0 &amp; 1 \\
 -2 &amp; 0 &amp; 2 \\
 -1 &amp; 0 &amp; 1 \\
\end{array}
\right) * \left(
\begin{array}{ccc}
 -1 &amp; -2 &amp; -1 \\
 0 &amp; 0 &amp; 0 \\
 1 &amp; 2 &amp; 1 \\
\end{array}
\right)=\left(
\begin{array}{ccccc}
 1 &amp; 2 &amp; 0 &amp; -2 &amp; -1 \\
 2 &amp; 4 &amp; 0 &amp; -4 &amp; -2 \\
 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
 -2 &amp; -4 &amp; 0 &amp; 4 &amp; 2 \\
 -1 &amp; -2 &amp; 0 &amp; 2 &amp; 1 \\
\end{array}
\right)$

If you want a 3x3 kernel, you can use the 1st order derivative filter $\left(
\begin{array}{cc}
 -1 &amp; 1 \\
 -1 &amp; 1 \\
\end{array}
\right)$, which leads to the second order filters:

$\left(
\begin{array}{cc}
 -1 &amp; 1 \\
 -1 &amp; 1 \\
\end{array}
\right)*\left(
\begin{array}{cc}
 -1 &amp; 1 \\
 -1 &amp; 1 \\
\end{array}
\right)=\left(
\begin{array}{ccc}
 1 &amp; -2 &amp; 1 \\
 2 &amp; -4 &amp; 2 \\
 1 &amp; -2 &amp; 1 \\
\end{array}
\right)$

and

$\left(
\begin{array}{cc}
 -1 &amp; -1 \\
 1 &amp; 1 \\
\end{array}
\right)*\left(
\begin{array}{cc}
 -1 &amp; 1 \\
 -1 &amp; 1 \\
\end{array}
\right)=\left(
\begin{array}{ccc}
 1 &amp; 0 &amp; -1 \\
 0 &amp; 0 &amp; 0 \\
 -1 &amp; 0 &amp; 1 \\
\end{array}
\right)$