
Canny edge detection
This function applies Canny, one of the most widely used edge detection algorithms, to the current image. A good introduction to the Canny algorithm is here. For details, please refer to the original paper [1].In the following dialog, you can specify the kernel size and standard deviation of the Gaussian smoothing function. A larger kernel size will take more surrounding pixels into account for smoothing. A larger standard deviation will decrease the weight of the center pixel for smoothing.
The other two parameters you can play with are the high and low threshold that are used in the non-maximum suppression and the tracing part of the Canny algorithm. You will get more edge pixels by decreasing the thresholds.

The following figures show the results using different parameter settings. The first one is the result using the default parameters.
The original image (half sized):

Result using default parameters: kernel size=3, standard deviation=1, low threshold=12, high threshold=24

kernel size=3, standard deviation=1, low threshold=6, high threshold=12

kernel size=4, standard deviation=1, low threshold=10, high threshold=20

kernel size=5, standard deviation=2, low threshold=12, high threshold=24

Note that the Canny algorithm works on grayscale image only. VIPBase allows you to apply the Canny algorithm on each of the R,G,B channels and then combine three result images. To do this, check the "Detect edge in all three channels" option.
You can tell whether a pixel is an edge pixel in each of the R,G,B channels by its color. For example, a white (RGB=255,255,255) pixel means an edge pixel in all three channels; a yellow (RGB=255,255,0) means an edge pixel in R and G channels. So there are in total 8 possible colors in the result image. Result of the above example in all three channels is shown here.

VIPBase also supports other commonly used edge detection algorithms such as Sobel. See the documentation here
Reference
[1] Canny, J., A Computational Approach To Edge Detection, IEEE Trans. Pattern Analysis and Machine Intelligence, 8:679-714, 1986.
![]() |
VIPBase © 2006 Fengjun Lv |
Last update: 08/01/2006 (check html) |
