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}

The gradient image $g[m,n]$ obtained by applying the gradient operator to the original image $x[m,n]$ can be used in various ways to enhance the details of the image. For example, gradient image can be used to high-boost to emphasize the details in the image while still keeping the rest as background:

Here $T$ is some specified threshold, and $L_g$ is a constant.

Alternatively, we can emphasize the details while suppressing the back ground:

Here $L_g$ and $L_b$ are two gray levels assigned to the details and the background.


next up previous
Next: Edge Detection Up: gradient Previous: Digital Gradient
Ruye Wang 2016-10-18