Traditional Culture Encyclopedia - Traditional culture - How to understand that differential operators can detect the boundary of an image?

How to understand that differential operators can detect the boundary of an image?

Common edge detection operators are Roberts operator, Prewitt operator, Sobel operator, Marr-Hidreth edge detection and canny operator.

I. Edge detection using gradient

1. Roberts operator uses the gradient magnitude approximated by the difference between two neighboring pixels in the diagonal direction to detect the edge. The operator is more accurate in localization, but is more sensitive to noise, and detects horizontal and vertical edges better than diagonal edges.

2, Sobel operator according to the image of the pixel point up and down, left and right neighbor gray weighted difference in the edge of the edge to detect the edge of this feature. The operator has a good smoothing effect on the noise, can provide build accurate edge direction information, but the edge localization accuracy is not high.

3, Prewitt operator edge detection is similar to the idea of Sobel operator, is also defined in a mask differential operation. The operator has a smoothing effect on the noise, again the localization accuracy is not high enough.

Second, more advanced edge detection techniques

1, Marr-Hildreth algorithm (Laplace operator)

(1) using Gaussian low-pass filter to filter the image;

(2) using the Laplace template for convolution;

(3) to find the zero-crossing of the image obtained in step (2).

The operator is a second-order differential operator, which detects the edges of the image by using the principle of zero-crossing of the second-order derivative function appearing at the edge points. It is more sensitive to gray scale mutation and noise, and is not directional, so it cannot obtain the directional information of the image edges.

2, Canny operator

Canny edge detection algorithm steps:

(1) Smooth the input image with a Gaussian filter

(2) Calculate the gradient magnitude image and the angle image

(3) Non-maximum suppression of the gradient magnitude image

(4) Double thresholding and connectivity analysis to detect and connect edges

The Canny operator is the most effective operator among the above, which has strong denoising ability and excels in the quality of lines such as continuity, fineness and straightness. But the performance of Canny operator brings the problem of more complicated connection and longer execution time.

In summary, in practical industrial production, the threshold gradient method is usually used when higher real-time performance is required; when higher quality is required, more advanced methods can be chosen, especially the Canny operator.