next up previous
Next: Edge Detection Up: gradient Previous: Digital Gradient

Compass Gradient Operations

The following compass operators can detect edges of a particular direction:

\begin{displaymath}\left[ \begin{array}{rrr} -1 & 0 & 1  -1 & 0 & 1  -1 & 0 ...
...& 0  1 & 0 & -1  0 & -1 & -1
\end{array} \right], \;\;\;
\end{displaymath}


\begin{displaymath}\left[ \begin{array}{rrr} 1 & 0 & -1  1 & 0 & -1  1 & 0 &...
...} -1 & -1 & 0  -1 & 0 & 1  0 & 1 & 1
\end{array} \right]
\end{displaymath}

Other compass operators

\begin{displaymath}
\left[ \begin{array}{rrr} 1 & 1 & 1  1 & -2 & 1  -1 & -...
...& 1  0 & 0 & 0  -1 & -2 & -1
\end{array} \right], \;\;\;
\end{displaymath}

For all convolution kernels above, the sum of all elements is zero, i.e., the output from a homogeneous image region is zero. If the orientation of the edge is not needed, we run these compass operators in all directions and find if the maximum of them is greater than a threshold value.

edge_detection_4_dir.gif

Higher angular resolution can be achieved by increase the mask size. The two kernels below are for 30 and 60 degrees, respectively:

\begin{displaymath}
\left[ \begin{array}{rrrrr} 1 & 1 & 1 & 1 & 1  -.32 & .78 ...
...2 & .78 & 1 \\
-1 & -1 & -1 & -.32 & 1
\end{array} \right]
\end{displaymath}



Ruye Wang 2009-09-20