Kirsch operator

The Kirsch operator or Kirsch compass kernel is a non-linear edge detector that finds the maximum edge strength in a few predetermined directions. It is named after the computer scientist Russell A. Kirsch.

Mathematical description

The operator takes a single kernel mask and rotates it in 45 degree increments through all 8 compass directions: N, NW, W, SW, S, SE, E, and NE. The edge magnitude of the Kirsch operator is calculated as the maximum magnitude across all directions:


h_{n, m} = \rm {max}_{z=1, \ldots ,8}\sum_{i=-1}^{1}\sum_{j=-1}^{1}g_{ij}^{(z)}\cdot f_{n+i,m+j}

where z enumerates the compass direction kernels


\mathbf{g^{(1)}} = \begin{bmatrix} 
+5 & +5 & +5 \\
-3 &  0 & -3 \\
-3 & -3 & -3 
\end{bmatrix},\ 
\mathbf{g^{(2)}} = \begin{bmatrix} 
+5 & +5 & -3 \\
+5 &  0 & -3 \\
-3 & -3 & -3 
\end{bmatrix},\ 
\mathbf{g^{(3)}} = \begin{bmatrix} 
+5 & -3 & -3 \\
+5 &  0 & -3 \\
+5 & -3 & -3 
\end{bmatrix},\ 
\mathbf{g^{(4)}} = \begin{bmatrix} 
-3 & -3 & -3 \\
+5 &  0 & -3 \\
+5 & +5 & -3 
\end{bmatrix} and so on.

The edge direction is defined by the mask that produces the maximum edge magnitude.

Example images

References

This article is issued from Wikipedia - version of the Saturday, April 09, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.