To detect edges at an arbitrary orientation one convolves the image
with the convolution kernels of 7 and 8. Call
the resultant images
and
. Define a new image
. This operation is shown in
6
Figure 6: Showing the magnitude of the DoG
Now threshold this image to mark the peaks (see Figure 7
Figure 7: Thresholding of the peaks of the magnitude of the gradient
This edge detector is essentially known as the Canny edge detector, after something known as thining, see Figure 8
Figure 8: Edges of the original image
Additional demos are available on here .