next up previous
Next: Using Laplacian for Edge Up: gradient Previous: Gradient Operation for Edge

The Laplace Operator

The Laplace operator is defined as the dot product (inner product) of two gradient vector operators:

\begin{displaymath}\bigtriangleup \stackrel{\triangle}{=}\bigtriangledown^2
\st...
...frac{\partial^2}{\partial x^2}+\frac{\partial^2}{\partial y^2}
\end{displaymath}

When applied to $f(x,y)$, this operator produces a scalar function:

\begin{displaymath}\bigtriangleup f(x,y)
=\frac{\partial^2 f}{\partial x^2}+\frac{\partial^2 f}{\partial y^2}
\end{displaymath}

In discrete case, the second order differentiation becomes second order difference. In 1D case, if the first order difference is defined as

\begin{displaymath}\bigtriangledown f[n]=f'[n]=D_n[f[n]]=f[n+1]-f[n] \end{displaymath}

then the second order difference is
$\displaystyle \bigtriangleup f[n]$ $\textstyle =$ $\displaystyle \bigtriangledown^2 f[n]
=f''[n]=D^2_n[f[n]]=f'[n]-f'[n-1]$  
  $\textstyle =$ $\displaystyle (f[n+1]-f[n])-(f[n]-f[n-1])=f[n+1]-2f[n]+f[n-1]$  

Note that $f''[n]$ is so defined that it is symmetric to the center element $f[n]$. The Laplace operation can be carried out by 1D convolution with a kernel $[1, -2, 1]$.

In 2D case, Laplace operator is the sum of two second order differences in both dimensions:

$\displaystyle \bigtriangleup f[m,n]$ $\textstyle =$ $\displaystyle D^2_m[f[m,n]]+D^2_n[f[m,n]]
=f[m+1,n]-2f[m,n]+f[m-1,n]+f[m,n+1]-2f[m,n]+f[m,n-1]$  
  $\textstyle =$ $\displaystyle f[m+1,n]+f[m-1,n]+f[m,n+1]+f[m,n-1]-4f[m,n]$  

This operation can be carried out by 2D convolution kernel:

\begin{displaymath}\left[ \begin{array}{ccc} 0 & 1 & 0 \\ 1 & -4 & 1 \\ 0 & 1 & 0
\end{array} \right] \end{displaymath}

Other Laplace kernels can be used:

\begin{displaymath}\left[ \begin{array}{ccc} 1 & 1 & 1 \\ 1 & -8 & 1 \\ 1 & 1 & 1
\end{array} \right] \end{displaymath}


next up previous
Next: Using Laplacian for Edge Up: gradient Previous: Gradient Operation for Edge
Ruye Wang 2009-09-20