The log edge detection operator first makes Gaussian filtering on the image and then the second derivative of Laplace (Laplacian). That is, the image is filtered with the Laplacian of the Gaussian function. Finally, the edge of the image or object can be obtained by detecting the 0 crossover (Zero crossings) of the filter result. Thus, the industry is referred to as the Laplacian-of-gaussian (LoG) operator.
Log Edge detection algorithm steps:
1. Smoothing: Gaussian filter
2. Enhancement: Laplacian operator calculates second-order guide
3. Detection: Second-order 0 intersection point and corresponding to the large peak of the first derivative
4. Positioning: linear interpolation
According to convolution, the derivation of the first convolution after the derivative and the first derivative after the convolution is equal, so you can combine the 1th and 2 steps into a step, the Gaussian filter to do the Laplace transform, the Mexican straw hat operator, and then use this operator and image convolution.
The syntax format for the Edge function implementation is as follows:
Bw=edge (I, ' log ')
Bw=edge (I, ' log ', Thresh)
Bw=edge (I, ' log ', Thresh, Sigma)
[BW, Thresh]=edge (I, ' log ' ...)
Bw=edge (I, ' log ') automatically chooses the threshold value for edge detection with the log operator.
Bw=edge (I, ' log ', Thresh) is thresh with the specified sensitivity threshold, and the log operator is used for edge detection, which ignores all edges less than the threshold value. When Thresh is empty, the threshold value is automatically selected. When the specified Thresh is 0 o'clock, the output image has a closed outline because it contains all 0 intersections in the input image.
<span style= "Font-family:simsun;color: #3333ff;" >i=rgb2gray (Imread (' 9.jpg ')); subplot (121); Imshow (I); title (' Original '); Bw=edge (I, ' log '); subplot (122); Imshow (BW); title (' Log Edge detection ');</span>
Log Edge detection algorithm