Prewitt Operator
Source Code (Matlab)
|
|
Running Results
Image 1
Image 2
Image 3
Image 4
Image 5
Sobel Operator
Source Code (OpenCV)
|
|
Running Results
Image 1
Image 2
Image 3
Image 4
Image 5
Canny Operator
Source Code (OpenCV)
|
|
Running Results
Image 1
Image 2
Image 3
Image 4
Image 5
Laplacian
Source Code (OpenCV)
|
|
Running Results
Image 1
Image 2
Image 3
Image 4
Image 5
FDoG
Source Code
点击此处下载源代码和对应的VS工程项目。
Running Results
Image 1
Image 2
Image 3
Image 4
Image 5
Analysis and Comparison
Comparison
Prewitt
The edge detection of Prewitt operator can be accuracy. However, Prewitt operator is not isotropic, so the edge is not fully connected and there is a certain degree of disconnection. As the result, there are many broken lines on the acquired images, which will lose some information. So it has better performance in simple images.
Sobel
Sobel operator is similar with the Prewitt operator. But its effect is more smooth and the width of edge detecting is usually wider. However, Prewitt operator is better than Sobel operator in anti-noise.
Canny
Canny operator has a relatively good effect on the accuracy of pixel edge location and anti-noise interference. However, as the price, it may misguide some information of the original image and it is more cumbersome to implement.
Laplacian
Laplacian is a second-order differential operator which is sensitive to noise. As the result, there are some scattered broken edge pixels in some pixels of the segmentation results. It can be proved that it is isotropic. That is to say, the gradient results will not be changed after the rotation of the axis. This is called as the independence of direction of the coordinate axis. Therefore, its positioning on the edge is relatively accurate.
FDoG
FDoG is the best one in edge detection for which it performs more smooth, connective and accurate. For anti-noise, FDoG may be the worst one. Because it is sensitive with all noise. But it is better than Canny operator in the images of main of single color blocks.
Line width of FDoG
Generate lines of different widths
The core of FDoG operator is DoG and ETF. We know that DoG is same to LoG, so the Gaussian σ can influence the discrete kernel of LoG and as the result, it also can influence DoG.So the problem is how σ influence the discrete kernel and what connection between the discrete kernel and line width.
Firstly, the Gaussian σ is a parameter of Gaussian σ of Gaussian distribution. There is a feature that the most of Gaussian distribution’s energy is in (3σ,3σ) area, which is named 3σ principle. As the result, σ can influence the Gaussian function’s energy and its discrete kernel. When σ = 1, it can construct a discrete kernel of size 7x7.
Secondly, discrete kernel can detect the edge when there exists one edge in discrete kernel’s area. So for the discrete kernel of size 7x7, it can detect one edge six times with different center pixel in one direction. And after DoG operator, there is ‘edge’ of six pixels width. But there are three pixels are positive (lower Gray-level value side) and the three pixels left are negative (high Gray-level value side).
Then according to the method called binary thresholding, as suggested in [Winnem¨oller et al.2006]:
Produce edges of width 1
To change the line width to 1, we just need to construct a 3x3 discrete kernel. For this, we need to set σ_c=1.0/3. And for the sake of keeping accuracy, we also need to change the parameter σ_m=1.0 to keep the scale.
As you can see, the line width of image (a) is 1 pixel while the line width of image (b) is 3 pixels. Meanwhile, (a)’s discrete kernel is 3x3 while (b)’ discrete kernel is 7x7.