The algorithm for edge detection using the CannyEdgeDetection() function from SimpleITK is listed as follows:
- Smooth with a Gaussian filter (that is, remove the noise, since edge detection is sensitive to noise). The variance parameter for this function is used in the Gaussian smoothing.
- Compute the second (directional) derivative of the image obtained from the preceding step.
- Apply non-maximum suppression (to thin the edges and remove unwanted pixels), find the zero-crossings of the second derivatives, and find the correct extrema using the sign of the third derivative.
- Apply the hysteresis thresholding to the gradient magnitude (multiplied by zero-crossings) to find and link the edges. The lowerThreshold and upperThreshold ...