Edge detection is the process of identify the presence and location of edges by sharp discontinuities of image. Edge detection plays an important role in image processing and helps in solving many complex problems. One useful and easy to implement algorithm is the Prewitt filter. As compared to Sobel, the Prewitt masks are simpler to implement but are very sensitive to noise. Mathematically, the operator uses two 3×3 kernels which are convolved with the original image to calculate approximations of the derivatives – one for horizontal changes, and one for vertical.

Extra Information:

There are four types of edges which are described below:

  1. Step Edge – The intensity of image abruptly varies from one value to one side of the breakage to a different value on other side.
  2. Ramp Edge – When the intensity change is not spontaneous and appears a limited distance then step edges are changed to ramp edges.
  3. Ridge/Line Edge – The intensity of image suddenly changes values and then returns to the starting point within short distance.
  4. Roof Edge – When intensity change is not spontaneous and appears over a finite distance usually generated by connectivity of surfaces then line edges becomes roof edges.

Below is the source code in C Language of the prewitt filter as well as the bitmap library to load and use images:




Please refer to: https://gitlab.com/iikem/threads-benchmark-prewitt for a complete example.

Write A Comment