Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edge Detection Techniques

Does anyone know what the differences between the Prewitt, Sobel and Laplacian operators in edge detection algorithms?

Are some better than others?

Are different operators used in different situations?

like image 992
ale Avatar asked Dec 19 '10 14:12

ale


People also ask

What is edge detection techniques?

Edge detection is an image processing technique for finding the boundaries of objects within images. It works by detecting discontinuities in brightness. Edge detection is used for image segmentation and data extraction in areas such as image processing, computer vision, and machine vision.

Which is the best edge detection technique?

Canny Operator; Canny edge detection algorithm (Canny, 1986) known as optimal edge detection algorithm and the most commonly used edge detection algorithm in practice.

How many types of edge detection are there?

Edge Detection Operators are of two types: Gradient – based operator which computes first-order derivations in a digital image like, Sobel operator, Prewitt operator, Robert operator. Gaussian – based operator which computes second-order derivations in a digital image like, Canny edge detector, Laplacian of Gaussian.

Which algorithm is used for edge detection?

Canny in 1986 is considered as the ideal edge detection algorithm for images that are corrupted with noise. Canny's aim was to discover the optimal edge detection algorithm which reduces the probability of detecting false edge, and gives sharp edges.


1 Answers

The laplace operator is a 2nd order derivative operator, the other two are 1st order derivative operators, so they're used in different situations. Sobel/Prewitt measure the slope while the Laplacian measures the change of the slope.

Examples:

If you have a signal with a constant slope (a gradient):

Gradient signal: 1 2 3 4 5 6 7 8 9

a 1st derivative filter (Sobel/Prewitt) will measure the slope, so the filter response is

Sobel result:      2 2 2 2 2 2 2 

The result of a lapace filter is 0 for this signal, because the slope is constant.

Example 2: If you have an edge signal:

Edge:            0 0 0 0 1 1 1 1 

The sobel filter result has one peak; the sign of the peak depends on the direction of the edge:

Sobel result:    0 0 0 1 1 0 0 0

The laplace filter produces two peaks; the location of the edge corresponds with the zero crossing of the laplace filter result:

Laplace result:  0 0 0 1 -1 0 0 0

So if you want to know the direction of and edge, you'd use a 1st order derivative filter. Also, a Laplace filter is more sensitive to noise than Sobel or Prewitt.

Sobel and Prewitt filters on the other hand are quite similar and are used for the same purposes. Important differences between 1st order derivative filters are

  • Sensitivity to noise
  • Anisotropy: Ideally, the filter results for X/Y should be proportional to sin α and cos α, where α is the angle of the gradient, and the sum of the two squares should be the same for every angle.
  • Behavior at corners

These properties can be measured with artificial test images (like the famous Jähne test patterns, found in "Image Processing" by Bern Jähne). Unfortunately, I didn't find anything about the Prewitt operator in that book, so you'd have to do your own experiments.

In the end, there's always a trade-off between these properties, and which of them is more important depends on the application.

like image 144
Niki Avatar answered Sep 20 '22 10:09

Niki